this file (and the other in lua/softcut/) don’t get run directly. they get included into other scripts.
you can live-add these like this
h = require 'halfsecond'
h.init()
basically the important part is this initialization, a series of softcut commands (i’ve annotated with comments):
audio.level_cut(1.0) -- softcut master level (same as in LEVELS screen)
audio.level_adc_cut(1) -- adc to softcut input
audio.level_ext_cut(1) -- ext (sc) to softcut input
softcut.level(1,1.0) -- softcut voice 1 output level
softcut.level_input_cut(1, 1, 1.0) -- softcut input level ch 1
softcut.level_input_cut(1, 2, 1.0) -- softcut input level ch 2
softcut.pan(1, 0.5) -- softcut voice 1 pan center
softcut.play(1, 1) -- voice 1 play on
softcut.rate(1, 1) -- voice 1 rate 1.0
softcut.loop_start(1, 1) -- voice 1 loop start @ 1.0s
softcut.loop_end(1, 1.5) -- voice 1 loop end @ 1.5s
softcut.loop(1, 1) -- voice 1 enable loop
softcut.fade_time(1, 0.1) -- voice 1 fade time
softcut.rec(1, 1) -- voice 1 enable record
softcut.rec_level(1, 1) -- voice 1 record level
softcut.pre_level(1, 0.75) -- voice 1 prerec (overdub) level 0.75
softcut.position(1, 1) -- voice 1 set position 1.0s
softcut.enable(1, 1) -- enable voice 1
softcut.filter_dry(1, 0.125); -- voice 1 filter settings...
softcut.filter_fc(1, 1200);
softcut.filter_lp(1, 0);
softcut.filter_bp(1, 1.0);
softcut.filter_rq(1, 2.0);