Skip to content

Commit fd3afda

Browse files
committed
updated documentation of setPitch method
1 parent 7d72e70 commit fd3afda

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/soundfile.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,12 +887,17 @@ class SoundFile {
887887

888888
// TO DO: document this
889889
/**
890-
* Set the pitch rate of a sound file. Will change the pitch and the speed also.
890+
* Set the pitch rate of a sound file by providing ANSI notes
891+
* value. It Will change the pitch and the speed also.
892+
* If input note is 60 (middle C), than frequency and speed is normal.
893+
* And if we increases note input than frequency and speed will increases
894+
* and vice-versa.
891895
*
892896
* @method setPitch
893897
* @for p5.SoundFile
894-
* @param {Number} pitchRate Set the pitch rate.
895-
* Values ​​less than zero are also accepted.
898+
* @param {Number} pitchRate If the MIDI note is increased, then both the
899+
* frequency of the sound and its playback speed
900+
* will increase as a result.
896901
*/
897902
setPitch(num) {
898903
var newPlaybackRate = midiToFreq(num) / midiToFreq(60);

0 commit comments

Comments
 (0)