Page 1 of 1

triggers in osc?

Posted: Wed Mar 30, 2011 4:20 pm
by alex
Hi,

a brief introduction as I guess I will be posting regularly. I'm a viola player based in Mexico City. I have had the kbow for a while but only recently I updated to an intel computer, so now I'm actually able to use it. I will be using the bow for both improvised music and collaborations with composers.

The first project I'm working on is a piece by composer Iván Naranjo, for viola and Supercollider. What we are trying to do is quite simple (or so it seemed in the beginning) - use the grip triggers to activate processes in SC, and the hair sensor and accelerometers to modulate parameters of delays and pitch-shifts (in SC, too). The second part seems to be working fine, but the thing with the grip-triggers (double and long grip) we don't really know how to go about. Does anyone know how to get the triggers to send 0's and 1's through OSC, instead of the raw grip data from 0 to 4096 (and what commands these arguments are sent to)? Any help will be greatly appreciated!

Apparently (i know this belongs to the feature wishlist) there should be OSC outputs for the triggers in the midi/osc routing window. Or is there another solution?

Greets!

Alexander Bruck



Appendix: in case anyone is familiar with SC, here are two samples of code, stripped down to the relevant information - the first one (example A), that doesn't work, is the code using the Long_Grip command route as indicated in the OSC-monitor. The second one (example B) is the code we were using for test purposes ,to print out the x_accel values to SC, and this works just fine, provided OSC dump is on.

//example A

~respGrip = OSCresponder(nil,
                               "/KBow/Long_Grip",
                               {| time, responder, message |
                                var oscCommand, trg;

                                message.postln;
                                oscCommand     = message[0];
                                trg            = message[1];
                               }).add;


//example B


~respX = OSCresponder(nil,
                               "/KBow/X_Accel",
                               {| time, responder, message |
                                var oscCommand, trate;


                                message.postln;
                                oscCommand     = message[0];
trate          = message[1];
                               }).add;

Re: triggers in osc?

Posted: Thu Mar 31, 2011 3:50 pm
by Keith
Hi,

When designing the K-Data app we asked a lot of people what they needed (assuming they were writing their own application) and everyone said "Just give me the raw data". So this is what we did.

Extracting triggers from a smoothly changing grip pressure is rather straightforward. You can do a simple threshold with some hysteresis. A couple of timers and you have long and double.

Sorry not to be more helpful, but we put most of our efforts into data gathering and the K-Apps suite. You are the first to ask for this "middle ground" functionality. I will keep your request in mind.

-Keith

Re: triggers in osc?

Posted: Fri Apr 08, 2011 5:29 pm
by alex
Hello Keith,

thanks for your reply! Yes, we suspected the solution would be something like that and are (or rather - the composer is) working on it. The first "K-bow version" of the piece, Zona 2.11, will be premiered next week, on the 16th, in Buenos Aires. I will be posting about that experience later, in the tips + tricks section. If there's anyone interested I can also post the final version of the patch there.

Alex