I'm using this code to create a 2 dimensional grid of VCS controls:
(!Column of: (
!Row of: (
1 to: 4 collect: [:j |
1 to: 4 collect: [:i |
!Note suffix: (i printString, '_', j printString)
]
])
)) nn
If I put this code in a text file and compile it (ctrl-Y) I get:
(!Column of: (!Row of: #( #( !Note1_1 !Note2_1 !Note3_1 !Note4_1 ) #( !Note1_2 !Note2_2 !Note3_2 !Note4_2 ) #( !Note1_3 !Note2_3 !Note3_3 !Note4_3 ) #( !Note1_4 !Note2_4 !Note3_4 !Note4_4 ) ))) nn
Which looks OK... I think. But when I put the code in the Frequency parameter of an Oscillator Sound, I get
"The message suffix: is being sent to something other than an EventVariable..."
If I follow the advice of the error message and put curly brackets around the code that makes the array then I get an error that 'j' is an undeclared variable.