Yes, you can

a) send clock events (midi:clock) directly from the script to the ports you need.

b) every midi device has an IN port and an OUT port, so you can daisy-link them together to have the clock signal pass through them all.

Hope this helps!

Thanks a lot!

I try to sync a Digitakt and an O_c (captain midi).

I’ll try to use midi:clock for each port but I was more thinking about an option in clock parameters to avoid modifications in each script . Maybe in a future update.

thanks again.

Hi! I’m struggling with trying to send midi start/stop commands from the clock library. I managed to do it with BeatClock by following the studies, but not with the clock library. Is there a way to do so?

I have implemented clock.transport.start() and clock.transport.stop() functions in my script, but these only seem to work when other midi devices send the messages to norns, not when a clock gets started with clock.run(f) or stopped with clock.cancel(f).

Thanks in advance!

EDIT: found the answer, was using the wrong syntax :slight_smile:
If anybody else is wondering this will do it:

Summary

m = midi.connect()
m:start()
m:stop()

1 Like

I’ve recently picked up a second Norns and was wondering what’s the best way to sync them together when one is being clocked via crow. Is it possible to use ableton link while still being clocked via crow?

Also wondering if a clock reset has been added to the Norns clock system and if there are any scripts using it?
I’ve been wanting my sequences to reset once the clock has stopped. I find that I loose timing when I stop the clock to arm channels for recording.
I’ve thinking about using crow input 2 for a reset but it would be nice to have the Norns clock reset after not receiving a clock for a set amount of time.

Anyone else find them selves needing a reset input or option?

not possible with the current API. it should be possible to sync both norns via link and send out clock signal to crow, but not the other way.

2 Likes

Thanks for the reply. I have already tried out having Norns as the clock source and syncing the other Norns via link and clocking my pnw via crow but that still doesn’t address the reset issue.
Most scripts dont reset to the start once stopped so I still loose out on syncing lips and delays with my sequences.
Would it be difficult to implement a reset for Norns apps or within the Norns clock system?

not difficult for individual scripts — each could supply a PARAMS trigger that resets their respective step counters to the value they’re written to understand as the “1” and then another trigger to start counting again at the next clock pulse.

this isn’t a standard that can be generally enforced by the clock system, though, as a system-level reset wouldn’t be able to predict the myriad syntaxes each script uses to count steps or the many places where a reset might be handy (eg. boingg only has one track that’d need reset, but what would that mean for arcologies?).

as a proof of concept, i can spin up what this would look like for Awake tomorrow morning (see below) if that’d be helpful?


here’s a version of Awake with basic start + stop/reset functionality

  • i established a clock_active variable, which can either be true or false
  • i added this variable as a condition to the main step() function, which uses the clock to drive the script forward. if clock_active is true, the sequence can advance – if it’s false, the sequence won’t move forward.
  • i created a transport(state) function, which understands 0 as “stop” and any non-zero as “play”
    • when state == 0, clock_active is set to false and we clear any playing notes + reset the two sequence’s positions
    • otherwise, clock_active is set to true
  • i added a start/stop trigger to the PARAMS which executes that transport(state) function, passing 0 or 1 based on the current state of clock_active

all told, 22 lines of code gave us a straightforward manual start + stop/reset!

from here, you could add a few more lines to:

  • assign a crow input to do what the start/stop trigger does
  • direct MIDI start/stop messages to execute the transport function (passing 0 when MIDI stop is received, 1 for MIDI start)
  • get a little fancy and add a “reset every x bars” situation :slight_smile:

hope this helps!

3 Likes

Noticed today that Clock system does not understand Swing, any swing amount is ignored. I was using crow to clock Norns so perhaps it has something to do with crow? Would be great if this could be implemented in the next update, will give the patterns more funk and life :slight_smile:
Thanks!

1 Like

since this came up in another thread, reitrating: this needs to be part of a script’s logic since there is no universal definition of what it “means” to reset the sequence/process whatever.

i wonder if there is utility (e.g., turn those 22 lines into 2 lines) for baking a “reset” handler into the clock API… somehow.

hmm… AFAIK we just respond to PPQ ticks. is there a standard for “swing” that tells us to post-process the PPQ stream in some way? who would be sending us this “swing” value and how? or are you proposing the addition of a swing parameter at the norns system level? (ed: sorry just re-read: you want the clock coming from crow to be “swung” or “shuffled” in some way, i think)

AFAIK, the concept of “swing” in DAWs and e.g. MPC sequences, means: process a sequence of notes such that some rhythmic unit is subdivided asymetrically - for example, eight-notes to dotted-sixteenths (or triplets or something in between.) in other words, it is a musical transformation defined by a sequencer. (not actually a property of a low-level clock.)

and given that assumption, it seems to me that sequencers can easily implement swing by calling e.g. clock.sync(0.75 /4)... clock.sync(0.25 /4)... instead of clock.sync(1/8)...
(or, more broadly, clock.sync((0.5 + swing) / 4)... clock.sync((0.5 - swing) / 4), with swing in [0, 0.5)).

(at least, that’s my understanding of what “swing/shuffle” usually means. could get a lot more granular / weird of course.)


maybe relevant too: at one point we considered adding the ability to metro to use a sequence of durations instead of a single duration. wasn’t convinced this was a sensible point of abstraction though.

if there is a general call for “clocks” to encapsulate more musical logic outside of what scripts do with them, then that could be sort of a bigger discussion; could do a lot more than swing/shuffle.

5 Likes

Thanks so much for adding this and writing out all the details to achieve it. I had a look at the updated Awake but couldn’t quite get it to work how I imagined. I also looked at trying to add a crow input to reset the sequence but I think it’s a just a little over my head at the moment.
I wish I had the knowledge because I know I could achieve many ideas if my coding was upto scratch. I might need to do some study.

1 Like

for sure!

gotcha, makes sense. can you spec out what exactly you want the script to do? i think that it’s important to not let the “it’s mostly there” stuff die out, you know? if we can land on a set of parameters that scripts should ideally incorporate through this process, it’d be time well spent :slight_smile:

so, what’s your ideal?

Definitely agree that we shouldn’t let “it’s mostly there” stuff die out.
Norns would really benefit from a solid clock system with start/stop and reset functions for the internal clock, link, midi and crow.
At the moment I think most things work well besides crow. I use crow 99% of the time when using Norns.
Not to digress too much but I still find syncing Norns with crow a little unstable with some apps.
Talking about the reset, what I’m ultimately wanting to achieve is that apps reset to step one of a sequence once a clock stops.
As input one on crow is used for clock, input two makes sense as a reset input just like on Ansible. But for me the issue with using input 2 for reset is some apps might use that input for other functions and I think it’s important to keep it free for that sole reason.
So I’m thinking there are a few things to achieve.

  1. Have the Norns clock detect if the clock (internal, link, midi or crow) has stopped and therefor reset to the start.
  2. An option to enable this reset function or not.
  3. Have Norns send Link info when internally or externally synced (this is a very specific use case as I recently got a second Norns and would like to sync one via crow and have it send Link sync to the second crow).

Hope that explains it a little better.

1 Like

cool, this is helpful to have laid out, thank you!

fwiw, stopping and resetting isn’t the duty of the norns clock, tho. the global clock should never stop — it is a fundamental timing heartbeat rather than a transport (side note: ohh, a global transport actually might be the right framing for the feature you’re requesting!). so, it’s up to each script to kinda create their own transports – to listen for external “stop” messages and to have a plan for what to do when it receives such a message. it’s also up to each script to define what it considers a “reset” and what it should do when it receives one. we can help standardize this with a clear example and more visibility of this standard in the documentation, so more folks can include these functions in their scripts.

re: crow syncing, i’ll follow back up on this thread tomorrow: Crow/norns/clock question

re: Link, that’s trickier — from what i understand, Link isn’t a “destination” or “source”, but more like a conversation between equals. i don’t think that you can send Link data without also listening to it, which becomes complicated in a system with only one clock. @artfwo will have much more concrete things to say about whether this is a norns-solvable issue or just the way the Link protocol works.

4 Likes

Ah right, that makes sense re:global clock and I think you are onto something with terminology and concept of a global transport.
This would make it a lot easy for people to implement into their apps, especially with having it standardised.
Excited to see if we can get something like this happening. Having solid sync and reset on Norns would be great running side by side with other sequencers like Kria.
Appreciate you looking into the crow clock stability.

Keen to hear what @artfwo has to say about Link. Totally understand if it’s not possible. My end goal with that is to sync 2 Norns while 1 is being clocked via crow so it would be nice to have that option as sometimes I want to use my second crow with ableton.

1 Like

link allows sending sync data from a single node to the network, but it’s not yet implemented in the norns API. but even with a working implementation it will still require some manual adaptation of the scripts for the use-case you described:

1 Like

I would like to add my vote to the general call for “clocks”. Tighter more reliable clocking across the board would make Norns so much more playable in less experimental contexts. Cheat codes with a start/stop/reset function would be a dream.

3 Likes

I’m seeing some very strange behavior when sending MIDI clock to my norns (201202)

tl;dr: norns system clock works fine, except when being driven by external device’s MIDI over USB. But, when being driven by external MIDI, the clock will be wildly out of time. Sometimes with consistent scaling, sometimes with random drift… kinda hard to pin down. Doesn’t matter which external device (Logic Pro X, Hermod).

I’ve tried it with a few different scripts: Awake, Cyrene, and Foulplay.

With Foulplay:

  • Start playback
  • Start sending in external clock messages
  • Fouplay suddenly speeds up drastically (often up to 2x)

With Awake:

  • Start playback (easiest to notice if there’s only one note per loop, and a short loop length)
  • Will randomly drop beats

With Cyrene:

  • Tempo is roughly steady but approximately 14% faster

Has anyone else seen similar behavior? It’s driving me bananas

It seems relatively similar to Crow/norns/clock question but Crow isn’t connected in any of these test cases. I’ve also tried completely removing all references to Crow from Cyrene and that doesn’t help

1 Like

I find it syncs to clock ok (I’m sending from an MPC X) but I’m finding that none of the scripts (tried Awake, Meadowphysics midi, Buoys and Arcologies) seem to reset with midi stop/start which makes syncing not great. Anyone know whether these scripts should restart?

1 Like

Ive experienced lots of clocking issues, mostly with crow. For me what the biggest issue is some clock pulses get skipped which messes up timing and no start/stop or reset makes it very difficult to properly sync with my modular or midi gear.

Id ideally like to see a more stable global clock system with start/stop and reset.

1 Like

I think this is the same issue I have been dealing with here: Crow/norns/clock question

1 Like