Most audio Time & Pitch editors include a feature to convert audio to MIDI—after all, once the audio’s been analyzed and divided into individual notes, it’s a simple matter to generate a track full of MIDI notes corresponding to that data. Logic, of course, is no exception. In fact, it offers two ways to do this—via the Flex Pitch feature, for melodic material, and with its dedicated Drum Replacement feature, for (non-pitched) drums and percussion. Both methods are very simple to use—at least, it’s simple to get from the audio into a MIDI track. But sometimes it’s not quite so simple to turn the resulting MIDI data into a usable, musical track—several things can get in the way of the new MIDI sequence capturing the feel, dynamics, and playing nuances of the original audio performance. In this article, I’ll focus on using the Flex Pitch conversion feature to generate a MIDI track for instrument replacement, using a recent audio-to-MIDI conversion of a bass track by way of example.
Flex to MIDI
The basic conversion couldn’t be simpler. Once Flex Pitch has been enabled, and the pitch bars are visible in the track, you just call up the “Create MIDI Track from Flex Pitch Data” command, from the Edit menu.
Logic will automatically create a new Instrument track (with the default Instrument) right below the audio track, and the new MIDI data will be there, ready to go. You can then swap out the default Instrument for your preferred Instrument, or, like me, you could have another Instrument track waiting, and just drag the new MIDI Region to that track.
In earlier versions of Logic X, this conversion did not include any Velocity data—all notes were set to a fixed Velocity, making for a kind of one-dimensional MIDI performance—but as part of a recent maintenance update, that omission was rectified. Converted MIDI tracks now include full Velocity data, along with pitch and timing, making the feature much more useful.
Fixing the MIDI
But the new MIDI track may—probably will—need some further tweaking, before it’s ready to be put to use with a Virtual Instrument. As I mentioned above, I recently had the occasion to convert an audio recording of an electric bass part to MIDI. The performance itself was ok—basic pitch & timing were more or less fine—but the recording suffered from a few flaws. First off, there was cable buzz throughout the track. The recordist (a songwriter, not an experienced engineer) had applied compression to the bass on the way in—too much, it turned out, as it brought up every finger squeak and string rattle and thump, to a distracting degree. And the tone of the bass was pretty lackluster, to boot.
We decided to replace the audio with a better, cleaner, tighter-sounding sampled Bass Instrument. Now, one way to approach this might be to use Flex Pitch to edit and clean up, and even pre-Quantize the audio track, before converting to MIDI, and in some cases that might be a good idea. But this time, I decided that it would probably be easier to tweak the MIDI after the fact, so I went ahead and converted the track, and assigned the new MIDI region to a suitable EXS bass patch from my library.
Most MIDI conversions will need some basic processing—this one needed a little extra massaging to get it up to par. The first thing we noticed was that Flex Pitch had interpreted many of the string thumps as low-pitched notes, and they were triggering the bass Instrument. Since the patch was set to mono/legato playback, each thump interrupted a real note, creating a kind of spastic rhythm.
Audio Example 1 Stray MIDI notes (from finger thumps), causing a spastic rhythm:
The cause of this initially mysterious glitching became clear when viewing the note data in the Piano Roll Editor, and those errant pitches were quickly dispatched.
Stray notes like this are actually a fairly common artifact of audio-to-MIDI, and ones that fall within the instrument’s range will probably take a little more time and effort to find and eliminate. While in the Piano Roll Editor, we played through the track, looking for any other obvious conversion artifacts, like missing or incorrectly pitched notes (there’s always a few, especially with bass, where a strong second harmonic often causes the pitch to be interpreted as being an octave higher than it actually is). After fixing a few such flaws, we were ready to move on to other concerns.
Time is tight
The timing of the MIDI track was basically good, but seemed maybe a little behind—this is also common. When Flex Pitch analyzes and identifies notes, it’s based on pitch (frequency) information, as opposed to Flex Time analysis, which goes by Transients. Since Transients are non-pitched (“unvoiced”) sounds, the beginnings of notes may not be included in the note bars that the conversion uses to create the MIDI notes, and so the MIDI notes may start a little later than the actual notes in the audio. For this track, we nudged the MIDI just a little ahead, and the performance seemed to fall back in the pocket.
Had the timing been looser, I might have turned to Quantization. In fact, one reason I decided to defer this kind of editing to after the MIDI conversion was so, if I deemed Quantizing necessary, I could take advantage of Logic’s Smart Quantize feature, available as a hidden popup in the Region Inspector, but currently available only for MIDI Regions. Smart Quantize is the best intelligent partial Quantize feature I’ve some across—it apparently analyzes the note data, and manages to successfully preserve slight musical timing variations and techniques (like flams)—the part is tightened up without loosing all the “feel”, and without having to spend time fussing with the Advanced Quantize options below.

Fig 4 The Smart Quantize option, currently available only for MIDI Regions
Massaging Velocity
Probably the most tweaky aspect of any audio-to-MIDI conversion is getting the interpreted Velocity data to deliver a virtual Instrument track that matches the original in terms of dynamics. There are any number of things that can get in the way. Assumedly, Flex Pitch maps the dynamic range of the audio to the full range of MIDI Velocities (0–127), but this data has no intrinsic correspondence to actual audio dynamics—that’s completely dependent on the Velocity response programmed into the virtual Instrument itself. The conversion may create too wide, or too narrow a range of Velocities—after all, the conversion algorithm has no way of knowing how the target virtual Instrument will be set up to respond to Velocity.
Of course, one way you could try to match the Velocity information in the converted MIDI track to the chosen Instrument would be to actually dig into the Instrument’s programing, and tweak the response there, but that’s usually an unrealistic approach—even if you’re familiar with the Instrument’s parameters, it’s too much of a brute force way to go about it. Instead, the best approach is usually to simply alter the Velocity curve of the MIDI note data, and there are three ways to go about this in Logic.
For occasional stray notes that jump out or get buried, you could go back into the Piano Roll editor, where you can probably spot them easily, thanks to the Velocity color-coding (orange/red are the loudest notes, deep purple/blue are the softest). For the bass track in the example, I quickly located a number of passing tones that were too loud (by color and position), rubber-banded them all, and used the Velocity Tool to drag them down to a more appropriate level.
For overall adjustment of the Velocity curve—to match the performance to the Instrument’s programmed Velocity response (in terms of level, attack, and timbral variation)—there are two places you can go for quick tweaks. Right there in the Region Inspector are two (non-destructive) Velocity parameters—Velocity and Dynamics. Dynamics lets you apply Velocity compression or expansion, based around the MIDI Velocity midpoint of 64 (out of 127)—lower values compress, higher ones expand. Once you’ve dialed up a more appropriate Velocity range, you can then scale that up or down with the Velocity parameter. For the bass track in question, a Dynamic setting of 88% compressed the dynamics nicely and a slight offset of about +8 or so placed the Instrument’s overall level & tone in the sweet spot for that track/Instrument combination. If necessary, you can divide the MIDI region up into sections, and apply slightly different values for verses, choruses, etc., as appropriate.
The other way to accomplish the same thing is via Logic’s MIDI plug-ins—in this case the Velocity Processor plug-in. This also dials up non-destructive Velocity curves, with several options. You can create a curve visually (Comp./Exp. mode), or the Add/Scale mode offers the same approach as the Region Inspector’s Velocity & Dynamics settings. Tweaking Velocity via a plug-in applies the curve to all Regions in the track, while doing it via the Inspector applies the tweaks Region by Region—either approach works equally well.
Pick your sound
Since I have a collection of bass patches that I’ve programmed to all have the same musical response to Velocity data, once I’d tweaked the Velocity with one bass, I could swap out any of them, until I found just the right one, and be assured of an appropriate performance response from all the patches.
Audio Example 2 The original audio track (4 bars), and the converted, fine-tuned MIDI track triggering several different virtual Instrument bass patches (4 bars each):
However, if the Instruments you’re thinking of using all come from different sources, you might want to audition them and settle on the one you’ll want to use before further tweaking the MIDI, even if the response is not yet ideal, since the fine-tuning will most likely need to be different for each Instrument.
The rub
So, this may all sound a bit complex, but if you do it a few times, and get used to the procedure, it actually can go pretty quickly and efficiently. Of course, sometimes a converted MIDI track will just drop in with little or no need for fine-tuning (especially with simpler sounds, like a synth with a fixed Velocity response), but when you need the new MIDI part to be a musically flawless substitute for the audio recording, with good patch and a little practice these techniques should be able to get you there.
Discussion
Want to join the discussion?
Create an account or login to get started!