5. MIDI and the MIDI Keyboard
When you press a key on a MIDI keyboard, the keyboard doesn't make a sound.
It sends a tiny message to the computer: "key 60 went down, fairly hard".
A virtual instrument in your DAW reads that message and makes the sound.
Everything you record from a MIDI keyboard is a list of such messages, and the piano roll is simply that list drawn as a picture.
In this chapter we look at what those messages are: notes, velocity, channels, controllers, pitch bend and program changes.
Then we look at the cables and the latency between your finger and the sound, and at the AKAI Professional MPK Mini Plus, control by control, in terms of the messages each one sends.
After that we use the piano roll as a theory tool: velocity, quantization and note length.
We finish by recording a MIDI take in FL Studio or REAPER and a two-bar groove on the pads.
Why does this matter for theory?
Because MIDI is the most precise notation you'll ever use.
A staff tells a player "play this quarter note, forte"; a MIDI part says "note 67 starts at this tick, lasts 480 ticks and has velocity 96".
Knowing what the numbers mean lets you hear the difference between a stiff, mechanical part and a living one, and fix it.
5.1 MIDI is messages, not sound
A score for machines
MIDI (Musical Instrument Digital Interface) is a standard from 1983 that lets electronic instruments, computers and controllers talk to each other.
The important thing for us: MIDI carries instructions, not audio.
It's much closer to a score, or to the punched paper roll of a player piano, than to a recording.
This has three consequences you'll meet every day:
- The same MIDI take can be played by any instrument. Record a melody with a piano sound, then switch the track to strings or an ocarina sound; the notes stay, the sound changes.
- MIDI can be edited note by note. Move one wrong note, shorten another, soften a third; you can't do that so easily with a recording.
- MIDI only sounds as good as the instrument that plays it. A cheap sound playing a good performance still sounds cheap, and a great sound can't fix a stiff performance.
A MIDI keyboard like the MPK Mini Plus is a controller: keys, pads and knobs that send messages, with no sound engine inside.
The sound comes from a virtual instrument (also called a software instrument or plug-in instrument) in the DAW, or from a hardware synthesizer connected by a MIDI cable.
Anatomy of a message
A MIDI 1.0 message is a few bytes, numbers from 0 to 255.
The first byte, the status byte, says what kind of message it is and on which channel; the following data bytes carry the values.
Status bytes always have their first bit set to 1, and data bytes always have it set to 0, so a data byte can only hold 0 to 127.
That's why almost everything in MIDI 1.0 runs from 0 to 127.
Here are three messages byte by byte, in hexadecimal (base 16, as MIDI documentation writes them), binary and decimal:
- Note On
90 3C 64: the first half of the status byte,9, means Note On, and the second half,0, means channel 1. Then note number3C= 60 (middle C, C4) and velocity64= 100. - Note Off
80 3C 40: the key was released. The third byte is the release velocity, how fast the key came up; most keyboards don't measure it and send 64, and most instruments ignore it. Many devices send a Note On with velocity 0 instead, which means exactly the same thing. - Control Change
B0 40 7F: controller 64 (the sustain pedal) set to 127 (pedal down). We'll come back to controllers in section 5.2.
You never type these bytes yourself; the DAW shows them as notes and lanes.
But seeing them once makes everything else clearer: a note is a pair of events, on and off, and the length of a note is just the time between them.
Note numbers
Every key has a note number from 0 to 127, one per semitone.
Note 60 is middle C, which this series calls C4 (scientific pitch notation, chapter 4); 61 is C♯4, 62 is D4, and 72 is C5, one octave (12 semitones) higher.
Note 69 is A4 = 440 Hz, so with equal temperament (chapter 2) a note number n has the frequency
Note 0 is C−1 (about 8.2 Hz) and note 127 is G9 (about 12,544 Hz), far beyond any piano.
A message only says "note 64"; it says nothing about E or F♭ or about octave names.
The spelling is your job, and the octave label is the DAW's: some software calls note 60 "C3" or "C5" instead of C4.
Chapter 4 explains this and how FL Studio and REAPER label it; when in doubt, trust the number, not the name.
Velocity
Velocity is the second data byte of a Note On: how fast the key went down, from 1 (barely) to 127 (as hard as possible).
The keyboard measures the time the key takes to travel between two sensors and turns it into a number.
What happens with that number is up to the instrument.
Most instruments make high velocities louder, and good ones also make them brighter, because real instruments behave that way: a piano hammer that hits harder excites more high overtones (chapter 2).
The figure shows both effects, measured on the synthesized piano used in this chapter's audio examples.
On the right, brightness is measured as the spectral centroid, the "center of gravity" of the spectrum; a higher centroid means more energy in the high overtones.
Every instrument has its own curve, and many let you change it ("velocity curve", "velocity sensitivity").
Controllers have one too: the MPK Mini Plus's editor software has a key curve setting that changes how the keys respond to your touch, so that a soft player can still reach 127.
Velocity is where dynamics live in MIDI, so it's worth hearing.
Here's an original two-bar phrase with every note at velocity 80:
And here's the same phrase with velocities from 60 to 110, rising to the top note A4 and falling away at the end, the way a player would shape it.
Listen for the arch, and for the last note being softer than the first:
Same notes, same timing; only the third byte of each Note On changed.
Channels
The second half of the status byte is the channel, 1 to 16 (stored as 0 to 15).
Channels let one cable carry up to 16 independent parts: a keyboard sends on channel 1, a drum machine listens on channel 10, a synth on channel 2 ignores both.
Inside a DAW, each track usually has its own instrument, so you rarely think about channels.
They matter when one device plays several parts, when the keys and the pads of a controller should go to different instruments, and with General MIDI, where channel 10 is the drum channel (section 5.2).
Practice
Press one key of your keyboard ten times, from as soft as you can to as hard as you can, while recording.
In the piano roll's velocity lane (section 5.5), check the lowest and highest numbers you reached.
Then try to play five notes all at velocity 80 ± 10; it's harder than it sounds, and it's the first velocity exercise of chapter 6.
5.2 Shaping the sound: controllers, pitch bend and programs
Control Change
A Control Change (CC) message has a controller number (0 to 127) and a value (0 to 127).
Knobs, faders, wheels and pedals send CC messages, and the instrument decides what each number controls.
Some numbers have standard meanings that most instruments follow:
| CC | Name | Typical use |
|---|---|---|
| 1 | Modulation | the mod wheel; usually vibrato or another movement |
| 7 | Channel Volume | the part's overall volume, set once |
| 10 | Pan | left–right position (64 = center) |
| 11 | Expression | volume changes inside a phrase (crescendo, swell) |
| 64 | Damper pedal (sustain) | on/off: 0–63 = off, 64–127 = on |
| 74 | Sound Controller 5 | by default brightness; often a filter cutoff |
| 91, 93 | Effects 1 and 3 depth | by default reverb and chorus send |
Volume (7) and expression (11) both change the volume, and they're meant to be used together: set CC 7 once to balance the part in the mix, and draw CC 11 to shape phrases within it.
Switch-type controllers like 64 treat values 0 to 63 as off and 64 to 127 as on.
Many instruments let you assign any CC to any parameter ("MIDI learn"), so the table is a convention, not a law.
The sustain pedal
The sustain pedal (damper pedal) is the controller you'll use most as a keyboard player.
Pressing it sends CC 64 = 127; releasing it sends CC 64 = 0.
While it's down, released notes keep sounding, like a piano's dampers lifted off the strings.
In this example, a left-hand-style broken chord is played with short notes (the yellow bars).
The pedal lane underneath shows the pedal going down just after the first note and being changed, up and down again, exactly at the bar line; the faint bars show how long each note actually sounds:
Without the pedal, every note stops when its key comes up:
With the pedal, the notes of each chord ring together, and the change at the bar line clears the C chord before the F chord starts.
Listen for the fuller sound, and for the short gap-free switch between the two chords:
If the pedal stayed down through both bars, the C and F chords would blur into each other.
Changing the pedal with the harmony is basic keyboard technique (chapter 6), and seeing it in the CC lane is the easiest way to check it.
Continuous controllers in a lane
A knob or a wheel sends a stream of CC messages as you move it, one message per step.
DAWs record them into an automation lane (also called a CC lane or event lane) under the piano roll, and you can draw them with the mouse too.
Here, CC 11 (expression) shapes two bars of an ocarina-like sound: a long crescendo to the top of the phrase, a small dip and a final fade:
Notice that the line is a staircase: MIDI 1.0 controllers only have 128 values, and the DAW sends a new message for each step.
Good instruments smooth the steps so you don't hear them.
Listen for the long held G5 growing and fading although no new note is played:
This is the MIDI equivalent of breath on a wind instrument.
An ocarina player does it with the lungs; a MIDI part needs it drawn or played on a knob, or every long note sounds like an organ.
Pitch bend
Pitch Bend has its own message type, with two data bytes combined into one 14-bit number from 0 to 16,383; 8,192 is the center, no bend.
That gives a much finer resolution than a CC, which matters because the ear notices small pitch steps.
How far a full bend goes is set by the receiving instrument, not by the wheel: a range of ±2 semitones is a common default, and many synths let you set 12 or more.
So if your pitch wheel bends a whole tone on one instrument and an octave on another, nothing is broken.
For a guitar-like bend from D to E, set the instrument's range to 2 and push the wheel all the way up.
Aftertouch
Aftertouch (pressure) is sent while a key or pad is held down and you press harder.
Channel pressure sends one value for the whole channel; polyphonic aftertouch sends a value per note.
The instrument decides what pressure does, often vibrato, brightness or volume.
On the MPK Mini Plus, the user guide describes aftertouch only for the pads (section 5.4).
Program Change and General MIDI
A Program Change message selects a sound (a "program" or "patch") on the receiving instrument, with one data byte: 128 programs, usually shown as 1 to 128.
On its own, program 25 means nothing; it depends on the instrument.
General MIDI (GM), published in 1991, fixed a standard list so that a MIDI file plays roughly as intended on any GM device: 128 named programs, all 16 channels, at least 24 notes at once, and channel 10 for drums, where each note number is a drum sound instead of a pitch.
A few GM programs that match this series' instruments: 1 Acoustic Grand Piano, 25 Acoustic Guitar (nylon), 80 Ocarina, 117 Taiko Drum, plus 78 Shakuhachi, 107 Shamisen and 108 Koto.
The drum map uses notes 35 to 81; for now, three of them are enough: 36 bass drum (kick), 38 snare and 42 closed hi-hat.
Chapter 18 covers the drum map in detail.
In a DAW you'll mostly choose sounds by loading plug-ins, but GM is still what many MIDI files expect.
MIDI 2.0
In January 2020 the MIDI Manufacturers Association adopted the core specifications of MIDI 2.0.
It adds much higher resolution (for example 32-bit controller values instead of 7-bit) and two-way communication, so devices can ask each other what they can do, and it stays backward compatible with MIDI 1.0 devices.
Everything in this chapter is MIDI 1.0, which is what the MPK Mini Plus and most controllers speak, and what every DAW understands.
Common mistakes
- Hanging notes. If a Note Off gets lost (for example when you stop playback while holding a key, or cut a note in half while editing), the note sounds forever. Most DAWs have a "panic" or "all notes off" command.
- Sustain that never ends. A take that starts with the pedal already down, or a CC 64 = 127 event without a matching 0, keeps every following note ringing. Check the CC 64 lane.
- Using CC 7 for crescendos. It works, but then the mix balance and the phrasing fight over the same knob. Use CC 11 for phrasing.
- Blaming the keyboard for the bend range. The receiving instrument sets it.
5.3 Cables, drivers and latency
USB and class compliance
Modern controllers like the MPK Mini Plus connect with a single USB cable that carries both MIDI and power.
They're class compliant: they follow the USB MIDI device class, so the operating system's built-in driver handles them and you don't install a driver.
Plug it in, and the DAW should list it as a MIDI input.
(The MPK Mini Plus has a USB-B socket; a computer with only USB-C ports needs a USB-B to USB-C cable or adapter.)
5-pin DIN and TRS
Before USB, MIDI traveled over a cable with round 5-pin DIN plugs, and it still does between hardware synthesizers, drum machines and controllers.
It runs at 31,250 bits per second, which sounds slow but is plenty for notes: a three-byte Note On takes about 1 ms.
MIDI Out sends; MIDI In receives; a cable always goes from an Out to an In.
The MPK Mini Plus has both, so it can play a hardware synth directly, without a computer.
Small devices often use 3.5 mm TRS jacks with an adapter cable instead.
In 2018 the MIDI standards bodies published a recommended practice for TRS MIDI that follows the wiring KORG had used; some other manufacturers had used a different wiring, so a TRS adapter from one brand doesn't always work with another.
Check the manual before you buy an adapter.
Latency and buffer size
Latency is the delay between pressing a key and hearing the sound.
The MIDI message arrives almost instantly; most of the delay comes from the audio side.
The computer calculates sound in small blocks called buffers, and a block can only be heard after it's finished:
| Buffer size | At 44,100 Hz | At 48,000 Hz |
|---|---|---|
| 128 samples | 2.9 ms | 2.7 ms |
| 256 samples | 5.8 ms | 5.3 ms |
| 512 samples | 11.6 ms | 10.7 ms |
| 1,024 samples | 23.2 ms | 21.3 ms |
That's for one buffer; the real total is somewhat higher because the audio interface and driver add their own delays.
Under about 10 ms, playing feels immediate; around 20 ms and more, fast notes feel sluggish, and you start to play ahead of the beat to compensate.
Small buffers cost more CPU time, and if the computer can't keep up you hear clicks and dropouts.
So the usual rule is: small buffer while recording, larger buffer while mixing.
On Windows, use an ASIO driver (FL Studio installs its own, "FL Studio ASIO"; REAPER can use any ASIO driver) rather than the generic one for low latency; on macOS, Core Audio is low-latency already.
Both DAWs set the buffer size in their audio settings.
5.4 The MPK Mini Plus, message by message
The AKAI Professional MPK Mini Plus is a compact controller with 37 keys, 8 pads, 8 knobs, a joystick and pitch and mod wheels.
This section describes the original MPK Mini Plus from its user guide (version 1.2) and AKAI's support pages; AKAI has since released a second-generation model, so if you own that one, check its own guide.
The figure is a simplified diagram, not a picture of the real layout:
I won't repeat the manual here; instead, let's translate each control into the messages it sends.
Keys, octave and transpose
The 37 velocity-sensitive keys send Note On and Note Off with velocity.
They cover three octaves, from a C to the C three octaves above.
The Octave buttons shift the whole keybed by up to four octaves down or up, and Transpose (in the global settings) shifts it by up to 12 semitones either way.
Pressing both Octave buttons together returns the keyboard to its default center octave.
AKAI's user guide doesn't say which notes the keys play at that octave; this series draws them as C3–C6 (MIDI 48–84), but check your own unit: press the lowest key and read the note in your DAW's piano roll (FL Studio labels MIDI 48 as C4, REAPER as C3, see below).
To reach another octave, for example to put C5 (MIDI 72) under your hand, press the octave buttons and check the lowest key again.
Neither the octave buttons nor Transpose changes the keys you press; they change the note numbers that are sent.
That's handy, and also a classic source of confusion: if your C suddenly plays a D, look at the transpose setting first.
The keys send on the global MIDI channel, which you can set from 1 to 16.
Wheels and joystick
The pitch wheel sends Pitch Bend and springs back to the center.
The mod wheel sends a Control Change for modulation and stays where you leave it.
The X-Y joystick can send Pitch Bend or a CC on each axis and direction, which you set in the Edit menu; AKAI's support page notes that it does nothing in a DAW until it's assigned.
Pads
There are eight velocity-sensitive pads, and the Bank A/B button switches between two banks, so you get 16 pad slots.
Each pad can send a note (the usual choice, for drums), a Program Change or a CC, and can be set to "toggle" (press once for on, again for off).
The pads can also send aftertouch, either channel pressure or polyphonic, or none.
They have their own MIDI channel setting, separate from the keys, so the keys can play a piano on channel 1 while the pads play drums on another channel.
Full Level makes every pad hit send velocity 127, useful for programming drums at a constant level and annoying if you forget it's on.
Note Repeat retriggers a held pad at the current tempo and time division (for example sixteenth notes), the classic way to play hi-hat rolls and fast repeated notes.
That tempo is the controller's own, so set it to your DAW's tempo, or set the Clock setting (which the user guide describes with the arpeggiator) to External, so the controller follows MIDI clock sent by the DAW; the DAW must then be set to send clock to the controller's port.
Knobs
The eight 360° knobs each send one CC message.
In absolute mode a knob sends its position as a value between a low and a high limit; in relative mode it sends "a little up" or "a little down", which works better with DAW parameters that can also move on their own.
You choose the CC number per knob; then map it in your instrument or DAW, or use the standard numbers from section 5.2 (for example 11 for expression or 74 for brightness).
Arpeggiator, chords, scales and the sequencer
These features don't just pass your playing on: they generate Note On and Note Off messages for you.
- The arpeggiator turns a held chord into a pattern of single notes (modes Up, Down, Inclusive, Exclusive, Order and Random), at a time division from quarter notes to 32nd-note triplets, over one to four octaves, with swing and latch (the pattern keeps going after you let go). The tempo comes from Tap Tempo, the internal clock or an external clock. Arpeggios are broken chords; chapter 11 explains what to feed them.
- Chords mode plays a whole chord (triads, sevenths and more, with inversions) from one key.
- Scales mode restricts the keys to one of 16 scales; notes outside the scale are ignored or moved to a scale note.
- The sequencer records and plays back patterns inside the controller: a step editor with up to 64 steps, each holding up to 8 notes with velocity and length, and a live drum sequencer for the pads. It can play your DAW's instruments, hardware synths or anything else that receives MIDI.
Chords and Scales modes are useful tools, but they're not a substitute for knowing chords and scales.
If you use Scales mode before chapters 9 and 10, you'll play the right notes without knowing why they're right.
My advice: leave them off while you work through this series, and switch them on later when you know what they're doing.
Transport, programs and the editor
The transport buttons (rewind, fast-forward, stop, play, record) send MIDI messages that a DAW can map to its own transport; the Seq button starts and stops the internal sequencer.
The display, the encoder and the settings menus decide what every other control sends, and eight program slots store complete setups, so you can keep one for drums and one for synth work.
AKAI's MPK Mini Plus Editor software does the same on the computer screen, and the firmware updater keeps the controller current; AKAI recommends updating the firmware first.
Rear panel: sustain, MIDI and CV
- USB-B: MIDI to and from the computer, and power.
- Sustain input: connect a sustain pedal (sold separately); it sends CC 64.
- MIDI In and Out: full-size 5-pin DIN sockets for hardware.
- CV/Gate outputs (pitch, gate and mod, 3.5 mm) and clock in and out: these are not MIDI at all. They send voltages for analog and modular synthesizers: one voltage for the pitch, an on/off voltage while a key is held, and one for modulation or velocity. If you don't own such gear, ignore them.
Practice
For each control, find out what it sends by recording it.
Record-arm a MIDI track, press record, and in one take: play a few keys at different strengths, move the pitch wheel, the mod wheel and the joystick, turn two knobs, hit two pads and press the sustain pedal if you have one.
Then open the take and find each gesture: notes and velocities in the piano roll, and pitch bend, CC 1, the knobs' CCs and CC 64 in the controller lanes.
If something doesn't show up, it's either not assigned yet, or your DAW filters it (both FL Studio and REAPER can record controller data, but they show it in different places).
5.5 The piano roll as a theory tool
Notes on a grid
The piano roll draws each note as a bar: the left edge is the Note On, the right edge the Note Off, the height the note number.
Time runs to the right, pitch goes up, and the grid lines are bars, beats and subdivisions, exactly the meter of chapter 3.
Here is the original phrase from the velocity examples on a staff, so you can compare the two notations:
The staff shows durations with note shapes; the piano roll shows them with lengths.
The staff spells notes (E or F♭) and the piano roll can't; the piano roll shows exact timing and velocity, and the staff can't.
Drawing notes with the mouse is a perfectly good way to compose, and it's a great way to practice theory: write the interval, the chord or the rhythm, then listen to it.
The velocity lane
Under the notes, the velocity lane shows each note's velocity as a vertical line (a "lollipop").
You can drag the lines, draw ramps across many notes, or select notes and scale their velocities.
Use it to check your playing and to shape a phrase: a crescendo is a ramp in the lane, an accent is one tall line, and a phrase that "breathes" has a rise and fall like the second velocity example.
Quantization: grid and strength
Nobody plays exactly on the grid, and that's not a flaw.
But sometimes notes land so far off that the part sounds sloppy, and then you quantize: the DAW moves note starts to the nearest grid line.
Two settings matter:
- Grid: which grid lines count, for example eighth notes or sixteenth notes. Choose the smallest note value the part actually uses; quantizing eighth-note triplets to a sixteenth grid will wreck them.
- Strength (or amount): how far each note moves toward the grid. 100% puts it exactly on the line; 50% moves it halfway, keeping some of the original feel.
Most DAWs quantize the note starts, and can optionally quantize the ends or lengths too.
Here's a take of the phrase as played, and the same take quantized at 100%; the orange shadows show where the notes were played:
Each clip has one bar of quiet clicks first.
As played, some notes rush and some drag by up to about 80 ms; listen especially to the G4 on beat 2 and the quick notes of bar 2:
Quantized at 50%, every note has moved halfway to the grid; it's tidier but still has some push and pull:
Quantized at 100%, every note is exactly on the grid:
Notice that quantizing didn't touch the velocities: the dynamics of the performance survive.
Also notice the note lengths: they're still the played lengths, which is what you want here.
A good habit: quantize a copy, compare it with the original, and often settle for something between 50% and 100%.
Swing and humanize
Swing delays every second subdivision (for example every off-beat eighth), turning straight eighths into a long–short lilt.
Most quantize functions have a swing setting, and the MPK Mini Plus arpeggiator has one too.
Humanize does the opposite of quantizing: it moves notes and velocities by small random amounts so that a drawn part sounds less mechanical.
Random isn't the same as human, though: real players are early and late in patterns.
Both belong to groove, and chapter 18 goes into them properly.
Note length and articulation
In notation, a quarter note marked staccato is still a quarter note; in the piano roll, it's a short bar followed by silence.
In MIDI, articulation is note length:
- Legato: each note lasts until the next one starts, or overlaps it very slightly. On many synths and wind instruments, overlapping notes trigger a slide (portamento) or a smooth transition without a new attack.
- Normal (non-legato): notes end a little before the next one, around 80 to 95% of their value. This is how most played notes look in a take.
- Staccato: short notes, perhaps a third to a half of their value, with clear gaps.
A drawn melody with every note exactly filling its grid cell sounds like an organ played by a computer.
When a drawn part sounds stiff, look at the lengths before you look at anything else.
Common mistakes
- Quantizing everything to 100% by reflex. It removes mistakes and life together. Try 50 to 80% first.
- Quantizing to the wrong grid. Triplets and swung notes get pulled onto a straight grid and the rhythm changes. Choose the grid from the music.
- Ignoring the velocity lane. All notes at velocity 100 is the most common sign of a drawn part.
5.6 Recording MIDI
In your DAW
These steps are the minimum to get sound from the keyboard and record a take.
They're based on the official manuals at the time of writing; menus change between versions, so if something has moved, search the manual for the same words.
FL Studio:
- Connect the keyboard and open Options > MIDI settings (F10).
- In the Input list, click your keyboard, click Enable and, unless a dedicated script is offered, choose the generic controller type.
- In the Channel Rack, click the channel of an instrument (for example FL Studio's default piano or any plug-in instrument). The selected channel responds to the keyboard.
- To record, switch to Pattern mode, arm the Record button in the transport (right-click it and check that Note is ticked), turn on the countdown if you want a count-in, and press Play. The notes go into that channel's piano roll.
REAPER:
- Connect the keyboard, open Options > Preferences > Audio > MIDI Inputs, right-click your keyboard and choose Enable input.
- Use Insert > Virtual instrument on new track, and choose an instrument such as ReaSynth (included with REAPER). REAPER creates the track, arms it and opens the instrument.
- Check the track's record input (right-click the arm button): MIDI, your keyboard, all channels, and input monitoring on.
- Press Ctrl+R (or the record button) to record and play.
If you hear nothing, go through REAPER's own checklist, which applies to any DAW: is the device enabled, is it the track's input, is the channel right, is the track armed, is monitoring on, and is the instrument listening on that channel?
Remember chapter 4's octave note: the piano roll may label middle C differently from this series, but note 60 is note 60.
FL Studio labels note 60 as C5; REAPER labels it C4 by default, and its "MIDI octave name display offset" preference can shift the labels.
Press your controller's lowest key once and note which number it sends: that tells you where every other key is.
Recording a take.
Set the tempo and turn on the metronome with a one-bar count-in.
Play the part two or three times in a row, or record several takes, and keep the best rather than fixing a bad one.
Leave input quantization off while you're learning: you want to see your real timing first, and you can always quantize afterwards.
On your instruments
Keyboard and pads.
The pads are for drums and short sounds.
Choose three pads and set (or map) them to the GM drum notes 36 (kick), 38 (snare) and 42 (closed hi-hat), and load a drum instrument on their channel.
Here's a two-bar groove at 90 BPM, played twice; each square is a sixteenth note, and the brighter the square, the higher the velocity:
Listen for the hi-hat accents on each beat and the kick that moves in the second bar:
Play it with two hands: kick and snare with one, hi-hat with the other, slowly with the metronome; chapter 6 covers finger drumming.
Ocarina.
An ocarina makes sound with your breath, so you record it as audio, with a microphone.
Its pitch and loudness change continuously with breath pressure (chapter 7), which no MIDI note captures; an ocarina recording is a performance, not a list of notes.
MIDI is still useful for ocarina players: you can draw an ocarina part with an ocarina sound (GM program 80, or any ocarina plug-in) to test an arrangement, check that it stays inside your ocarina's range, and only then record the real instrument.
If you do, draw the breath with CC 11, as in section 5.2.
Classical guitar.
Record it as audio too, with a microphone about 30 cm from where the neck meets the body.
A guitar's pluck, slides and vibrato are part of the sound; MIDI guitar parts drawn in a piano roll need a lot of articulation work to sound convincing.
Taiko.
Record a real taiko as audio, with care: it's very loud up close, so keep the microphone a few meters away and turn the input level down.
Taiko patterns are also easy to sketch in MIDI on the pads, either with a taiko sound (GM 117 is one, and many sample libraries have better ones) or a kick for ドン and a rim click for カッ; chapter 19 is all about taiko.
Audio to MIDI.
Some DAWs and plug-ins can detect the pitches in an audio recording and turn them into MIDI notes.
It works best on a clean recording of one note at a time, like an ocarina or a voice, and much less reliably on chords, such as a strummed guitar.
Treat the result as a draft: check the notes, fix the ones that slide or wobble, and expect to redo the velocities.
It's a good way to get a melody you've played on the ocarina into the piano roll, so you can write chords under it.
Practice
Record the phrase from section 5.5 three times on the keyboard at 80 BPM.
Don't edit anything: open the best take in the piano roll and write down three things you see, for example "the E4 in bar 1 is late", "bar 2 is softer than bar 1", "all my notes are short".
5.7 Summary
- MIDI carries messages, not sound: Note On and Note Off with a note number (0–127, 60 = C4) and a velocity (1–127). A note's length is the time between its on and off.
- A message is a status byte (type + channel 1–16) followed by data bytes (0–127), for example
90 3C 64= Note On, channel 1, note 60, velocity 100. - Velocity usually controls loudness and brightness; the curve depends on the instrument and the controller.
- Control Change messages carry controllers: 1 modulation, 7 volume, 10 pan, 11 expression, 64 sustain pedal (0–63 off, 64–127 on). Pitch Bend has 14 bits, and its range is set by the receiving instrument. Aftertouch sends pressure per channel or per note. Program Change selects a sound; General MIDI standardizes 128 programs and channel 10 for drums. MIDI 2.0 (2020) adds resolution and two-way communication.
- USB controllers are class compliant and need no driver; 5-pin DIN and TRS connect hardware. Latency comes mostly from the audio buffer: buffer size ÷ sample rate.
- The MPK Mini Plus sends notes from its keys and pads, Pitch Bend and CCs from its wheels, joystick and knobs, CC 64 from a sustain pedal, and generates notes with its arpeggiator, chords, scales, note repeat and sequencer. Octave and transpose change the note numbers sent; CV/Gate outputs are voltages, not MIDI.
- In the piano roll, edit timing with quantization (grid and strength), dynamics in the velocity lane and articulation with note lengths. Swing and humanize are covered in chapter 18.
- Acoustic instruments (ocarina, guitar, taiko) are recorded as audio; MIDI is for sketching their parts, and audio-to-MIDI can turn a single-note recording into a draft.
5.8 Key terms
| English | 日本語 | Note |
|---|---|---|
| MIDI | MIDI | Musical Instrument Digital Interface |
| message | メッセージ | a few bytes: an instruction, not a sound |
| controller (device) | MIDIコントローラー | keys, pads and knobs without a sound engine |
| virtual instrument | ソフトウェア音源 | a plug-in that turns MIDI into sound |
| status byte / data byte | ステータスバイト / データバイト | first bit 1 / first bit 0 |
| Note On / Note Off | ノートオン / ノートオフ | key down / key up |
| note number | ノート番号 | 0–127, 60 = C4 |
| velocity | ベロシティ | how hard a key was struck, 1–127 |
| MIDI channel | MIDIチャンネル | 1–16 |
| Control Change (CC) | コントロールチェンジ | controller number + value |
| modulation | モジュレーション | CC 1 |
| expression | エクスプレッション | CC 11 |
| sustain (damper) pedal | サステインペダル(ダンパーペダル) | CC 64 |
| pitch bend | ピッチベンド | 14-bit, range set by the receiver |
| aftertouch | アフタータッチ | pressure after the key is down |
| Program Change | プログラムチェンジ | selects a sound |
| General MIDI (GM) | GM(ジェネラルMIDI) | 128 programs, drums on channel 10 |
| class compliant | クラスコンプライアント | works with the OS's own driver |
| latency | レイテンシー | delay from key to sound |
| buffer size | バッファサイズ | samples calculated per block |
| piano roll | ピアノロール | time × pitch grid |
| velocity lane | ベロシティレーン | velocities under the notes |
| automation lane | オートメーションレーン | controller values over time |
| quantize | クオンタイズ | move notes to the grid |
| quantize strength | クオンタイズの強さ | how far notes move, 0–100% |
| swing | スウィング | long–short subdivisions (chapter 18) |
| humanize | ヒューマナイズ | small random changes |
| articulation | アーティキュレーション | how notes are connected or separated |
| legato / staccato | レガート / スタッカート | connected / detached |
| arpeggiator | アルペジエーター | turns held chords into patterns |
| note repeat | ノートリピート | retriggers a held pad in tempo |
| step sequencer | ステップシーケンサー | a pattern entered step by step |
| audio to MIDI | オーディオからMIDIへの変換 | pitch detection of a recording |
5.9 Challenges
- ★ Write the three bytes, in hexadecimal, of a Note On for A4 (note 69) with velocity 80 on channel 1, and the matching Note Off as a Note On with velocity 0.
- ★ What does the message
B9 07 64do? Name the message type, the channel, the controller and the value. - ★ Play one key eight times, aiming for velocities 30, 50, 70, 90, 110, 127, 90, 50, record it, and check in the velocity lane how close you got.
- ★★ Listen to the flat and varied velocity clips, then draw the phrase yourself with three different velocity shapes (rising, falling, arch) and describe in one sentence each how the phrase feels.
- ★★ Record four bars of steady eighth notes on one key at 90 BPM. Make three copies quantized to eighths at 100%, 75% and 50%, and decide which one you'd keep and why.
- ★★ Work out the one-buffer latency at 44,100 Hz for buffers of 64, 256 and 2,048 samples, then try playing your keyboard with the smallest and largest buffer your DAW allows, and write down where it starts to feel late.
- ★★ Draw the phrase in three articulations by changing only the note lengths: legato (each note touching the next), normal (90%) and staccato (40%). Listen and describe the differences.
- ★★★ Record a slow melody of long notes with an ocarina, flute or string sound, then draw (or play on a knob) a CC 11 curve that makes it breathe like a wind player. Compare it with the version without CC 11.
5.10 Practical assignment
Record a melody from the keyboard, study it in the piano roll, compare it with a quantized copy, and add a two-bar pad groove.
You need a DAW, a MIDI keyboard (pads for step 6; drawing with the mouse works too) and headphones.
Total time: about 60 to 90 minutes.
Steps.
- Setup (10 minutes). Get the keyboard playing a piano instrument as in section 5.6. Set the buffer size to 256 samples or less, the tempo to 80 BPM and the metronome on with a one-bar count-in.
- Choose the melody (5 minutes). Use the short melody you read in chapter 4's practical assignment, or this chapter's phrase (section 5.5). Play it a few times until you can play it without stopping.
- Record (10 minutes). Record three takes without input quantization. Keep the best take and name it "original".
- Inspect (10 minutes). Open the take in the piano roll. Write down the highest and lowest velocity, the note that's furthest off the grid (early or late, roughly by how much), and whether your notes are mostly long or short compared with the grid.
- Quantize and compare (15 minutes). Duplicate the take twice. Quantize one copy to eighth notes at 100% and the other at 50%. Listen to all three, one after the other, and write one sentence about each. Then improve the velocities of the version you like best in the velocity lane, so the phrase rises and falls.
- Pad groove (15 minutes). On a new drum track, play or draw the two-bar groove from section 5.6 (kick 36, snare 38, closed hi-hat 42), or your own variation. Quantize it if needed, but keep the hi-hat velocities uneven.
- Put it together (10 minutes). Loop the groove under your melody for four bars, listen and save the project. If you have a sustain pedal, record one more take of the melody with the pedal and look at the CC 64 lane.
Self-check.
A successful result shows:
- The take's notes are the right pitches in the right octave, with note 60 where you expect middle C.
- The velocity lane isn't flat: your notes vary, and in the final version they shape the phrase.
- You can point to at least one note that moved when you quantized, and you can hear the difference between the 50% and 100% versions.
- The groove has kick, snare and hi-hat on the right steps, and it loops without a gap or a stumble at the bar line.
- Melody and groove start together, and nothing keeps sounding after you press stop.
Mistakes to look for:
- All notes early: the buffer was too large while recording, or you're anticipating the click. Record again with a smaller buffer.
- The melody sounds an octave off: an octave or transpose setting on the controller. Reset both to 0.
- A note sounds forever: a missing Note Off or CC 64. Use the DAW's "all notes off", then fix the note or the pedal event.
- The groove sounds like a machine gun: Full Level is on, so every pad hit has velocity 127. Turn it off and play again.
コメント(0)
まだコメントはありません。
ログインするとコメント出来ます。