monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
621 stars 144 forks source link

beatclock & clock inconsistencies #1196

Closed tyleretters closed 3 years ago

tyleretters commented 3 years ago

this issue captures one primary and one secondary issue. my goal is to sync outboard gear with midi using textbook techniques.

primary issue: irrational bpm behavior

  1. i am testing with an arturia beatstep pro set to 24 ppqn
  2. i am using the example script provided at https://monome.org/docs/norns/study-4/#midi-sync with no modifications
  3. the beatstep is set to usb sync mode
  4. my PARAMETERS screen looks like this:

beatclock

  1. and my PARAMETERS / CLOCK screen looks like this:

param_clock

and everything works (meaning the beatstep pro has it's tempo synced with norns)... but it shouldn't?

expected results from the above configuration is since the clock out is set to no - there should be nothing going to the beatstep. when this is set to yes, however this happens:

beatstep (1)

what is happening?

secondary issue: beatclock's bpm vs PARAMETERS / CLOCK's tempo

  1. with the same above configuration, now set the beatclock source to external
  2. set the PARAMETERS / CLOCK source to midi.

expected results is adjusting the tempo on the beatstep would update both the tempo and the the bpm. however, it only updates the tempo. i can see this is reflected in the code as BeatClock:bpm_change(bpm) isn't hooked up to the clock from what i can see.

summary it feels like these are two separate clocks running (there are norns and BeatClock) but they are interfering with each other?

tehn commented 3 years ago

you've highlighted a huge doc issue: the norns study is for BeatClock, which is essentially deprecated (though still works) now that the Clock library is in place.

these two will not work well together. i need to dig up a proper example for midi sync with the new clock system, but i can confirm that it works (unless it's broken since release)

@dndrks studies expansion material!

tyleretters commented 3 years ago

great! yeah an interim example would be most appreciated. thank you.

dndrks commented 3 years ago

dope, stoked to dive into this one.

i might be missing something in the test case, but if a script is using global clock to drive tempo in a script, MIDI clock sync through the global clock system should “just work” — unless something in the script competes for MIDI clock attention, using the PARAMS to switch to MIDI clock would make the global clock take its cue from incoming MIDI and the script should respond to any changes.

i can spin up some “this still works, right?” examples tomorrow if someone doesn’t get them first :)

On Sun, Sep 13, 2020 at 4:55 PM Tyler Etters notifications@github.com wrote:

great! yeah an interim example would be most appreciated. thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/monome/norns/issues/1196#issuecomment-691724126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5L2HHT77CQSN7JN7XUFG3SFUWVHANCNFSM4RK2U2HQ .

tyleretters commented 3 years ago

it's not using the global clock to drive tempo - just an arbitrary param. in the process of moving to beatclock i ended up here. i'll poke around with the global clock now.

tyleretters commented 3 years ago

this is a good resource i assume? 4 months young? https://vimeo.com/416730766

dndrks commented 3 years ago

ahh gotcha — sorry, was on the road and shouldn’t have jumped on it without full grok :)

yep! that resource should be good! anything on https://monome.org/docs/norns/clocks/ should be solid :)

On Sun, Sep 13, 2020 at 5:11 PM Tyler Etters notifications@github.com wrote:

this is a good resource i assume? 4 months young? https://vimeo.com/416730766

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/monome/norns/issues/1196#issuecomment-691725954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5L2HB5ARW4LXFWFRIOVK3SFUYOXANCNFSM4RK2U2HQ .

dndrks commented 3 years ago

and sorry you wasted cycles on disjointed info!!

On Sun, Sep 13, 2020 at 5:39 PM Dan Derks derks.dan@gmail.com wrote:

ahh gotcha — sorry, was on the road and shouldn’t have jumped on it without full grok :)

yep! that resource should be good! anything on https://monome.org/docs/norns/clocks/ should be solid :)

On Sun, Sep 13, 2020 at 5:11 PM Tyler Etters notifications@github.com wrote:

this is a good resource i assume? 4 months young? https://vimeo.com/416730766

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/monome/norns/issues/1196#issuecomment-691725954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5L2HB5ARW4LXFWFRIOVK3SFUYOXANCNFSM4RK2U2HQ .

tyleretters commented 3 years ago

it's ok! i learned a lot!! thank you so much.

and yea so far clock.run(thing) and clock.sync(1) are "just working". very beautiful.

tyleretters commented 3 years ago

...aaaaand it all works perfectly with the beatstep. <3