Hello Cakewalk and forumers!
I want to describe a strange problem with MIDI out and looping, that seem to be present in Sonar back from its early versions. Now at last after some proper experimenting I narrowed it down and request it to be analyzed and hopefully fixed. I frequently use VST synths MIDI out, trying to do some “berlin school” and generative music, so this problem bothers me quite a lot.
You’ll see what I mean. To reproduce it, please set up a little experiment. it may seem tricky, but I tried to describe everything in detail. I tested this in Sonar 8.5.3 and X3)
Experiment 1. Record your midi out in loops and compare with initial notes sequence. To do that:
- Load some MIDI-VSTi plugin and enable MIDI Out on it.
- Insert new “IN” midi track and set its output to your MIDI-VSTi.
- Draw some note sequence, that we’re going to play through MIDI Out (let it be simple and strictly quantized to grid, say 1/8 C3 note on each beat).
-
Then, add second “OUT” midi track to record notes that MIDI Out produces and select your MIDI-VSTi as track input. Enable Input echo on all tracks. You can also route “Out” MIDI track to some synth to audition your notes.
- Enable recording on “OUT” MIDI track with auto-punch (set loop points and corresponding punch points, say, to 4-beats loop; loop start must strictly coincide with first Note On! This is important).
- Press record. Wait about 4-5 loop cycles to pass, stop record.
- Compare what you've got on take lanes (extend piano roll to maximum when analyzing).
In theory, you should get a set of identical takes, because the sequence, played by MIDI VSTi, is looped, unchanged and synchronized to host playback engine and tempo. In theory, notes must be strictly quantized to the grid as they are in initial sequence. What we’ve got in reality:
Take 1: all notes are recorded in place, strictly aligned to grid, but, there is a very short “ghost” note in the end of the first take, which “stands out” of the loop. Obviously this is the note that must have been located at first beat of take 2, but instead it‘s partially recorded at the end of take 1 out of punch region.
Take 2 and subsequent: first note is absent.
Conclusion: when loop start coincides with “live input” Note On, Sonar is unable to catch, reproduce and record this note.
This behavior was observed with most MIDI VSTi plugins that I tested. Some other plugins MIDI output cause slightly other type of behavior (let’s call it type 2): at the start of each take we got an “endless” note that extends till the end of the loop. Obviously the Note off is skipped in this case. All other notes lag about 23-26 ticks from the grid.
Let’s experiment further: nudge first note to the right from the start of the loop by several ticks and repeat record. When pushed 3 ticks to the right, we observe that behavior changes from “ghost” note to “endless” note. When pushed 60 ticks to the right, everything becomes normal (all notes get recorded in place).
Experiment 2. Route your note sequence from “In” track to “Out” track directly through some virtual MIDI driver, let’s take free loopMIDI, MIDI Yoke or LoopBe1. Record your loop a couple of takes again.
Let’s see results. Now each note lags a little from grid, that is, the lag exists between the moment when note is played by MIDI VSTi and the moment when it gets recorded. Second, notes timing is slightly different, you can easily see that by velocity markers, that go in tight groups for each note rather than seem as one. So, Note On events have different timing (different lag), as well as durations (they differ about 1-2 ticks). This must be the virtual driver inaccuracy (every driver I tested shows it). But in this case the first note is not skipped and, except this inaccuracy, everything’s fine.
Experiment 3. Real wonders happen here. Use a modular VSTi host (Plogue Bidule or Energy XT), enable MIDI out on it. Make sure that you properly connect midi input with outputs inside VSTi. When MIDI out is routed directly to host pipeline, we’ll observe behavior, described in experiment 1 (either “ghost” or “endless” notes). Now route MIDI from VSTi to virtual MIDI driver instead (in Bidule you can use MIDI out bidule for this purpose, in Energy – Piz MIDI out plugin). Connect “Out” track input in Sonar to virtual MIDI driver as earlier.
Result: we see some timing inaccuracy again (associated with virtual MIDI driver, I presume), but, the most intriguing – notes are now going a dozen of ticks ahead (!) of grid, they get recorded on timeline earlier than the actual note is played by MIDI In. This must be either VSTi synchronization bug or time travel, what do you think? I guess this is not Bidule or Energy personal problem, because in several modular hosts I tested it was the same.
To summarize.The sad result of all this strange things: when you play the same looped sequence from MIDI VSTi, each time the loop restarts it sounds different to ear, that makes quite hard to work with MIDI-out generated sequences. I’m afraid now there‘s no way to get live MIDI input in loop played and recorded right. Each method to do this gives us some bug (are they interconnected?).
If someone is interested but too lazy to reproduce the problem by oneself, I can provide some screenshots of recorded sequences.