120 likes | 337 Views
Carillon to MIDI. TA212: Block 4, Chapter 3. What is MIDI?. Musical Instrument Digital Interface a way to carry information about music from one place to another along a wire or in a file which note to play when to start which instrument to use. MIDI Connections. MIDI In. MIDI Thru.
E N D
Carillon to MIDI TA212: Block 4, Chapter 3
What is MIDI? • Musical Instrument Digital Interface • a way to carry information about music from one place to another along a wire or in a file • which note to play • when to start • which instrument to use TA212 - Block 4 - Chapter 3 - Carillon to MIDI
MIDI Connections MIDI In MIDI Thru Synthesiser “local off” switch MIDI Out TA212 - Block 4 - Chapter 3 - Carillon to MIDI
MIDI Messages • Instructions about what sounds to make • Status byte • note on • note off • program change (new instrument) • Data byte(s) • numerical information • pitch, volume etc. TA212 - Block 4 - Chapter 3 - Carillon to MIDI
MIDI Channels • MIDI can support 16 channels. Each can be a separate synthesised instrument • Status bytes which refer to channels are arranged in blocks of 16 • So... • 144: “Note On” on Channel 1 • 145: “Note On” on Channel 2 • etc. TA212 - Block 4 - Chapter 3 - Carillon to MIDI
MIDI Example 145 60 64 129 60 64 Note On - Channel 2 Middle C (C4) Mid range velocity (loudness) Note Off - Channel 2 Middle C (C4) Mid range velocity (loudness) TA212 - Block 4 - Chapter 3 - Carillon to MIDI
Running Status • When repeating a message with the same status as the last message • just send the data • the status is implied • Don’t need to use NOTE OFF - just use NOTE ON again with a velocity of 0 • With a lot of notes this can save a lot of status bytes. TA212 - Block 4 - Chapter 3 - Carillon to MIDI
Running Status Example • Without running status: • 146, 60, 64, 146, 64,64, 130, 60, 64, 130, 64, 64 • With running status: • 146, 60, 64, 64,64, 130, 60, 64, 64, 64 Repeated status bytes Repeated status bytes removed TA212 - Block 4 - Chapter 3 - Carillon to MIDI
MIDI File • Standard MIDI File uses the Interchange File Format • like a WAV file • Fixed size Header Chunk • One Track Chunk per MIDI Track TA212 - Block 4 - Chapter 3 - Carillon to MIDI
SMF Header Chunk “MThd” 4 bytes 0: One Track 1: Many tracks played together 2: Many tracks played in sequence Size (always 6 bytes) 4 bytes Format type 2 bytes No. of Tracks 2 bytes Time 2 bytes +ve: number of clock ticks per crotchet -ve: number of ticks between SMPTE Time Frames TA212 - Block 4 - Chapter 3 - Carillon to MIDI
SMF Track Chunk • One Chunk per Track • Each MIDI Event consists of: • Delta Time • MIDI Message • Status Byte • Data Bytes “MTrk” Size MIDI Events TA212 - Block 4 - Chapter 3 - Carillon to MIDI