I believe currently ASL actions are always associated to an output, you can’t really have them “free running”. I have still not really taken the time to fully understand how ASL is implemented but I believe that an ASL is sort of an array of “steps” to(volts, seconds, shape), which crow’s firmware uses to pre-calculate interpolated CV values for a particular output. You can’t really send I2C messages as fast as crow is updating its DAC. You can evaluate some Lua to determine the volts or seconds parameter though, so you can maybe sort of schedule occasional I2C messages this way:
function ii_to(dst, time) -- 🩰
return to(
function ()
ii.txo.cv(1, output[1].volts)
return dst
end,
time
)
end
function init()
output[1](
loop { ii_to(1, 0.25)
, ii_to(2, 0.25)
, ii_to(3, 0.25)
, ii_to(4, 0.25)
, ii_to(3, 0.25)
, ii_to(2, 0.25)
, ii_to(1, 0.25)
}
)
print('ok')
end
This gives a steppy LFO from TXo output 1 that is sort of like sample-and-holding the smooth voltage that crow is outputting. Expanding on this idea you can generate the table of waypoints programmatically:
function ii_lfo(vmax, period, steps)
local action = {}
local midpt = math.ceil(steps/2)
local v_step = vmax / midpt
local step_time = period / steps
for i=1,midpt do
action[#action + 1] = ii_to((i - 1) * v_step, step_time)
end
for i=midpt,steps do
action[#action + 1] = action[midpt - (i - midpt)]
end
return loop(action)
end
function init()
output[1](ii_lfo(5, 2, 20))
print('ok')
end
Lots of interesting functionality related to ASL is getting added in each firmware release, so there may be some other ways to do this kind of thing, either at present or in the future.