Tuesday, May 26, 2020

Sending a Clock Signal to Modular Synth via WiFi

Sending an Ableton Live clock signal over WiFi to my modular synth using OSC, ESP8266 and Max for Live . The sync appears out of order because my DIY Exo Sequencer module doesn't have a reset input but overall the timing and tempo changes work really well - considering the setup.

View code here: https://github.com/little-scale/arduino-sketches/blob/master/esp8266-osc-sync.ino







Sunday, May 24, 2020

Using Modular Synth to Control Atem Camera Switching over WiFi using ESP8266

I've been wanting to control my camera switching from my modular synth. So I made a setup where a low to high transition on a digital input on an ESP8266 module generates an OSC message on the WiFi network for the ATEM Mini Pro switcher to change cameras. Here, it's triggered from the kick but it could be any clock, gate or trigger signal. Makes use of atemOSC.

View code here: https://github.com/little-scale/arduino-sketches/blob/master/esp8266-osc-atem-control-footswitch.ino 





Saturday, May 23, 2020

Teensy 3.6 Basics: Receiving MIDI Clock

MIDI clock messages (see System Real-Time Messages) are used to synchronise software or hardware playback transport using MIDI messages. One device sends the clock messages, and another device receives. The device receiving the messages is synchronised to the device that sends the messages.

MIDI clock messages do not carry song position, location or absolute time. Instead, this is transport information for synchronising.

There are four relevant message types - 'start', 'stop', 'continue' and 'clock'. Start and stop are self explanatory - they represent the transport beginning to play and ending to play. Continue represents a transport that is not at the start of the sequence to carry on from the current position. The clock message is sent 24 times per quarter note (a resolution of 24 ppqn). The clock message interval is, of course, depending on the beats-per-minute and can be calculated as (60 / beats-per-minute) / 24 seconds.

Teensy and the Teensyduino add-on can send and receive MIDI clock messages over USB as a USB-compliant MIDI device.

To receive MIDI clock messages on the Teensy, four functions must be written, that correspond with the following:

  • void myClock()
  • void myStart()
  • void myContinue()
  • void myStop()

These functions are created by the user, and each function will only be called when that type of message is received by the Teensy.

In setup(), each function must be connected by name to the message type it should respond to.

  • usbMIDI.setHandleClock(myClock);
  • usbMIDI.setHandleStart(myStart);
  • usbMIDI.setHandleContinue(myContinue);
  • usbMIDI.setHandleStop(myStop);

MIDI clock can be used with Ableton Live to sync the Teensy to the Transport. In Ableton Live, set up the Teensy as a sync output source in the Link MIDI tab in preferences.


When the transport is played in Live, this will then send MIDI clock messages from Live to Teensy. 

Here are three examples of sending MIDI clock messages from Live to Teensy. 



Turn on LED when transport is playing, turn off when transport is stopped







Turn on LED with every beat



View the code here: https://github.com/little-scale/arduino-sketches/blob/master/MIDI_Clock_Receive_2.ino



Two pots generate notes at 1/16ths that are synchronised to Live



View the code here: https://github.com/little-scale/arduino-sketches/blob/master/MIDI_Clock_Receive_3.ino

Teensy 3.6 Basics: Sending MIDI Clock Messages

MIDI clock messages (see System Real-Time Messages) are used to synchronise software or hardware playback transport using MIDI messages. One device sends the clock messages, and another device receives. The device receiving the messages is synchronised to the device that sends the messages.

MIDI clock messages do not carry song position, location or absolute time. Instead, this is transport information for synchronising.

There are four relevant message types - 'start', 'stop', 'continue' and 'clock'. Start and stop are self explanatory - they represent the transport beginning to play and ending to play. Continue represents a transport that is not at the start of the sequence to carry on from the current position. The clock message is sent 24 times per quarter note (a resolution of 24 ppqn). The clock message interval is, of course, depending on the beats-per-minute and can be calculated as (60 / beats-per-minute) / 24 seconds.

Teensy and the Teensyduino add-on can send and receive MIDI clock messages over USB as a USB-compliant MIDI device.

To send MIDI clock messages, four functions are used:

  • usbMIDI.sendRealTime(usbMIDI.Clock);
  • usbMIDI.sendRealTime(usbMIDI.Start);
  • usbMIDI.sendRealTime(usbMIDI.Continue);
  • usbMIDI.sendRealTime(usbMIDI.Stop);


To use a particular function, simple send it at the required point in time.

MIDI clock can be used with Ableton Live to sync the transport to the Teensy. In Ableton Live, set up the Teensy as a sync input source in the Link MIDI tab in preferences. This will enable an EXT button near the BPM. Click on this to enable external sync to the Teensy.




Here are three examples of sending MIDI clock messages from Teensy to Live. 



Sending Start and Clock



View code here: https://github.com/little-scale/arduino-sketches/blob/master/MIDI_Clock_Send_1.ino



Sending Tempo Based on Potentiometer



View code here: https://github.com/little-scale/arduino-sketches/blob/master/MIDI_Clock_Send_2.ino



Sending Tempo Based on Potentiometer, with a Button for Start and Stop




Wednesday, May 20, 2020

Pocket Operator PO-12 Sync


I made a Teensy sketch that syncs a Pocket Operator at 2PPQN to Ableton Live. The code can be found here: https://github.com/little-scale/arduino-sketches/blob/master/PO-12_Sync.ino