nlb
November 5, 2019, 4:37pm
1
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
Martin
November 5, 2019, 6:10pm
2
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 .
nlb
November 5, 2019, 6:14pm
3
nlb
November 6, 2019, 9:06am
4
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
Martin
November 6, 2019, 9:28am
5
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?
nlb
November 6, 2019, 11:56am
6
no problem @Martin
for the initial mistake into the spi doc, is the doc available in a repo to propose a pull request ?
Martin
November 6, 2019, 2:28pm
9
Ah, sorry. And yes, as it is in the tutorial, it is available in the repository… Thanks for the clarification.
nlb
November 6, 2019, 4:29pm
10
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