Saturday, February 7, 2015

MIDI Madness on an iPad

As I post often, my music is mostly created with MIDI tracks from either soft synths, MIDI controllers or sequenced MIDI patterns. MIDI makes it easy for me to correct any errors or mistakes. MIDI lets me swap in and out different samples, synths or instruments without having to rerecord anything. Its the best thing going in modern music in my opinion!

On the desktop, I use Logic X and normally create many MIDI tracks that I eventually bounce down into finished songs (or long sequences of annoying noise depending on your point of view). On the iPad as I write often, I want the same easy experience I have on Logic X with MIDI and sadly, that is not yet possible.

Many DAWs on the iPad support MIDI and some also support Virtual MIDI to control other apps running at the same time but none of them do so as seamlessly as VSTs or AUs on the desktop. The "gold standard" and closest candidate for me is Cubasis.

I've posted a few times about using MIDI with Cubasis with InterApp Audio and Virtual MIDI but to be honest, doing this is very crash-prone and I've been experimenting quite a bit with simplifying the process. I recently found a pretty good workflow for working with MIDI and I'll step through one method that works pretty well for me.

Recently I posted the piece below using Cubasis, Korg Module Synthology piano and Noatikl:

This piece required getting 3 iOS apps to "play nice" together - Cubasis, Noatikl and Korg Module. I decided to minimize my variables by only using InterApp Audio when necessary and only a few sounds. This is a piano piece and I want the left and right hands to sound "real" and produce a credible piano solo. Virtual MIDI by itself is a challenge, so I defer using IAA and bouncing until I get the basic sounds working and then recorded.

The composition tool for me (as is often the case) is Noatikl. Rather than go into its details, I'll describe what I used it to accomplish (see my tutorial if you want to dig deeper into Noatikl).

I loaded up Korg Module with one of the Synthology piano samples. Unfortunately Korg Module does not let you specify what MIDI channels it listens to but it does support Virtual MIDI in Omni mode (meaning that all MIDI being fed will trigger notes). On this piece, I'll use that to my advantage.

With Korg Module loaded (and background audio enabled from its setup menus), I next load Intermorphic's Noatikl which I will use to "program" the music for this piece. I want to define 2 "voices" in Noatikl which will emit MIDI notes and events. One voice will the the "left hand" of the piano, the other will be the "right hand".

At first the main order of business is to create something that sounds good - so I picked a Lydian scale and 7/4 time (to be weird) in Noatikl and programmed a chord pattern derived from a classic 2-5-1 sequence (2nd note of scale, 5th note, a few others, then back to 1st note). By giving Noatikl an octave range and a rhythm pattern to follow, it plays those notes across a few octaves in order. Now for the "magic", I ask Noatikl to generate diatonic chords for those notes using 3rds for some chords and 4th for others. For the chords I program the voice to randomly use between 3 and 5 notes (or "fingers').

For the "right hand" I program a simple pattern of eighth notes in the scale, ask it to "auto harmonize" with the other voice, and ask it to run the patter 50% of the time and then a random sequence of quarter, eighth and half notes also harmonized the other 50% of the time. A bit of tweaking and parameter setting in Noatikl and I have a piece that sound pretty good to me. The velocities are lightly randomized, the chord timings are slightly delayed to give a human feel and voila, the sound is  ready to be recorded (which is the hard part!).

The sound from Noatikl over virtual MIDI into Korg Module is good but not perfect! At times, the maximum polyphony is exceeded and I hear a distinct "plunk" sound. This is probably a short-coming of Korg Module that I've read documented elsewhere where lots of sustaining notes are playing at once (I did tweak Noatikl to use the sustain pedal and release it on each bar). This will have to be corrected after recording.

To record the piece, I want to use Cubasis. This is where things get tricky with Virtual MIDI as to who drives what. Korg Module is already "listening" to all MIDI channels coming out of Noatikl and I don't want Cubasis feeding it as well. So in Cubasis, I create 2 MIDI tracks, and set the instrument to "None". I just want the MIDI notes recorded. For the MIDI source, I select each Noatikl track number and MIDI channel. So track one is listening to MIDI track 1 in Noatikl and track 2 is listening to track 2 in Noatikl. I make sure that both tracks have MIDI output as None - remember, Korg Module is already playing the MIDI from Noatikl - don't want to feed it twice!

So in theory, we hit "record" in Cubasis, start Noatikl playing the tune and away it goes. Bad news though - when Cubasis first gets MIDI notes from Noatikl, it crashes and restarts (ah the wonder of iPads!). So as a work-around, we start Noatikl playing first, open Cubasis (crash/restart), and then press record - it will pick up with what is currently playing.

We let this go to the end of the song, press stop and we should have good MIDI notes in two tracks in Cubasis. If this worked out OK, we are done with Noatikl. To save memory, I close Noatikl, go back to the two tracks in Cubasis and set their output to "Virtual MIDI". Now Cubasis will "drive" Korg Module.

Playing it back at this point sounds good with a few "plunks" here and there. There are two culprits. One I mentioned is the Korg Module polyphony limit and a few others seem to be MIDI generation bugs either in Noatikl or Cubasis. The "bugs" in MIDI sound like "plunks" too and are visible in the MIDI notes as extremely short notes. I find these and either delete them or lengthen them in the Cubasis editor.

The second "plunks" are harder. You have to listen for them, find the measure and delete a few concurrent notes until they sound right. MIDI makes the editing so much easier than working with Audio files!

Now that it all sounds ok, it comes time to "bounce the tracks". I don't use the MIDI/Inter App Audio in Cubasis since I need to record two tracks at once and IAA only allows one instance of an instrument at a time. The easier way is to create an IAA Audio track in Cubasis, set it to listen to Korg Module, arm it to record, disarm the 2 MIDI channels and play the piece. Cubasis will route the MIDI through Korg Module and record the resulting audio into the Audio track.

Having done this, I then mute the two MIDI tracks and export the track to Soundcloud. If this sounds like more work than a desktop DAW, well, it is! But I've found this workflow to be a bit better than what I've done in past tracks requiring multiple passes. Hope this helps someone!

No comments:

Post a Comment