isobar icon indicating copy to clipboard operation
isobar copied to clipboard

Midi clock stop event does not stop a timeline.

Open rvega opened this issue 4 years ago • 5 comments

I have something very simple like:

logging.basicConfig(level=logging.INFO, format="[%(asctime)s] %(message)s")

midi_in = iso.MidiInputDevice()
timeline = iso.Timeline(clock_source=midi_in)
timeline.schedule({
    "note": iso.PSequence([ 60, 67, 72, 77, 84 ],
    "duration": 0.5,
    "amplitude": iso.PWhite(0, 128)
}, delay=1)
timeline.run()

And I'm sending midi clock and start/stop events from a DAW.

What I'm trying to achieve is for the timeline/sequence to start/stop when the DAW sends the start/stop events and for it to be synced with the DAW's MIDI clock.

rvega avatar Feb 15 '22 22:02 rvega

I did some additional tinkering and I set up my DAW to output MIDI song position pointer. Now what i see is:

The timeline responds to the DAW's start messages and tempo settings but when the stop message is received, the timeline keeps going and keeps outputing notes, also the message "Timeline: Stopping" is displayed.

rvega avatar Feb 16 '22 12:02 rvega

Here's a PR that fixes this issue for me. https://github.com/ideoforms/isobar/pull/23

rvega avatar Feb 16 '22 13:02 rvega

Hey @rvega! Nice to see you here. Sorry for the slow reply, just working through a bit of a PR backlog...

What DAW are you using? I tested the current behaviour with Ableton Live and it works OK. But I've just been doing some reading and it sounds like some devices/DAWs continue to send MIDI clock events even when the transport is stopped, which I suspect may be what you're seeing here.

ideoforms avatar Jan 02 '24 12:01 ideoforms

Hi Daniel! @ideoforms It's been a while since I used isobar, but I was using Bitwig under Arch Linux.

rvega avatar Jan 05 '24 00:01 rvega

Thanks @rvega, that's great, I'll do some tests in Bitwig. This PR looks good though so I anticipate merging. Cheers and happy new year!

ideoforms avatar Jan 05 '24 11:01 ideoforms