Question: CV to float in Haskell? Multiple streams?
I’d like to read an expression pedal from my computer. Crow might be ideal. This post is to make sure it can do what I’m hoping.
The expression pedal outputs CV. My script would do the following, every 3 ms or so:
* Compare the current value to the last stored value.
* If the difference between those two values is big enough, then do these two things:
* Replace the stored value with the current value
* Send an OSC message to my synth indicating the new value, and which CV input it came from, and which crow (if I've got multiple crows) it came from.
Is this feasible?
Question: Where does OSC go?
I already read OSC (using Haskell) from the monome. I’d like to send these OSC messages from crow to the same … place? Is that a UDP port number?
 I won’t know what I mean by “big enough” until I’ve played around a while.
You would need a program on your computer to read values from crow over the serial port, format these into OSC messages, and transmit them to a certain port. This is basically what serialoscd does for grid and arc, it also has some other responsibilities like detecting device connection/disconnection and handling multiple connected devices. None of these devices really “send OSC” themselves, the grid and arc communicate over USB using this custom serial protocol, whereas crow is designed to send text. Here is the Python code in druid that communicates with crow using the pyserial library, you could build on this to send out OSC messages using Python, or write something equivalent in Haskell, or integrate crow support into your Haskell program directly by reading from the serial port.
As far as this use case, the window input mode may be helpful with scripting this on the crow side.
Nice! That window mode certainly looks handy. Two more questions:
Matching voltages, or resistances, or something?
Do I have to worry about voltage mismatch? Is that even a thing? Some pedal manufacturers only list the impedance range – e.g. "10 - 100k Ohms’. This one says “Our Strymon pedals, for example, read control voltages from 0 to 5 volts DC” – which suggests that the pedal expects some external voltage source? None of the pedals I’ve looked at seem to require a power source or batteries, so I don’t see where the CV comes from.
It looks like Druid is designed to connect to only one crow at a time. That’s because find_serial_port is only ever called with the argument “USB VID:PID=0483:5740”, and always returns the first matching portinfo it finds. And every time Crow.connect is run, it uses find_serial_port. So every Crow created, if one were to create more than one, is the same Crow.
The equipment accepting an expression pedal input on a three-contact TRS connector is expected to provide a reference voltage to the pedal on the ring connector, because the pedal itself just contains a potentiometer. The Strymon page covers how these work in more detail: the pot forms a voltage divider to produce a control voltage on the tip connector. This is just a passive circuit so you can apply any voltage up to whatever the potentiometer is rated for, some much higher voltage than a modular system can produce. You would probably need to wire up or buy some type of cable adapter to break out the tip and ring to separate 1/8" mono plugs so that you can apply a 5V offset from crow or some other module to the expression pedal’s ring connector and read the control voltage from the tip. There are also quite a few “expression pedal input” eurorack modules available I believe.
This is true, it would potentially be nice to have multiple druid consoles open connected to separate crows. Generally I think it’s assumed you’ll use a single druid session and just connect the USB cable to different crows you want to talk to, I haven’t used more than one myself so I don’t know how the ergonomics of this shake out.
You would probably need to wire up or buy some type of cable adapter to break out the tip and ring to separate 1/8" mono plugs so that you can apply a 5V offset from crow or some other module to the expression pedal’s ring connector and read the control voltage from the tip.
Aha! Thanks! So the input jacks from crow do not provide an offset, whereas those on a keyboard do?
Generally I think it’s assumed you’ll use a single druid session and just connect the USB cable to different crows you want to talk to
If I understood druid’s code correctly, no matter how many druid sessions you open, they’ll all connect to the same crow – unless for some reason the list returned by serial.tools.list_ports.comports() does not always return them in the same order.
There are also quite a few “expression pedal input” eurorack modules available I believe.
I looked around online (very sloppily, having no idea what I was doing) for maybe an hour. I found two units that accept a lot of inputs – the ES-8 and ES-9. The first is only $350 – just under the cost of two crows. But they don’t have Linux drivers, and I’m not about to try Wine for the 3rd time, having gotten nothing but older from my earlier attempts. I found a couple more units that take only two inputs, but if that’s the case then crow would seem to dominate them.
I considered using MIDI pedals. They seem to be expensive – like $150 versus $25 for a standard CV pedal – and also I’d be very unsurprised if I discovered that 128 values is not a fine enough resolution.
It’s surprising to me that the “MIDI Expression Quattro” is specifically for pedals. Wouldn’t any MIDI hub do the job equally well?
It translates normal-ass expression pedals to USB MIDI, no fancy MIDI pedals needed. And it claims it can be mapped as 14-bit pitchbend, which is 16384 values, though I don’t know the resolution of its ADC.