Microsoft MakeCode

Music Key Incrementation

I noticed each key is represented by a number. What is the incrementation or pattern of the numbers?

Ex:
Low C = 131
Low C# = 139
etc.

These numbers pop up in the parameter area when you click on a key.

image

It’s the hertz of a note. There is a formula - you can search up “note name to hertz.”

1 Like

Yup, here’s the source code mapping for key -> number:

1 Like