![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Two queries... | |
JackRosete Member |
![]() ![]() ![]() I was wondering whether it is possible to use an array in the Value field of MIDIOutputController, the same with Channel and ControllerNumber fields, so that I can algorithmically specify a whole bunch of !Faders, channels and controller numbers? I have several hundred at present so I'm looking for a better solution that 100's of MIDIOutputControllers! Or is there another prototype for this sort of thing? Also, I was wondering whether there is a way to trigger the 'r' dice roll via MIDI? Thanks! Jack IP: Logged | |
SSC Administrator |
![]() ![]() ![]() MIDI Program change 128 should roll the dice for you. Any time you need a large number of Sounds whose parameters differ from one another in a systematic way, the Script module is probably the best way to go. IP: Logged | |
JackRosete Member |
![]() ![]() ![]() How could I specify the following Script algorithmically? HatsToggle start: 0 s HatsToggle: !HatsToggle01 Channel: 1 ControllerNumber: 1. Thanks! IP: Logged | |
JackRosete Member |
![]() ![]() ![]() I thought maybe this should work but no success: HatsToggle start: {(1 to: 16) collect: [:start | 0 s]} HatsToggle: {(1 to: 16) collect: [:HatsToggle | (!HatsToggle suffix2: HatsToggle)]} Channel: {(1 to: 16) collect: [:Channel | 1]} ControllerNumber: {(1 to: 16) collect: [:ControllerNumber | ControllerNumber]}. IP: Logged | |
SSC Administrator |
![]() ![]() ![]() Maybe if you put the loop on the outside (rather than on the inside of your expression), for example 1 to: 8 do: [:i | hatsToggle start: 0 s toggle: 'HatsToggle' suffix2: i controlNbr: i] IP: Logged | |
JackRosete Member |
![]() ![]() ![]() Can't seem to make it work! In the code you gave me... 1 to: 8 do: [:i | hatsToggle start: 0 s toggle: 'HatsToggle' suffix2: i controlNbr: i] ...what does the toggle: mean? Is that a Smalltalk expression? I've tried the following code based on your example: 1 to: 8 do: [:i | HatsToggle start: 0 s hatsToggle: 'hatsToggle' suffix2: i channel: 1 controllerNumber: i]. Not sure if I've misinterpreted your code though... I get this error message: The message #abs, sent to 'hatsToggle', an instance of class ByteString, was not understood. What am I doing wrong? Thanks! IP: Logged | |
JackRosete Member |
![]() ![]() ![]()
IP: Logged | |
JackRosete Member |
![]() ![]() ![]() I've made a couple of adjustments to the sound, and now I tried this code: 01 to: 16 do: [:i | hatsOutputControl start: 0 s But again no luck! The code creates one fader called !HatsToggle, instead of 16 called !HatsToggle01, !HatsToggle02 etc. Can't figure out what's wrong! [This message has been edited by JackRosete (edited 02 July 2006).] IP: Logged | |
HectorBenard Member |
![]() ![]() ![]() Shouldn't 'hatsToggle' be a hot value? Something like: (1 to: 8) do: [:i | HatsToggle start: 0 s toggle: (!hatsToggle suffix2: i) channel: 1 controllerNumber: i ]. This still gives an error message though, and if I leave the parentheses out it only gives a single fader (ignoring the suffix2: i message) One thing I find frustrating is that there is no reference in the manual to the use of suffix2, except for a couple of simple examples (and nothing in the smalltalk quickreference), so in cases like this it is difficult to look it up. H [This message has been edited by HectorBenard (edited 02 July 2006).] IP: Logged | |
HectorBenard Member |
![]() ![]() ![]() Oops, you beat me to it! ![]() Cheers, H IP: Logged | |
JackRosete Member |
![]() ![]() ![]() I've tried a number of combinations for the line: hatsSwitch: !HatsToggle suffix2: i with parenthesis and square brackets etc. But as you pointed out, these all give error messages, and without them the - suffix2: i - seems to have no effect. Funnily enough - suffix2: i - works fine with collect: but not with do: Unfortunately I can't get collect: working with the rest of the Script! [This message has been edited by JackRosete (edited 02 July 2006).] IP: Logged | |
HectorBenard Member |
![]() ![]() ![]() I see what you mean, but I think it's more a matter of the suffix2 message working in the context where you tried it with collect (as in the examples in the manual), but not in this context. When I try this: (1 to: 8) collect: [:i | HatsToggle start: 0 s channel: 1 controllerNumber: i toggle: !hatstoggle suffix2: i]. I get the same result as with the do loop. It may have something to do with the fact that the suffix2 is being used at the same time as the green variables are being asigned a value, becuase it seems to work fine when you use it in a context that doesn't involve this scenario (but when you use do you just don't see the results posted). IP: Logged | |
JackRosete Member |
![]() ![]() ![]() Yes, there could be a problem with the green variables in this scenario. I've been at it for hours and I can't think of any other solution that I haven't already tried. I think I'll have to wait and see if SSC can help me out! Odd stuff IP: Logged | |
SSC Administrator |
![]() ![]() ![]() OOPS! We left of some parentheses around the suffix2: message. They are needed so that Kyma knows that you mean to create a new hot variable (otherwise, Kyma thinks you are trying to set the green variable 'suffix2' to the value of i). 1 to: 8 do: [ :i | HatsToggle start: 0 s channel: 1 controllerNumber: i toggle: (!hatstoggle suffix2: i)]. IP: Logged | |
HectorBenard Member |
![]() ![]() ![]() That is the strange part, it still doesn't work with the parentheses! It still gives an error message. [This message has been edited by HectorBenard (edited 02 July 2006).] IP: Logged | |
JackRosete Member |
![]() ![]() ![]() I also get the following error message: Error: The message #suffix2:, sent to 'HatsToggle, an instance of class ConcreteEvent, was not understood. Am I right in thinking that Kyma is not recognising !HatsToggle as a hot variable for some reason? IP: Logged | |
SSC Administrator |
![]() ![]() ![]() 1 to: 8 do: [:i | HatsToggle start: 0 s hatsToggle: ('hatsToggle' asHotValue suffix2: i) channel: 1 controllerNumber: i]. (sorry, I dashed off the first response in rush just as I was leaving for the night--should have checked it before posting it). This one works. IP: Logged | |
JackRosete Member |
![]() ![]() ![]() I had tried using asHotValue, but not with parenthesis. Shows how important the details are ![]() Thanks! IP: Logged | |
HectorBenard Member |
![]() ![]() ![]() Shouldn't !hatsToggle and 'hatsToggle' asHotValue be equivalent expressions? Why is there a difference if the latter results in the former when evaluated? IP: Logged | |
SSC Administrator |
![]() ![]() ![]() In a Script, it's necessary to use the asHotValue message. (It has to do with the order of when expressions get evaluated and when hot values are replaced with actual "event sources".) IP: Logged | |
HectorBenard Member |
![]() ![]() ![]() I see. Thanks for the explanation! H 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.