![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: How to Concatenate mulitple arrays |
rafe Member |
![]() ![]() ![]() Hello I have the following arrays and I would like to concatenate the contents of each into 1 larger array. (1 to: 6) collect: [:i | (2**i) inverse ] I tried using the aCollection message which resulted in an"extra characters after the period" error. - not entirely sure why. I have searched the smalltalk quick reference for other options but that message seems like it's on the right track. Thanks IP: Logged |
SSC Administrator |
![]() ![]() ![]() quote: You could use commas to concatenate the Arrays, for example (1 to: 6 collect: [:i | (2**i) inverse ]), IP: Logged |
rafe Member |
![]() ![]() ![]() Hello SSC Thanks that works great in my text window! Very elegant, thanks. However I get an error message "instance of #clip to 1 sent to" my array when i attempt to use this in in the delay scale field of a delay protoype. If anyone has time to explain why this is the case I would appreciate it. Here's the final expresion !DelayScale of: # ({(1 to: 6 collect: [:i | (2**i) inverse ]), (1 to: 6 collect: [:i | (3/(2**i)) ]), (1 to: 6 collect: [:i | (1/3)* (1/(2**(i-1)))]) }) The purpose is to have a sync delay expression that creates the standard note subdivisions in one master array. if you evaluate the expresion in a text file there is one value greater than 1 but i removed that value in the delay sync field, during a test and still received the error. thanks rafe IP: Logged |
SSC Administrator |
![]() ![]() ![]() Since you are generating the Array, you don't need the pound sign notation. You could do it this way instead: !DelayScale of: ((1 to: 6 collect: [ :i | (2**i) inverse ]), (1 to: 6 collect: [ :i | (3/(2**i))]), (1 to: 6 collect: [ :i | (1/3) * (1/(2**(i-1)))])) IP: Logged |
rafe Member |
![]() ![]() ![]() Ah. Thanks. I never realized that detail IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.