Is anyone else using a crow and a 16n faderbank to control Just Friends?
I’ve been trying to poll the faderbank and update each JF voice independently to get simple drone like synth control going - as a proof of concept for more complex things, but I’m finding things very unstable. Not sure if it is my code, or some other issue.
The behaviour I’m seeing is that the script will run and then lock up and ii commands stop responding. Occasionally I’ve seen error messages about the ii lines being low, which I understand can also be an indicator of the ii bus being overloaded.
I’ve only got the crow, Just Friends and the 16n on this ii bus - no other modules. The 16n is connected via a passive DIY connector that converts from the TRS jack to i2c. It works fine when I query the 16n interactively from druid. AFAIK, hardware-wise, I don’t need a powered bus for this config, but maybe I do??
On the scripting front, it seems that if I try polling too quickly, things lock up. Even at a poll rate of 0.5 sec, which is very slow, this script works for a bit and then locks up. I’ve seen the ER301 16n script set to poll the 16n at 0.02sec, so I figure I’m doing something wrong here.
Here’s the basic script I’m using. Any suggestions welcome.
Metro[1] polls the 16n, one fader at a time, and stores pitch and volume levels.
Metro[2] updates JF voices (one at a time) with the relevant pitch and volume levels.
function init()
ii.jf.mode(1)
metro[1].time = 0.5
metro[2].time = 0.5
end
pitch = {0,0,0,0,0,0}
vol = {0,0,0,0,0,0}
ii.faders.event = function( e, value)
if e.name == 1 then
pitch[1] = value
elseif e.name == 2 then
pitch[2] = value
elseif e.name == 3 then
pitch[3] = value
elseif e.name == 4 then
pitch[4] = value
elseif e.name == 5 then
pitch[5] = value
elseif e.name == 6 then
pitch[6] = value
elseif e.name == 9 then
vol[1] = value
elseif e.name == 10 then
vol[2] = value
elseif e.name == 11 then
vol[3] = value
elseif e.name == 12 then
vol[4] = value
elseif e.name == 13 then
vol[5] = value
elseif e.name == 14 then
vol[6] = value
end
end
metro[1].event = function()
ii.faders[1].get(next_fader)
if next_fader >= 16 then
next_fader = 1
else
next_fader = next_fader + 1
end
end
metro[2].event = function(c)
f=c%6+1
ii.jf.play_voice(f,pitch[f],vol[f])
end
metro[1]:start()
metro[2]:start()