Error in doc about play

Hi,

In the doc, we can read

`play 47`  actually means play the 47th note on the piano.

well this is not true. A0 is the first note on a 88 keys piano right ?

play :a0
sleep 1
play : 21 # first note on a 88 keys piano
sleep 1

In fact, the 47 midi note value is corresponding to the 27th key of a 88 keys piano
https://usermanuals.finalemusic.com/Finale2012Mac/Content/Finale/MIDI_Note_to_Pitch_Table.htm

Hi @nlb,

if this has found its way into the docs it is a mistake (where did you find it?).

You are right: The numbers indicate midi notes. So 60 = :c = :c4 = middle C on the piano.

Edit: The numbers indicate midi notes, but a 88-key piano does not start with midi note 0 (which is C-1) but as you are saying with A0.

sure i find it on the doc :slight_smile:
https://sonic-pi.net/tutorial.html#section-2-1

sorry @martin but midi note 0 is not c “minus” 1 (c-1) but c “minus 2” c-2. SonicPi can’t play minus octave

Yeah, you are right (the source I looked it up, see above, is not correct).

Actually 8.18 Hz (= A-2, Midi 0) is below the audible threshold, right?

:wink:

no problem @Martin

for the initial mistake into the spi doc, is the doc available in a repo to propose a pull request ?

Nope, I don’t think so.

The document in question is at https://github.com/samaaron/sonic-pi/blob/master/etc/doc/tutorial/02.1-Your-First-Beeps.md
in the Sonic Pi source tree, if you want to do a pr

Ah, sorry. And yes, as it is in the tutorial, it is available in the repository… Thanks for the clarification.

well english is not my natural language so i hesitate…
i suggest the change in french https://hosted.weblate.org/projects/sonic-pi/tutorial/fr/
but it’s quite far from the original text.

google translate gives you the english version from my suggestion.

 It turns out that the C of the 4th octave (C in English notation) is identified by the number 60. `play 60` therefore plays the C of the 4th octave. To play the next piano key to the right, you have to add 1 to 60 and then type `play 61`, which in this case is the black key of the C sharp. To play the D, the next key to the right, `play 62`.

EDIT : i do a pull request in english