![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: MIDI CC#s to GlobalControllers |
sarth Member |
![]() ![]() ![]() Howdy, I am trying to sync KYMA up to an Electrix Repeater, and besides a number of MIDI beat clock oddities, I cannot get KYMA to start/stop analog sequencers in response to the repeater. The repeater is a little odd (I think) and sends a MIDI cc 85 ( value 127?) message when it starts, and a CC 87 message when it stops. I can't figure out how to convert those to different messages into a start/stop controller. If it were 2 different vaules of the same CC, I'd be in business, but I don't think the repeater is varying the CC values, just resending 127, or something. Hw can I have a parameter such as an analog sequencer gate, retrigger every time KYMA recieves a message !cc85 even if it's the same value? The closest I got, was using !cc85 asToggle, but for somereason, it toggles EVERY OTHER time it recieves a start message from the repeater. ??? Anyway, even if that weren't wierdly true, I had to go a number of steps removed to make the !cc85 trigger and/or retrigger, and the !cc87 stop by converting !cc85 into a controller called !start, (((!Start asLogicValue) fullRamp: 0.001 s) + ((1 - !Start asLogicValue) fullRamp: 0.001 s)) ramp: 0.1 s and that outputs !RealStart then I do the same thing with !cc87 and output !stop which outputs !realstop then I combined them into !StartStop with: !RealStart - ((!RealStop lt: 0.5 asLogicValue) sustainBy: (!RealStart gt: 0.5)) so because of all the ramp, the !start can be used to retrigger, but the !stop stops playback, but I can't get any of it to work anyway because the toggle only toggles half the time in the first place. any thoughts? -- Sarth IP: Logged |
dennis Member |
![]() ![]() ![]() I'd try the "hasChangedReset:" real-time expression method to decode the start/stop MIDI commands (instead of "asToggle"). I'm not in front of my Kyma right now or I'd try it for you. IP: Logged |
sarth Member |
![]() ![]() ![]() Hmm, I'm not sure that would work, 'cause the problem is that the cc value doesn't change, it's always 127. But besides that, I've never gotten that expression to work. Can anybody help me out with that? The .pdf sez it's called hasChangedReset, and the example only uses hasChanged: is that a misprint or is that correct? IP: Logged |
dennis Member |
![]() ![]() ![]() I got a chance to play around with this a little... Set-up: I configured a box to send MIDI CC 85 and CC 87. When I pressed button A, the box sends MIDI CC 85 with value 64. When button A is release, the box sends MIDI CC 85 with value 0. Button B behaves similarly using CC 87. Next, I have a SoundToGlobalController with So when I press button A, !Run becomes true. It remains true regardless of further MIDI CC 85 messages until I press button B. I'm not sure if this does what you need but at least it explains the hasChangedReset: message. BTW: You can access the "true" spelling of message via the shift-control-H shortcut when the cursor is in a hot parameter field. The shortcut displays a drop-down list containing all legal real-time operators. Hope this helps! IP: Logged |
sarth Member |
![]() ![]() ![]() Hi, Thank for the explanation of hasChangedReset, that was informative. The problem is that unlike your test scenario, the Repeater only send 1 value (127) for each CC#. So it send cc85 127 for start and cc87 127 for stop and never sends anything else. Making it really difficult to convince Kyma to treat these messages as new information. -- Sarth IP: Logged |
Bill Meadows Member |
![]() ![]() ![]() Look at Dennis' example again... one controller resets the other. So if I understand your "Repeater" correctly, the "STOP" message would reset the "START" message, and vice versa. Seems like it should work. IP: Logged |
pete Member |
![]() ![]() ![]() Hi Bill I think the problem is that kyma (quite rightly) asumse that if a midi controller sends no message , the value from the last message received is to be used. Therefore the first time the start controller sends a 127 value , it could work. But a second 127 message sent by the start controller has exactly the effect as if no message had been sent. Dennis's flip flop action would work, but because both the set and reset inputs are being sent value 127 all the time wether a message is being sent or not, it simply does nothing. Of cause you can't emulate the problem with two push buttons on a VCS because the buttons send out 1 values when pushed and (more importantly) 0 values when released. What kyma would need to have is a message/nomessage detector. I think there is some low level code in kyma that gives access to the raw midi messages but I don't know what it is. P.S. kyma is right to treat midi controlers in this way .It is the fault of the transmitting device for is not sending out 0 values after the 127s, or not using another type of midi data for stop and start info, that is the cause of the problem. IP: Logged |
Bill Meadows Member |
![]() ![]() ![]() So the Repeater sends multiple "start" messages with no "stop" message in between? How odd - If that is so, then you should try to build a "mono-stable" type structure. i.e. - one that resets itself after a short period of time. I haven't tried this, but I imagine that such behavior could be attained with delay and feedback. Where's the guy that posted those logic gates a while back? He might have an idea about this.
You'll need a self-resetting structure... [This message has been edited by Bill Meadows (edited 23 January 2002).] IP: Logged |
pete Member |
![]() ![]() ![]() Hi Bill I'm the guy who posted the logic gates. I obviously didn't explain it very well. Its not that the controler is repeatedly sending out start info and the controler does send out stop info on a different controller. The problem is that when the start info is sent, kyma is holding that info so that the next time the start info is sent the info is just the same. Same with the stop info. its being sent , but not being interperated as a change. Its like having two isolated rocker light switches . one for the start and one for the stop. The first time you press the start switch on ,a light comes on. If you the switch the stop switch on the stop light comes on. Now if you try to turn the start switch on again you can press it has hard as you like but because it's already on it won't change anything. You can also try to turn the stop switch on as much as you like but nothing will happen because none of them are ever getting turned off. The controller is sending out both stop and start messages, but they are telling kyma to set the cc values to the same values that they already are already set to. Hence nothing happeneds and this is just as if you pulled the midi lead out compleatly. The only way to make it work is to 1)fit return springs on the rocker switches or 2) use non latching push buttons instead. The first could be done buy merging another machine into the midi stream that keeps sending out 0 values on the same controler types that stop and start use (not realistic) The second could be done by not using the kymas !ccXX mechanisum which latches the input values, but instead get to the raw midi data. IP: Logged |
bfelton Member |
![]() ![]() ![]() Forgive me if I'm misunderstanding or overlooking something here, but couldn't you write a script that would reset the value cached with the midi cc#? Ie, make something that sets !Run to true and sets the midi cc# value to a reset state? cheers, IP: Logged |
sarth Member |
![]() ![]() ![]() That's where I'm at. I actually made it so the cc87 (stop) resets the cc85, but then the cc87 gets pinned, and if you try to make the cc85 reset the cc87 as well ... you get a recursive loop and nothing works at all.
!cc85 asToggle .... the value does switch from 0 to 1, but only every other time it recieves the cc85 127. So I press PLAY on the repeater, the output goes to 1, I press Play again, nothing, I press Play again, the output goes to 0, etc ... Same thing with STOP (cc87) Isn't that just odd? -- Sarth IP: Logged |
bfelton Member |
![]() ![]() ![]() Yes, very odd indeed. Would you mind sharing the code you used to do this? I'd be curious to see, as if you're doing it with scripts there should be a way to avoid the infinite loop recursion... cheers, Bill IP: Logged |
dennis Member |
![]() ![]() ![]() Hmmm, interesting problem indeed! I like your "rocker switch" analogy, Pete. And I agree that Kyma is doing the right thing. The Repeater's CC85 and CC87 commands are ambiguous. The real-time expression evaluator won't re-evaluate: So it seems that you'd need some low-level Kyma code to recognize the raw MIDI. At least if you to control Kyma directly with the Repeater. An expedient solution (spelled w-o-r-k-a-r-o-u-n-d) might be to use a product like MIDI-OX to remap the CC's to a NoteOn/Off sequence. IP: Logged |
Bill Meadows Member |
![]() ![]() ![]() This would be easy to filter with MAX... IP: Logged |
pete Member |
![]() ![]() ![]() Actualy Sarth your strange "asToggle" anomally does show that the masked messages are getting through some how, even though its action is not sensable. If only it did something every time the message was sent because there are ways to turn the square wave into a pulse wave (by putting it through a hi pass filter) ,and then rectifying it (Abs value) . This would produce the signals needed to feed Dennis's "hasChangedReset" formular. Or using Bill Ms monostable idea with negative feedback. I don't expect having to issue two start commands and two stop commands every time you want to make it start and stop is an option? IP: Logged |
sarth Member |
![]() ![]() ![]() Hmmm, so I taked to Kurt and he came up with this: If I multiply the cc85 by !Random I get a new random # every time. So that's a pretty cool workaround, or so I thought. But I guess I don't understand hasChangedReset: I thought It would ouput a 1 every time the input changed, and then that 1 would be reset to 0 if the argument became greater than 1. But it seems hasChanged refers only to a logical value ?? so I can't do !StartRandom hasChangedReset !Stop, because !StartRandom changing values doesn't seem to cause it to output 1. Also it goes back to 1 again if the argument goes back to zero. so if I do (!fader gt:0.5) hasChangedReset: !Keydown once !fader goes past 0.5, !start goes to 1, and if I press a MIDI Key, !start goes to 0, but if I release the key, !start goes back to 1. Hmmm. -- Sarth IP: Logged |
pete Member |
![]() ![]() ![]() Hi Sarth I've done some experimenting with "hasChagedReset" and it has nothing to do with "has the input changed by any amount". What it actuly is, is a set/reset flipflop. If the left argument moves away (in an upward direction) from zero then the output becomes one (as long as the right argument is zero).The left argument can return to zero and the output will still remain latched at one. If you then move the right argument from zero to anything above zero (asuming that the left argument is still at zero) , the output goes to zero and remains there even when the right argument returns to zero. Your right that "has~ChangedReset" it is purely a logic thing and changeing any argument from say 0.2 to 0.3 has no effect at all, unlike the name seems to imply. I think that maybe ssc choose not to call it "SRFlipFlop" as they may have thought that non programers wouldn't know what it means. I'm just guesing here of cause. So this means that you will need a two signals that always rest at zero but go positive whenever a change happends. It could be done first starting with kerts "cc85 * !random"and then putting this through a one sample delay. Then by subtracting the non deleyed from the delayed you will get a streem of zeros with random non zero values only when a change happends. If you then find the absolute value of that , the all the random pulses will be forced to positive. This might just work captin. But it might need the delays to be set to (current sampler rate/1khz) samples, instead of one sample. This is because the "hasChangedReset:" formular works at 1 khz intervals and might miss the non zero spikes. This is not the sintax you would use but it tells you how to calculate how many samples delay to set the delays to. hope it makes sence IP: Logged |
pete Member |
![]() ![]() ![]() Just thought, if you set the delays to 1 ms you won't need to worry about the current sample rate. And by the way, the reason you was'nt seeing the "hasChangedReset" latching action in your first experiments, was because the argument that you're not changeing has to be at zero value for you to see a latch happen to the argument you are changing. [This message has been edited by pete (edited 24 January 2002).] IP: Logged |
sarth Member |
![]() ![]() ![]() Wow. That completely works. Thanks so much. -- Sarth IP: Logged |
pete Member |
![]() ![]() ![]() My pleasure Pete 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.