Midi recording in a loop range with linked midi clips

I have general questions about the Midi recording behaviour of the tracktion_engine.

In my use case I have several linked Midi clips in a loop range. For better understanding I created a Waveformish setup:

Here are my questions:

  1. TransportControl::record() starts always from loop start point - right?

  2. It is right that if you started with TransportControl::play() you can’t switch to TransportControl::record()? I got an error in the MidiRecordingDemo when I try it. JUCE Assertion failure in tracktion_EditTimeRange.cpp:16

  3. I’ve studied the thread Punch in/out of @dave96, @erikronstrom and @splintersilk. Did I unterstand it right that if you want to record midi notes spontaneously in a loop you have to start the loop with TransportControl::record() and arm / disarm the track with InputDeviceInstance::setRecordingEnabled()?

  4. Linked clips get the new Midi data only after the recording is finished - right? I tried it with Waveform and the tracktion_engine with the same effect.

Thanks in advance for your replies!

Hey @ToxVox
I haven’t worked with MIDI but for your questions #2 and #3 yes, this is what I found: Even if you’re not really recording, start “recording” anyway just with nothing armed. Then when you want to punch in, you actually want to arm the track, and disarm to punch out. This worked reliably for me.

Hope this helps :slight_smile:

1 Like

Hi, just another solution for #2: I’m using AppFunctions::startStopPlay() and AppFunctions::record() for my play-button and record-button, respectively and it works fine to hit play and during playback hit record. I guess it works, because the AppFunctions::record actually calls TransportControl::stop and right after TransportControl::record. For audio, I might hear a very short and soft click (not really noticeable unless you know it’s there) and with midi, I’ve encountered no problems. :slight_smile:

1 Like

Interesting. I didn’t know about te::AppFunctions. The only disadvantage is that it restart a current playing loop range because TransportControl::record() move the playhead to the loop start. At least in my tests with AppFunctions::record().

So for my nonstop loop sequencer with record function approach I’ll go the way like @splintersilk and start generally with TransportControl::record() and arm / disarm the track.

Oh, right. Makes sense!

If you want to punch in and out the best way to do that at the moment as has been stated is to start recording with no tracks armed and then just arm/disarm them to punch in/out.

We’ve got a feature on the roadmap to make this more intuitive (effectively so it’s always recording so there are no pauses when you actually start recording/stopping) but it will be a while before I can get to this.

2 Likes

Good to know! Can you check my #4 (linked clips), please? Thanks!

Yes, MIDI isn’t actually added to the clips (and hence propagated to the linked clips) until recording stops. Playback of a recording MIDI clip is done in a different way with the sequence being temporarily stored in the MidiInputDeviceInstance.