I am trying to build a simple pulse generator to clock analog gear from Norns.
The norns global clock sends midi clock messages which I can pick up without issue but getting the two clocks to align properly is proving difficult. My script is counting midi 1/4 notes i.e. counting to 24 clock ticks, so it stays in time with what is going on in norns, but not necessarily in sync: pulses might be produced half way though each 1/4 note for example.
The clock reset function on Norns (through the parameters menu) does not seem to send a midi start or continue message. Is there some other way to force that to happen globally? If not should it just be done via a script?
if you can share your script, that’d help identify where things are getting wonky. otherwise, is your script beginning the count with clock.sync(1)? that should start the counter directly on a quarter note, to stay in sync with the global clock which is driving the midi clock messages.
Thanks for the reply. I must have been unclear in my question — sorry.
I’m trying to keep an external device in sync with norns global clock. For proof of concept I’m just coding for a teensy in arduino IDE.
I can receive the clock signals from norns over usb midi but I can’t tell when norns is on a 1/4 note or whole note boundary for example. So whatever is running on norns (eg awake) is nicely synced with norns clock via its own clock.sync calls, and my external device keeps time — because it gets the midi 248 messages — but can be misaligned because it didn’t necessarily start counting when norns did.
Ideally I’d like my device to be able to pick up the clock regardless of what script is running. Clock reset would be one way to do that but as far as I can tell no midi message is sent from norns to indicate the reset has taken place.
I hope that made the issue clearer! Thanks again.
Edit: here’s a bit of code extracted from my clock handler so you can see what is going on.
you could roll this type of reset into a norns script’s initialization – if your arduino code is able to reset its counter with a stop message, then you can execute whatever_var_you_initialize_midi_as:stop() from norns. whatever_var_you_initialize_midi_as:start() and whatever_var_you_initialize_midi_as:continue() will execute the other messages.
for awake, midi is initialized as midi_out_device. i’m curious if you run awake and execute midi_out_device:stop() from the maiden REPL if that helps reset the arduino? and then either midi_out_device:start() or midi_out_device:continue(), depending?
if those do what you need, then we’ll want to get those clock synced to the rest of the script — excited to find out if the functions work tho!
I can’t access Awake’s midi_out_device from the REPL, I guess because of its local scope, but never mind!
Dropping midi_out_device:continue() into the Awake script at a strategic point gets things lined up nicely. The Teensy resets its count to 0 when it receives the message and everything stays in beat alignment. I’ve set it up in Awake so that the continue message is sent when the loop restarts. An alternative would be to send a start when the app initialises but I fear alignment would drift if you adjust tempo.
This gives a nice per-script workaround. The spec I am working to here – doing this for a friend – is “can I clock my Buchla from norns apps?” so a global solution would be preferable to modifying individual scripts, because I think there are multiple apps under consideration.
For quick-n-dirty this is great so far though. Thanks.
FWIW I use something like the following with my TR-09 because it has a STOP/CONTINUE button
and you could throw something into the clock.transport.reset function to stop/start or continue (or whatever behaviour works for you - maybe the clock.sync(1) or similar there?)
running = true
running = false
msg = midi.to_msg(data)
if msg.type == "start" then
elseif msg.type == "continue" then
if running then
if msg.type == "stop" then
As I understand more the architecture of the norns clocks it becomes clear that there won’t be a way to do this once and for all, but on the other hand it is pretty easy to bake the appropriate alignment in to a given norns script. Looks like I need to get my friend to specify his use cases a bit more precisely and then this is going to be a simple thing to achieve. Thanks again.
Hi, I’m trying to figure out how you can pause the norns. For example, I can’t find a way to pause Awake. What i’m specifically trying to do is to hard sync it to my midi chain. But awake only catches up with the midi clock and doesn’t respond when I start or stop the midi clock source (Digitakt). So Is there a way that awake starts from 0 when I start the sequence on my Digitakt?
while norns has a global transport, which passes midi start/stop messages to scripts, it is up to the script to implement what those start/stop messages should do. awake does not currently have any sense of this transport. some scripts do (like GridStep (now with Timber UI!) and Less Concepts 3), but many do not. i’m currently working on a supplement to the transport docs to help make this feature easier to implement in a script.
I searched the forum and didn’t find exactly what I was looking for, hopefully someone could point me in the right direction.
I am trying to sync Norns (specifically Kria Midi) with Pamela’s New Workout. I can get the bpm to sync various ways i.e. sending clock pulses out of crow to the clock in of Pam, sending midi sync out of the Pam’s expander to midi clock in on Norns but I can’t find any way to also sync start/stop. (bpm is not perfectly consistent and it fluctuates but it’s tolerable)
Pams expects a gate on the “Run” input for start / stop functionality.
I imagine there might be a way to do it with a mod- for example when sending clock pulses out on a crow output, maybe another output could send the run signal. it would suck to have to use two outputs on the crow for this but it would be tolerable.
I tried to send midi clock out of a connected midi interface via a midi cable that is then connected via the ALM / Busy circuits Din Sync adapter cable to no avail- I imagine it’s because it’s only sending clock data and not start/stop data.
I’m basically looking to be able to press play on either pam’s or norns and have the two start from a reset state so that my kria sequences start from the beginning at the same time pam’s starts. This way any “reset” signals I have coming out of pams to other sequenced modules in my eurorack can be in time together with the kria sequences.
I’d even be satisfied if I could just send a din sync format signal out of my norns or crow somehow and just reset everything manually.