Digitakt MIDI loop back with Supercollider

I made a SC script for Digitakt. I am only a newbie on SC, so the method I used on the script might not be the best way, but I think this could be useful for someone.
Let’s talk about my setup:

  1. Macbook
  2. Digitakt
  3. Korg Nano Control 2
  4. Supercollider

The goal of this script:

  1. Block the CC 120 to avoid freezing
  2. Loop back all CC (except CC 120)
  3. Nano Control 2 as a mixer, selector of No filter/LPF/HPF, and Filter cutoff

Here’s the script:

Let me know your thoughts and feel free to give me idea to improve. Thanks!

Isn’t this solved by 1.20A firmware?

it said-
Prevented MIDI feedback problems that could occur when pressing [STOP] twice.
but no, at least to my device.

I meant since 1.20 the DT doesn’t freeze with stop/stop and midi loopback so imho you don’t need this part of the script.

Just tested, no freeze with stop/stop + loopback

Not sure why it still occurs to my device, maybe I use USB MIDI?

This is extremely useful, I did something almost identical. SuperCollider is way cooler, but I highly recommend python for midi programming. It’s just so… easy:

#!/usr/local/bin/python3.7

import mido

out_port = mido.open_output('Elektron Digitakt Digitakt out 1')
in_port  = mido.open_input('Elektron Digitakt Digitakt in 1')

for msg in in_port:
  if msg.type != 'clock':
    out_port.send(msg)
    print(msg)
1 Like

I’d try with a midi cable only to compare.
So with USB it freezes systematically with 2xstop if you don’t filter CC120?

things can freeze for multiple reasons.

Yes, but apparently CC120 was the main (only?) reason with midi cable loopback and 2xstop. Weird if it hasn’t been solved with USB.

Thanks, it looks great!

SC might not be a good option for MIDI stuffs, but I think it’s good for multichannel signal processing, a good pair with Digitakt (Core Audio) .

For those on iOS, Mozaic by brambos is very useful for writing customised Midi channel routing processors. Dead easy to code too with a number of examples posted on patchstorage.