Having trouble quantising MIDI from Audio

Fred 's icon

Hey all, I have here a max patch that converts audio to MIDI. The Gain object is acting like a threshold and when audio is played, it will distinguish the next step in my simple sequencer.

I would like to quantise the MIDI that is produced but am having trouble identifying where in the chain I can insert my metronome I have also created with different beat divitions.

Can anyone sugest how or where to attach my Transport clock to snap the MIDI produced?

Many thanks.

Organic Sequencer 2 Editing.amxd
amxd

TFL's icon

You want to temporally quantize MIDI notes, but those are generated in real time from the audio source. So that mean that you'll only be able to delay notes to trigger then later (snap them to the next quantized time), not in the other direction.

I would do that just before your counter. A simple [metro] + [onebang] could do it, unless you want to be able to have some jitterness in the quantization, or only quantize bangs falling in the last half of your quantization period.

If you only do that with static pre-recorded audio, you could save your generated MIDI notes in a coll or dict with timestamps, and this way you could have proper quantization, allowing to trigger notes both earlier or later.

Fred 's icon

Fantastic! Thank you TFL for your reply, greatly appreciated!