# set variables (number of channels and write-enable flag) ;
out-channels 1;
write-output 1;

# load the patch ;
load-patch bang;

# wait a second for any loadbang actions to finish and start the piece;
1 pd~ sequencer-start 1;
running 1;
open-control-readsf vector/example-out.wav;
writesf start;

# wait another second and start playing input sound into patch;
1 open-input-readsf vector/example-in.wav;

# set off event numbers 1 and 2 in patch;
1 pd~ sequencer-step bang;
1 pd~ sequencer-step bang;

# after one more second the piece is over;
1 running 0;
