Skip to content
brian crabtree edited this page Jun 15, 2021 · 5 revisions

crow v3


command reference additions/changes for v3

output

output[n]:clock(division)                    -- set output to clock mode with division

asl

TODO: something changed re: mutable, but not syntax related?

to( [volts, time, shape] )
loop(myasl)
held(myasl)
lock(myasl)
times(count, myasl)
asl._if(pred_fn, myasl)
asl._while(pred_fn, myasl)
dyn{name = init_value}
mutable(init_value)
mutable{name = init_value}

worth adding the asllib funcs:

note(mn, dur)
lfo(time, level, shape)
pulse(time, level, polarity)
ramp(time, skew, level)
ar(a, r, level, shape)
adsr(a, d, s, r, level, shape)

sequins

myseq = sequins{1,2,3,4}
myseq:reset()
myseq:step(n)
myseq:select(n)
myseq:cond(pred)
myseq:condr(pred)
myseq:every(n)
myseq:times(n)
myseq:count(n)
myseq:all()
myseq:once()
myseq:settable(new_table)
myseq()
myseq[n] = _
myseq.n = _

clock

_ = clock.run(fn [, args])
clock.cancel(coro_id)
clock.sleep(seconds)
clock.sync(beats)
_ = clock.get_beats
_ = clock.get_beat_sec
clock.start( [beat] )
clock.stop()
clock.transport.start = start_handler
clock.transport.stop = stop_handler
clock.tempo = _
_ = clock.tempo

ii

much of this isn't in the script reference but not sure it's new (?)

ii.help()
ii.pullup(state)
ii.raw(addr, bytes, rx_len)
ii.self.event_name = event_handler
ii.event_raw = raw_handler
ii.mydevice.help()
ii.mydevice.myparam( [args] )
ii.mydevice.get('myparam' [, args])
ii.mydevice.event = mydevice_handler

public

public(name, init_value [, type_limits] [, action])
-- potential method style
pubvar = public{name = init_value}
pubvar:range(min, max)
pubvar:options{...}
pubvar:type(str)
pubvar:action(fn)
-- potential table-style
public{ name    = _
      , default = _
      , range   = _
      , options = _
      , type    = _
      , action  = _
      }
-- actions upon public params
public.name = _
_ = public.name
-- cv i/o viewers
public.view.all( [state] )
public.view.input[n]( [state] )
public.view.output[n]( [state] )
-- remote fns (called by remote host, from library, not userspace)
public.discover()
public.update(name, value [, subkey])

calibrate

cal.save()
cal.source(chan)
_ = cal.input[n].offset
_ = cal.input[n].scale
cal.input[n].offset = _
cal.input[n].scale = _
-- same syntax for cal.output[n] as cal.input[n]

crowlib

crow.tell(event [, args])
delay(action, time [, repeats])
quotes(str)
justvolts(fraction [, offset])
just12(fraction [, offset])
hztovolts(freq [, reference])

Clone this wiki locally