spell-music / csound-expression

Haskell Framework for Electronic Music
320 stars 31 forks source link

Subinstr number of arguments is tied to nchnls (messing with music model) #41

Open anton-k opened 7 years ago

anton-k commented 7 years ago

Suprisingly it's true. It leads to bugs in the very simple programs like. By some strange design decision the number of outputs in the subinstr have to be not greater than nchnls`. We use subinstr to return the signals from "dynamic" instruments, for passsing the signals from child to parent:

> let guitar = fst $ loopSnd "StereoGuitarSample.wav"
> dac guitar

The csound proceeds with error:

INIT ERROR in instr 20: subinstr: number of output args greater than nchnls
ar0 ar1 subinstr.i  19  

Consider substituting the subinstr with reading from dynamically allocated channels.