1 from calfbox
import cbox
3 def cmd_dumper(cmd
, fb
, args
):
4 print ("%s(%s)" % (cmd
, ",".join(list(map(repr,args
)))))
7 cbox
.start_audio(cmd_dumper
)
10 Document
= cbox
.Document
12 scene
= Document
.get_scene()
14 instrument
= scene
.add_new_instrument_layer("test_sampler", "sampler").get_instrument()
15 pgm_no
= instrument
.engine
.get_unused_program()
16 pgm
= instrument
.engine
.load_patch_from_tar(pgm_no
, 'sonatina.sbtar', 'Brass - Horn Solo.sfz', 'HornSolo')
17 pgm
.add_control_init(7, 127)
18 pgm
.add_control_init(10, 0)
19 print (pgm
.load_file('Brass - Horn Solo.sfz').readlines())
21 print (list(pgm
.get_control_inits()))
22 instrument
.engine
.set_patch(1, pgm_no
)
27 cbox
.call_on_idle(cmd_dumper
)