PDA

View Full Version : Sending OSC messages



Spandex
06-08-2010, 11:35 PM
I'm building an editor for my Waldorf Pulse using TouchOSC on iPad and Osculator to convert this into MIDI.


The Pulse has a good MIDI implementation - with all parameters mapped to CCs.


A few of them only have a small range of possible values such as 0-15 for "Modulation Source" where the 0-15 represent 16 different mod sources. I've managed to make Osculator scale things into the correct range but now I'm looking for a way to do visual feedback on my TouchOSC screen.


I've thought of a couple of ways to do this:


1) Change a label on the screen to show the mod src according to the value (0=no src, 1=LFO, 2=LFO*MW etc)


2) Have some kind of set of mutually exclusive toggles (i.e. radio buttons).


TouchOSC doesn't support option 2 and I don't think Osculator (yet) supports option 1 by allowing automatic sending of OSC messages such as:


/1/label-modsrc LFO1


So I believe that, for now, I'll have to create a small PD patch to send the messages back to TouchOSC. But maybe this is something that Osculator could do in the future without requiring any other software? i.e. I could split the fader 16 ways and assign a different text string to each of the 16 divisions.


Thanks for a great product by the way. I'm buzzing off how easy it's been to start building my editor. I've got all the envelopes and filter controls done already. Just working on the oscillators now :)

Spandex
06-09-2010, 09:14 AM
Here's an annotated screenshot of where I'm at - in case anyone has any suggestions about how I might do this.


http://spandex.dreamhosters.com/PulseOSCLabelled.png


There are two examples of what I'm looking to do in here. The bottom one was how I originally intended to do this, until I realised I couldn't have the "src" label change.


The top one actually works ok... I've just put labels above the different slider positions. So if you move the sliders under the right labels, they output the right values. It doesn't look so good tho :)


Any better ideas?

camille
06-09-2010, 10:23 PM
What about using buttons to output only the value corresponding to Pulse/Saw/Tri/etc ?

This would be a bit awkward to configure, but knowing that OSC values have a range from 0 to 1 and that MIDI is scaled to the range 0 to 127, you just have to put the same values in output min and output max to the exact control change value you wish, divided by 127.


For instance :

For the button Pulse, say the control change value is 12 (I don't know the exact value), you have to configure the scalings this way :


Input min : 0

Input max : 1

Output min : 12/127 = 0.094488188976378

Output max : same value.



Hint: use the calculator application to do the math, and then copy and paste the result in the field.


Best,

Cam

Spandex
06-11-2010, 03:57 PM
Thanks for the suggestion.


I was going to do that, but you don't get visual feedback. If you use momentary switches, there's no record of what it's set to, and if you use toggling switches, you have to remember to turn them off when you switch to a different one.


This would be solved if TouchOSC supported radiobuttons :)


Also, thanks for the description of how to set the output min/max... I guess it's obvious but I hadn't really thought that you could have the same value for both and turn it into a simple trigger!

camille
08-02-2010, 01:53 PM
Hey Spandex,


You should want to try the new version 2.10 and follow the steps as described here to dynamically change the string in a label :


In TouchOSC Editor create a layout with a fader (/1/fader1) and a label (/1/label2).

Sync with TouchOSC, and touch the fader, the message is now registered in OSCulator.

Duplicate the /1/fader1 message (Command-D)

First message, assign a MIDI CC event and set the scalings to output min = 0 output max = 4. This will output MIDI CC values 0 to 4 distributed all along the length of the fader.

On the second duplicate, assign a event of type OSC Routing, and choose "New …" in the Value menu, this will bring the Parameters window on the OSC tab.

Click on the + button to add a new routing, click on the pencil to bring up the OSC Route Editor.

In the rewrite address field, type /1/label2

Delete everything from the Arguments field, and type : (no_src,PWM,Sine,Square)

Notice that there are no spaces here! Type enter to validate. Those values are fictional, I don't know exactly what you Waldorf Pulse needs, so this at your discretion to adapt this tutorial to your needs.




What will happen is that OSCulator will send the MIDI values 0, 1, 2 and 3 and update the string label as well with text "no_src", "PWM", "Sine" and Square".


Best,

Cam

Triff
04-30-2011, 03:28 PM
Hi Camille,

I don't understand i tried that exactly how you explain but it don't works...
On the ipad i can see the green and the red led switching so there's a good feedback routing. Where is the mistake? Did i miss something? I'm gonna shot me a bullet in the head!! 8(

Triff
04-30-2011, 06:50 PM
ok it works, i don't know how... I downloaded the Spander layout to see it as an exemple and since that i can do my own settings with labels.
What i can't do, is to set an i:arg[0] as him. There's no index, if i type that: arg[0], it seen as a text display in the label on the ipad...
For the moment i must export from Spander's project and import in my project. 8(

camille
05-01-2011, 01:14 AM
Hey Triff,

When you open the OSC Routing Editor, you should see blue tokens.
Just drag them in the 'arguments' field where you need it, and you should be done.

Best,
Cam