Main Site Documentation

Piano Key Frequencies in Hertz for BrainPad Music


This is a link to a PDF file that I posted on my Google Drive account which shows the 88 notes on a piano keyboard and their translation into Hertz which is used in JavaScript for the block coding of BrainPad. You should be able to take the standard notation from a song written for the piano (or other instrument in the same scale) and change those notes (middle C, A, A sharp et) and convert those to Hz. using this PDF file and then insert that digital data into the JavaScript. Likewise, you could just drag and drop the blocks onto the desktop and change notes as you go. But the Java coding might be faster:


To better demonstrate this, I have downloaded the song “Perfect” which I think is popular with young people (tweens?) now days. and posted a link to my .txt file of it on Google Drive. The first 3 lines of notes for piano are copied and the digital notation in Hz supplied for each note. Since there are so few notes, once translated into Hz. it is easy to remember each digital number for each note. All this work is being done by me in a public library on a $99 Samsung Chromebook(E-Bay) and MS MakeCode. I found yesterday that the system works on Chromebooks just as well off-line with MakeCode. For some reason I can highlight a line of JavaScript code and copy it with a right click of the wireless mouse but not paste it into the program so as to code for multiple lines of notes. But the mouse does work to paste copied text in other programs as the link below. Pressing Ctrl + v does paste the JavaScript line of code into the program so you can copy and paste many lines of code to add notes to the program that way on this Chromebook. The mousepad does not copy and paste at all and I’m told that is true for many Chromebooks; it’s either key strokes to cut and paste or, using the remote mouse, in some cases that works.


Why not share the code you have the the BrainPad? This is one fo the coolest features of MakeCode :slight_smile:


OK, I’ll see if I have not deleted it. It’s on my Chromebook and I’m on my Surface now. If I can find the code then I’ll post it here or re-create it .


Also if you have a .UF2 file, the file MakeCode makes when you download, you can drag it back into the MakeCode work area and the code will re-appear.


Yeah! that is one of the great feature of make code.