[solved] Norns/Fates: Clock externally via Midi

I am a bit helpless with respect to clocking my Fates externally via midi. I bought the Sevilla Soft device, which - as far as I see - works to connect my Laptop and Fates. As I am into live coding with Sonic Pi I am looking for a solution to combine both, Fates applications such as Animator, Fugu, Loom and other sequencers and live coded stuff coming from Sonic Pi. The later speaks Midi (and OSC) and is able to send Midi clock signals. It can send midi_beat (i. e. 24 signals any bpm beat) or a single signal e. g. every beat; it does also send start and stop commands. I have used this with an Arturia Beatstep and I can also track the signals via Midisnoop. It is not possible at the moment to clock Sonic Pi so it has to be the master.

I tried different norns application with very mixed results. So far I can only give a very incomplete account of what is happening because it don’t really makes sense to me. Mostly it seems as soon as I activate external clocking on Fates it seems to become overloaded with Midi commands. One effect was that the bpm setting went up to 300 on the display and problably even more; audio could not follow and the grid was lit kind of constantly. A comparable effect without the bpm acceleration today was, that my Fates and the current script just became unresponsive obviously trying to process to much at a time. Using midi_beat my impression was, that Fates tried to adjust the bpm to any of the 24 midi signals.

Yesterday I did kind of successfully clock and use Loom together with Sonic Pi for a few minutes. I could also use midi_start and midi_stop just as I expected. Today again my attempts to recreate this configuration are only partly successfull.

I have noticed that norns/fates now has a overall clock function (including Ableton link). I did update all the scripts I tried so far, although I don’t know if they all now do use the ‘system’ clock; Loom e. g. seems to have some individual clock settings.

I am really clueless and grateful to any advice to what I can do to find out what’s really going on.

Hi!
Sorry to hear your sync problems.
The only way i have reliable synced norns to external midi was with an Er-m midi sync box, sorry it’s not an easy / cheap solution…i got one years ago trying to have all the gear synced (midi and analog) It’s a no brainer if you want tight sync

Thanks for the feedback @thopa. Though, this is bad news. As I said, I have to rely on Sonic Pi doing the syncing… So probably I will have to do further experiments to find out whether there is some way and furthermore slowly build some lua knowledge.

I know I’ve successfully midi synced animator with ableton using an ultralite and iconnectivity mio in the past. I can test that again later (haven’t tried since updating to global clock), and also test my octatrack. I’m not so sure that sync box should be required.

I’d appreciate that. It is indeed very strange because yesterday I had a completely satisfying syncing connection - at least using Loom. So it should be possible in general (though I am not sure that Loom uses the global clock yet).

OK so it might be best to simplify your situation and confirm that Sonic Pi is sending proper midi clock messages.

  • on what device is sonic pi running?
  • you mentioned midisnoop, so windows?
  • can you dump the contents of midisnoop data to a Hide details block here when sonic pi is sending clock?

Where the hell is an online link to the sonic pi API? I can’t find it anywhere (only the tutorial).

But based on the tutorial - make sure you’re using only midi_clock_tick to send clock. (tick is 24 pulses per quarter note)

(Pedantic note - in your situation, Fates is the hardware, Norns is the software - or operating system)

Thanks @okyeron for taking the time and for your specific questions!

  • I am running Sonic Pi on a Lenovo Thinkpad, x230, Linux Mint 19.3 (Ubuntu 18.04)
  • Windows? Nope, see above. There is a Midisnoop for Linux

Sorry, right now I don’t know how to get more information out of midisnoop then this screenshot.

I also tried receiveMidi (https://github.com/gbevin/ReceiveMIDI) but there is even less information; it’s just outputting:

$ ./receivemidi dev Midi Through Port-0
midi-clock
midi-clock
midi-clock

The SP-code I am sending is:

live_loop :midi_clock do
  midi_clock_beat
  sleep 1
end
  • Sonic Pi, API: Well, I don’t think there is such a thing like a documentation of a general API for Sonic Pi at the current state (there is e. g. one for the Mindcraft interface); you’ve probably seen Sonic Pi on Github; I don’t know, where one can find details of the midi implementation but probably in the code so maybe here.

  • Beat/Tick: Based on the lang documentation (only available within the program) and on reading the outgoing midi (24 messages per beat = sec if 60 bpm when using midi_clock_beat), it seems to me that it is the other way round - but correct me if I am wrong:

midi_clock_beat duration (beats)
Sends enough MIDI clock ticks for one beat to all connected MIDI devices. Use the port: opt to restrict which MIDI ports are used.
The MIDI specification requires 24 clock tick events to be sent per beat. These can either be sent manually using midi_clock_tick or all 24 can be scheduled in one go using this fn. midi_clock_beat will therefore schedule for 24 clock ticks to be sent linearly spread over duration beats.

midi_clock_tick
Sends a MIDI clock tick message to all connected devices on all channels. Use the port: and channel: opts to restrict which MIDI ports and channels are used.
Typical MIDI devices expect the clock to send 24 ticks per quarter note (typically a beat). See midi_clock_beat for a simple way of sending all the ticks for a given beat.

Norns and/or Fates: Yes, thanks for the clarification, I’ll try to keep that in mind, so I meant: Norns running on a Fates (also slightly pedandic but also truly ignorant and eager to know: What’s Norns running on if it is not on a DIY Fates?)

It’s confusing as the original norns hardware is “Norns” but now there’s also Fates and the Norns Shield. Knowing which hardware can be helpful for debugging.

Also - being specific about which norns scripts you are testing with will also be helpful for debug.

I’d suggest trying midi_clock_tick and see if it gets you the correct timing results with something like Awake on norns. I think it will.

FWIW - midi clock ticks are usually sent constantly. Some devices will start/stop sending clock ticks with the transport start/stop commands, but some devices will just send clock continuously.

Do you know if this is usable from the command-line, or do you need a GUI?

Actually I did try both commands. For Awake there was no difference. The best candidate for a working connection was Loom. But I will check again.

No, unfortunately not. The only command line tool I found was receiveMidi but this one does not see to be too verbose. I remember my Arturia stuff came with some Midi analysis software but I sold it and removed the software. But I’ll have a look…

I tried also aseqdump as well as qmidiroute; I don’t get more but the same information as with midisnoop. I guess your idea was to check the actual raw midi message, right? I am pretty sure that SP is sending correct midi data as I already used that with a Arturia Beatstep; also because so far the Midi implementation in SP did what I was expecting in other scenarios.

My impression (really just an impression) is, that Fates’ (USB) Midi is kind of ‘susceptible to disturbances’; using a USB midi converter from Fates to 0-Coast I often (not always) need to un/plug several times before it’s working; sometimes the the 0-Coast plays a few notes and then stops; sometimes it is working without any problems. Though of course the USB midi interface could be the problem (but also here: I used the same device with Sonic Pi quite reliably).

I don’t really have a clue how to go on with debugging in a systematic way, so I will just try and do some experiments and play with different configurations as long as I have the energy to do so.

1 Like

Until now I have only found one script which does work with Sonic Pi in the expected way, which is Loom.

In the expected way means, I can set the bpm and Loom will be clocked accordingly and I can also use midi_start and midi_stop.

As I mentioned before, Loom has some extra settings, which might be responsible for that or/and modify/correct the global clock, namely: a separate/additional/local Clock (Internal/External) and Clock MIDI In Device. I yet don’t know enough about Lua and Norns scripting but that is likely to change in the medium term.

I am definitely interested because although I like Loom I’d also like to work with Takt an other applications… so if someone happens to have an idea or explanation I will be most grateful.

I did some testing with Awake this afternoon: trying to use the gobal clock settings for external clocking either results in an extreme and increasing bpm number (my Fates displays until 300 bpm) or the opposite, which is 1. midi_start and midi_stop don’t work at all.

FWIW - I don’t believe those are implemented in awake

2 Likes

SOLVED: Finally I set an output midi port in Sonic Pi and this seems to do the trick; I can now clock my Fates via midi clock by Sonic Pi, which finally opens up the integration of the Norns world into Sonic Pi live coding for me :smiley: .

My kind of plausible but technically not necessarily correct explanation: I am using the Sevillasoft USB-USB which has 4 midi ports and I guess SP sent on all 4 ports and Norns (running on Fates) received all 4 ports which resulted in what seemed to me as a kind of midi signal overflow. So in case anyone wants to use SP to clock Norns, try this:

live_loop :clock do
  midi_clock_beat port: "midi_usb-usb_midi_1" # adust port
  sleep 1
end
2 Likes

I am jumping on to this thread. I’ve purchased the Sevilla Soft Dongle, and when I attempt to sync norns to my mac/DAW (DAW as master), Norns either freezes or doesn’t respond. I’ve seen comments about using the dongle, but hope someone can share how they have set up the dongle with a computer. Thanks.

Hello Matt,

I am not at all sure that I can help and these things may already be known to you. But maybe not.

I am able to clock my Fates (resp. Norns software-wise) externally (via the software Sonic Pi). Basically I am using cheat codes and am able to sync the tempo, and if I remember correctly (have not checked that recently), also the midi start command. I can also bpm-sync Awake using the same mechanism and I think there was some other application, where this works (might have been Fugu).

You are aware that currently not every application (maybe even more correctly: just a few) implement the clock mechanism, right?

And possibly it will help for people to answer if you could describe in detail, what “doesn’t respond” means (see above: you will have to make sure that the app supports clock sync at all)?

Finally: Does the the Sevilla device work at all? Can you e. g. control a softsynth in your Daw running Awake?

1 Like

Thanks for getting back to me. The device does work. I have Awake acting as a master clock for Ableton. In addition to Awake, I was also trying to set up Ableton as the master for Playfair.

I’ll dive in and try to get more specific, but when I sent a clock from Ableton to norns (Awake and Playfair) via the Sevilla dongle, Norns would freeze at times.

you could try my MIDI Monitor script and see if some funky messages are being sent from ableton?

1 Like

Just one more thing. Please see previous post, actually I had what you also could call a freeze or rather I would call it overload: the BPM went up to 480 and my Fates did not respond anymore. This was fixed by explicitely naming one of the Sevilla dongle ports on the side of the master clock host. Maybe you can check this out…

1 Like

Definitely getting something quirky. The BPM jumps several times, and then Norns freezes. I’m guessing it is the overload issue.

Any idea how I would change the name of the ports in the mac midi studio? The ports are greyed out.

Seems pretty obvious that this is the same issue. This is good new as it should be solvable. Unfortunately I have no idea about mac midi studio. I am on Linux.