This is the last bit for now.
This is a very early implementation of a feature that could make E1 a good platform for generating and processing MIDI data. Input and ideas are very welcomed.
Data pipe is a simple and fast queue that can be used to exchange data between active presets. Data means 32-bit float signed numbers. Similarly to MIDI, the data can be transferred on channels. There are 255 channels though.
Sending data:
A simple one functions that pushes the float number to given Data pipe channel:
pipe.send(channel, floatNumber)
an example of using sending data can be found in a Simple LFO preset.
Receiving data:
Receiving needs a little bit more coding. A callback function must be defined and registered to listen for incoming data on given Data pipe channel:
function preset.onLoad()
local channel = 1
pipe.subscribe(channel, printData)
end
function printData(channel, data)
print("pipe data: " .. data)
end
An example of processing data received from the Data pipe: Receive LFO.
The preset Simple LFO and Receive LFO both use Data pipe channel #1. To test them follow the steps below:
- upload Simple LFO to preset slot 1
- upload Receive LFO to preset slot 2
- open the preset selection window and press and hold the Simple LFO preset button. Long press will load the preset and will pin it to keep it running.
- open the preset selection window and press and hold the Receive LFO preset button.
- now, both presets should be pinned to run in parallel. if you open the preset selection window again, both presets should have “listening” icons on their buttons.
- switch to Simple LFO, ajust the settings and hit RUN button. If everything works correctly, you should see log messages coming out of Receive LFO preset. And one of the MIDI parameters will be modulated by the LFO.
Again, it is very early phase of the idea. UI is a bit clumsy, timers sometimes hiccup. I will be working on making sure the timings are 100% reliable and stable.
An ultimate goal is to be able create presets that allow users to link controls in one preset (say Roland System 1m) to output of another preset (Simple LFO). That intermediary preset would control sources, destinations, depth, and possibly do any other MIDI processing.
Two presets pinned as active: