MIDI stands for Musical Instrument Digital Interface. It is a standard specifying a way in which software and electronic devices can transmit and receive music. The Play Note () for () Beats block plays a note with the pitch represented by its input according to the MIDI Note System, and it can be used repetitively to play any sequence of MIDI notes. The volume, tempo, or instrument used can be changed seperately.
MIDI Note System
Play Note () for () Beats uses the MIDI note system. Each note is represented by a number. A note can be selected by either typing in a number or pressing a key on the virtual keyboard. 60 represents middle C. Adding or subtracting 1 is equivalent to moving one semitone higher or lower, respectively. Adding or subtracting 12 changes the note by one octave.
MIDI may be tricky to use since it does not have the regular notation for notes and durations. These diagrams might help:
There are 131 notes on Scratch's keyboard, numbered from 0 (C-1, about 8.18 Hz) to 130 (B♭9, about 14917.24 Hz). Each note is 1 number larger than the previous, and the ratio of frequency is always 12√ (approximately 1.06), with A4 being 440 Hz.
|C4 (middle C)||60||262 Hz|
This table shows the beat number values for the most common rhythms in the most common time signatures, interpreted in the most basic way.
|This section has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the internet, as we cannot guarantee the safety of other websites.|
A list of the instruments available prior to Scratch 2.0 can be found here.
In versions prior to Scratch 2.0, Scratch used MIDI for the music blocks. The Play Drum () for () Beats block offered the 47 drums specified by General MIDI, and Set Instrument to () offered the 128 instruments specified by General MIDI. A MIDI synthesizer or sampler on one's computer would play each note or drum sound produced by a music block.
When Scratch 2.0 was released, Scratch stopped using MIDI to create notes and drums. Instead, Scratch now uses sampled instruments to play the various notes and drum sounds; however, it still uses MIDI's note numbering system.