Skip to content

Commit 6034eb4

Browse files
committed
getPatch() documentation
1 parent 4bbe4ef commit 6034eb4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/soundfile.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,15 @@ class SoundFile {
902902
var newPlaybackRate = midiToFreq(num) / midiToFreq(60);
903903
this.rate(newPlaybackRate);
904904
}
905+
906+
/**
907+
* Returns the current pitch of a sound file in the MIDI note.
908+
*
909+
* @method getPitch
910+
* @for p5.SoundFile
911+
* @return {Number} Current pitch of the SoundFile.
912+
*
913+
*/
905914
getPitch() {
906915
var freqValue = this.rate() * midiToFreq(60);
907916
return freqToMidi(freqValue);

0 commit comments

Comments
 (0)