This week has been focused on creating MIDI files. This stands for Musical Instrument Digital Interface and is an easy way to replicate musical instruments on a computer. For my program I will be using the piano as I understand piano notes and chords better than other instruments. MIDI accepts note numbers so for example the middle C on a piano would be note 60 as seen below.
(image taken from : electronics.dit.ie )
I created a method that takes the a note for example D# and an octave. The method will then return the Octave 4 * 12 (12 being the number of notes) and then adds the original note number 3 returning 51.
The aim of the MIDI file to to be played on robotic instruments such as this one below that consists of a piano, organ pipes and a glockenspiel.
I created a method that takes the a note for example D# and an octave. The method will then return the Octave 4 * 12 (12 being the number of notes) and then adds the original note number 3 returning 51.
The aim of the MIDI file to to be played on robotic instruments such as this one below that consists of a piano, organ pipes and a glockenspiel.
Here is an example of the file that I created as well as the machine playing music.
midifile.mid |