Merge notes that overlap

Hey,

I’d like to avoid overlapping notes when recording.

What would be the best approach to do so ? I’m thinking of calling a post-processing function that is fired when recording stops.

Thanks in advance,

Best,

E.

Yes, a post-processing step when recording finishes is probably best.
We have MidiClip::legatoNote which is similar but will stretch note-offs to meet the next note-on which you probably don’t want.

1 Like

Perfect, thanks @dave96 !

OK so I’m finally implementing this.

So far I am using a TransportControl::Listener that fires up this method :

recordingFinished(te::InputDeviceInstance& dev,
                  const juce::ReferenceCountedArray<te::Clip>& clips)

However, this only works for new clips that have been created during the process. Clips that were modified are not included.

Is there any way to get notified for all clips (new or existing one) that were affected by the recording process ?

Any help appreciated !

Cheers,

E.

So you’re using the merge mode?
I’m not sure about that… I guess we’d have to add a “modified clips” parameter to the callback.

1 Like

Yeah, merge mode is enabled by default and that’s the most convenient behavior imo.

If you think that would be good addition then I could look into it and send a pull request if you’d like ?

Let me know.

Thanks for your help,

Cheers.

If you want to do a PR, that would certainly help expedite it.

1 Like