What do note numbers actually mean?

What’s going on here?
Using note notation I get unexpected results in the logs.

play :c4 {note: 60.0}
sleep 1
play :d4 {note: 62.0}
sleep 1
play :e4 {note: 64.0}
sleep 1
play :f4 {note: 65.0}
sleep 1
play :g4 {note: 67.0}
sleep 1
play :a5 {note: 81.0}

What I don’t understand is why aren’t the frequencies of the notes linear?
When it says c4 is 60, what does that mean its not 60hz…

Middle C aka c4 is 256Hz… D4 is 294Hz, E4 is 330Hz, so what are 60, 62, 64…. actually

Those are the numbers assigned to notes in the MIDI standard.
You can get the corresponding frequencies using the midi_to_hz command.

1 Like