![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: smalltalk index array in pitch field analog seq | |
rafe Member |
![]() ![]() ![]() hello this code works in my evaluation window but when i paste it into the pitches feild of an analogue sequencer kyma won't let me move to another sound in the editor. my intent is to expand on this base program to attempt to add a hot value for seed and to use the input keynumber as a center value for a window into a larger collection stored in mode. { | r mode keypit| keypit := 'keypitch' asHotValue. i am not clear what the problem is with the following code either but this always evaluates with the error message error during literal evaluation after i get a dialogue window informing me that the variable keypitch is not used. is this causing an issue because its a reserved word? DIDN'T WORK mode:= #(40 42 43 45 47 48 51 52 54). thanks rafe IP: Logged | |
SSC Administrator |
![]() ![]() ![]() I think you are getting the message about keypit never being used because you assign a value to keypit here: keypit := mode at: ((r next * 8) rounded +1))nn but there are no further references to it after that. If you want keypit to be a center value, you could try adding the random value to it instead, for example: (keypit * (mode at: ((r next * 8) rounded +1))) nn IP: Logged | |
rafe Member |
![]() ![]() ![]() quote: i used your final expression, modified, to get the basic structure to work in the sound. -> ( 1 to: 15) collect: [ :i | (( (keypit/keypit) * (mode at: ((r next * 8) rounded +1)))nn hz) but i am a bit confused about why assigning a value within a loop isn't considered a valid instruction?
[This message has been edited by rafe (edited 10 December 2008).] IP: Logged | |
SSC Administrator |
![]() ![]() ![]() quote: If you like, you could simplify this expression because (keypit/keypit) will always equal 1.
quote: Nothing invalid about assigning a value to a variable inside a loop. The message was just warning you that the variable was never used after you'd assigned a value to it. IP: Logged | |
rafe Member |
![]() ![]() ![]() I thought it may be simpler to ask if i am on the right track with my logic in tackling this code so i have ' sketched' an outline below that needs syntax work.
thanks in advance rafe [This message has been edited by rafe (edited 11 December 2008).] IP: Logged | |
rafe Member |
![]() ![]() ![]() why does this code return the error r2 r3 value are not used if the periods are removed on the random statements - or only evaluates the first loop in the series if the periods are in place { | r mode keypit r2 r3 | keypit := 'keypitch' asHotValue. r := Random newForKymaWithSeed: 4400. r2 := Random newForKymaWithSeed: 7. r3 := Random newForKymaWithSeed: 3906. [This message has been edited by rafe (edited 12 December 2008).] IP: Logged | |
SSC Administrator |
![]() ![]() ![]()
code: And then set StartIndex to: !Seed of: #(0 15 30) And EndIndex to: !Seed of: #(14 29 44) I think you can then experiment with your three different random sequences generated from three different seeds. IP: Logged | |
rafe Member |
![]() ![]() ![]() i have one simple question what is the smalltalk message to send to an expression with a hotvalue to have the event expression output its value? Value and Self are illegal messages to send to a hotvalue. i cannot find this in the manual. this is the specific statement i need to output the values for. ( 1 to: 15) collect: [ :i | (keynum + (mode at: ((r next * 8) rounded +1))nn)]
BUT I would still like to know what the appropriate message is to send to a event expression with a a hot value - helpful for debugging.
rafe [This message has been edited by rafe (edited 12 December 2008).] IP: Logged | |
SSC Administrator |
![]() ![]() ![]() quote: If you put an event expression into a SoundToGlobalController, it will display its value in the VCS for debugging purposes. 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.