ccrma / chuck

ChucK Music Programming Language
http://chuck.stanford.edu/
GNU General Public License v2.0
799 stars 127 forks source link

ChucKing of UGen Arrays; large to small doesn't modulo. #437

Closed terryzfeng closed 4 months ago

terryzfeng commented 4 months ago
3 => int NUM_CHANNELS;
Noise noise[NUM_CHANNELS] => ADSR adsr[NUM_CHANNELS] => Pan2 pan;

It's throwing a runtime exception, appears to try to connect a third channel when it should modulo. 1.5.2.3

below you can test in 1.5.2.4-dev https://ccrma.stanford.edu/~tzfeng/webchuck-ide/?code=3+%3D%3E+int+NUM_CHANNELS%3B%0ANoise+noise%5BNUM_CHANNELS%5D+%3D%3E+ADSR+adsr%5BNUM_CHANNELS%5D+%3D%3E+dac%3B

gewang commented 4 months ago

4th time is the charm; good catch; addressed in 64e6ae3 and added to unit test