PDA

View Full Version : ThumbJam (iPhone) w/ OSCulator - only two Event Types available



meowsqueak
04-10-2011, 01:16 AM
I have had OSCulator working fine with OSCemote so I'm confident OSCulator is working fine.

I haven't been able to find much information about this online, so I assume OSC support in Thumb Jam is pretty new and it's early days yet. That said I've tried to get ThumbJam to talk to OSCulator so that I can convert to MIDI and use it to drive Reason. I'm able to get an OSC connection and when I send a note from ThumbJam I get the following messages appearing in OSCulator:

/tj/1/note
[0]
[1]
[2]

And all four entries show a 'yellow square' to indicate activity. So that's good.

However when I click on 'Event Type' in the column to the right, the drop-down menu only contains two selectable entries: "OSC Routing" and "Console Log". This is in direct contract with the menu I see when using OSCemote, which shows a *lot* of possibilities, including MIDI CC messages.

I spent quite a while exploring OSCulator, reading the manual (did I miss something?), and comparing OSCemote configurations with my new one, but I haven't been able to get past this, so I'm turning to the forums for help. Does anyone know why OSCulator only has these two supported Event Types for these incoming ThumbJam messages?

camille
04-10-2011, 01:39 AM
It looks like a nice application, full of features, I'll have to try it!
By reading the user guide, I can give you some hints:

Actually, you should have access to four menus. This has to do with the nature of OSC message. The OSC message you are seeing is composed of 3 arguments. So you have a menu to act on the message with all of its arguments (/tj/1/note), and you can also act on the three arguments.

The menu you are referring to if the message configuration. It is most of the time not useful, unless you want to do something with the OSC message as a whole. This is why you can only route it (OSC Routing), or print it (Console Log).

If you try to assign an event to one of the three arguments, you will have access to the Events that deals with numeric values. In Thumbjam's user's manual, the arguments of this message are described to be:

0 = note pitch
1 = velocity
2 = on / off status

In OSCulator, the way to use this data is as follows :

On the first argument (0), assign an Event type "Note Param" and use "Pitch" as the value
Second argument (1), use "Note Param" with "Velocity"
For the third argument (2), use a "MIDI Note w/ Params" event and use "/tj/1/note" as the Value. This will tell OSCulator to fetch the note parameters from the /tj/1/note message.

This should generate MIDI note as desired.
As I have not tried yet, there is a small adjustment you might need to do. Thumbjam's manual says that the first argument output the note as MIDI values (0 to 127), therefore if you think the notes do not sound normally, you might have to adjust the input scaling. To do this, flip to the scalings view (Command-F), and change the Input Max value of the first argument (0) to 127 instead of 1.0. Remember to do this only if it is needed.

I hope this answers your question.

For more information on OSC messages : http://www.osculator.net/doc/manual:the_osc_protocol
And on MIDI Notes with Parameters : http://www.osculator.net/doc/manual:midi_and_kyma_notes

Best,
Cam

meowsqueak
04-10-2011, 02:57 AM
Thank you Cam, that's excellent info and it has enabled me to get some promising results. For some reason I had missed that you could set Event Types for 0,1,2.

I do find that I need to make an adjustment - however it's not 0-127 as you suggest, it seems to be 0-24, although it is an octave too high. I'm still playing around with this and hope to find the right range soon.

Also, ThumbJam seems to send multiple messages during sustain, perhaps because it is trying to send pitch-bend messages as I slightly tilt the iPhone. I turned off the sending of pitchbend via OSC but it still seems to send them. Is it possible to somehow filter these messages in OSCulator so that they don't retrigger MIDI notes?

Thanks again!

meowsqueak
04-10-2011, 03:10 AM
Hmm, not quite understanding the range translation - I find that changing the top or bottom limits affects the entire range. I had something at 52-93 that seemed to map around C0, but C1 was wrong, and when I change the upper limit it seems to change where C0 maps to. There's something about the way this maps that I'm not understanding.

Is there some sort of 'real-time debugging view' or 'log' that I can use to see how the translation is happening so that I can understand the mapping?

Do I need to adjust the output range too, or keep that as 0.0 to 1.0?

meowsqueak
04-10-2011, 11:31 AM
For reference, I've also posted about this on the ThumbJam forums, here: http://thumbjam.com/node/453

camille
04-11-2011, 10:15 AM
Very good analysis.
And good job using the MIDI debug mode.

meowsqueak
04-11-2011, 09:25 PM
Thanks.

It's weird that the OSCulator patch I created is so similar to the one that Jesse created, and yet mine behaves differently - if you feel inclined, maybe you could download both patches and see what the internal difference between them is?

camille
04-12-2011, 01:09 AM
Sure, please attach the files on this forum, I'll have a try!
You can also send them by email if you prefer (camille at osculator dot net).

meowsqueak
04-12-2011, 10:17 PM
Ok, I have attached two zip files.

The first - "thumbjam.oscd.zip" - is my attempt at a simple OSCulator patch.

The second - "TJosculator.oscd_.zip" - is the TJ author's patch, that he created in response to my question on the TJ forum. You can see all the details on that site I linked to before.

Both patches *appear* very similar in OSCulator - apart from the Console Log event - yet behave quite differently. I'd be interested to know if the files differ internally in some subtle way that would explain the difference in behaviour. Thanks! :)

camille
04-13-2011, 12:07 PM
Hi,

There is a difference in the two files which is the address of the note message.
One file has the /tj/1/note message, and in the other it is /tj/note.

However I have noticed a cool thing:

Thumbjam is able to send a MIDI stream over OSC, and OSCulator has a built-in OSC to MIDI decoder. When you see the message /tj/midi, click on the Event Type menu and choose Send to MIDI.
In the Value column, choose the value corresponding to the MIDI out you want to use (either a physical interface or OSCulator's virtual output).

This should enable you to use the full MIDI capabilities of Thumbjam without having to deal with the MIDI Note /w Params.


Best,
Cam

meowsqueak
04-14-2011, 10:03 PM
When I open both files with OSCulator, they both show /tj/1/note - so you're saying that internally they aren't the same? Perhaps there's a difference in the OSCulator version used to create the files? I'm using the latest version, perhaps Jesse from TJ was using an older version? Whenever I try and recreate the patch myself it is always 'broken' - only the file I was sent seems to work.

I haven't seen any /tj/midi messages arrive - any idea how I enable this in TJ? I know TJ can send DSMI MIDI, but that's not the same, is it?

camille
04-16-2011, 10:01 AM
I ws wrong about the /tj/1/note, sorry!
I think there is a setting in TJ to enable the MIDI mode, you should try to enable the DSMI protocol. It should work since DSMI seems to follow the OSC to MIDI specification.

Cheers,
Cam

meowsqueak
04-20-2011, 10:32 PM
Thanks, I'll have a play with the DSMI mode.

On my original problem - so it seems I'm in a situation where creating a new patch with the version of OSCulator I have results in a non-working patch, but if I use someone else's patch (presumably created with a different version but I havent been able to confirm this) then it works. This seems very odd and indicates some difference between versions. Only the developer has the necessary information to solve this problem :)

camille
04-21-2011, 12:23 AM
So, here is a file I have prepared that is compatible with ThumbJam.

Here is what I did for the setup :


In ThumbJam, enable the OSC output (in Remotes)
Open a new OSCulator document, and set the OSC port to 7000 (ThumbJam's default)
Play some notes and see the message /tj/1/note registering in OSCulator.
First argument of /tj/1/note : "Note Params / Pitch"
Second argument : "Note Params / Velocity"
Third argument : "MIDI Note w/ Params" with a value of "/tj/1/note"
Then I switched to the scalings and change the scaling of the first argument to 0-127 for its input range.
Open the Parameters Window, go to I/O and change the MIDI range to 0 for the lowest note and 127 for the highest note.


I also played with the /tj/1/bend message, (has a scaling of [-1 1]), but it does not seem to work very well for some reason. My guess is that I was using a router and had too much latency. (I disabled this message by default).

The DSMI mode does not work.
Actually I was surprised to see that in one document you sent to me, there was a message called /tj/1/midi with a data type 'MIDI' (read OSC to MIDI translation), which is compatible with OSCulator. I suspect this is a leftover from an experiment of Jesse, the developer of ThumbJam. I would love to see that fully implemented.


Cheers,
Cam

meowsqueak
04-21-2011, 03:01 AM
Thank you for the detailed instructions and the new patch - I will give this another try after Easter. I appreciate your comments, thanks for responding! :)

essej
04-24-2011, 04:33 AM
Correct, sending the MIDI message type via OSC was something I experimented with, but ended up not exposing. I actually don't remember why not!

TJ can send MIDI via DSMI (with DSMidiWifi running on your system) without problems, but that has nothing to do with OSC or Osculator.

Yes, I've found that WiFi routers can really suck by adding latency and bursting the data through when the data rate gets higher (eg pitchbend). Ad-hoc wifi network between the device and your computer are much more reliable if you can get away with using them in your setup.

meowsqueak
12-10-2011, 02:10 AM
So, here is a file I have prepared that is compatible with ThumbJam.

Here is what I did for the setup :


In ThumbJam, enable the OSC output (in Remotes)
Open a new OSCulator document, and set the OSC port to 7000 (ThumbJam's default)
Play some notes and see the message /tj/1/note registering in OSCulator.
First argument of /tj/1/note : "Note Params / Pitch"
Second argument : "Note Params / Velocity"
Third argument : "MIDI Note w/ Params" with a value of "/tj/1/note"
Then I switched to the scalings and change the scaling of the first argument to 0-127 for its input range.
Open the Parameters Window, go to I/O and change the MIDI range to 0 for the lowest note and 127 for the highest note.


I also played with the /tj/1/bend message, (has a scaling of [-1 1]), but it does not seem to work very well for some reason. My guess is that I was using a router and had too much latency. (I disabled this message by default).


Hello Cam,

I just wanted to mention that I finally got around to trying this (with TJ 2.0) and it seems to work reasonably well. The only major issue I have is that some notes seem to get 'lost' somewhere.

Thank you for your help!

camille
12-10-2011, 03:07 PM
Hi!

The update looks great, I am currently installing it on my iPad and iPhone :)
If you could please make a full description of how I can setup things to try to reproduce your issue, it would great !

Thanks,
Cam

meowsqueak
12-11-2011, 10:01 AM
Hi!

The update looks great, I am currently installing it on my iPad and iPhone :)
If you could please make a full description of how I can setup things to try to reproduce your issue, it would great !

Ok - I simply set up OSCulator as per the post I quoted above (your post #14), and then used OSCulator as a MIDI-input to Reason. In TJ all I had to do was enable OSC output, on port 7000 (seems that changing the port number doesn't actually change the port number - probably a bug). Pretty simple really :)

It would be interesting to know whether the OSC messages are being dropped by OSCulator, or perhaps not even generated by TJ. Most notes work, maybe 10% are missing?

EDIT: played around with this some more - I think some of the notes are simply delayed, rather than dropped, so that a subsequent note ends up 'masking' it (because OSC from TJ seems to be monophonic). I also tried the CoreMIDI option and that seems to have the same problem, but because it's polyphonic it manifests differently - but in both cases I think it's simply a matter of notes being delayed somewhere, sometimes up to half a second. I'm using ad-hoc wifi but it wouldn't surprise me if the cause is simply the nature of TCP/IP networking.

camille
12-11-2011, 10:58 AM
I downloaded the file at post #14 (http://www.osculator.net/forum/#post6333), and opened ThumbJam and OSCulator.

It was not really usable, there was too much latency, so I decided to create a network on my computer, and enter my computer's IP address in TJ. This time was no latency at all, but as you noticed some notes were dropped.

If you have a look at the messages received, you will see this:


/tj/1/note fff 64.000000 0.000000 0.000000
/tj/1/note fff 64.000000 1.000000 1.000000
/tj/1/note fff 64.000000 0.000000 0.000000
/tj/1/note fff 64.000000 0.000000 0.000000
/tj/1/note fff 64.000000 1.000000 1.000000
/tj/1/note fff 64.000000 0.000000 0.000000
/tj/1/note fff 64.000000 0.000000 0.000000
/tj/1/note fff 64.000000 1.000000 1.000000
/tj/1/note fff 64.000000 1.000000 1.000000
/tj/1/note fff 64.000000 0.000000 0.000000
/tj/1/note fff 64.000000 1.000000 1.000000

I was touching and releasing the same note at regular interval.
The last column should alternate between 0 and 1, but sometimes the trigger is repeated, but I can't find if this is because of the way I touch the screen, or another reason.

This is a bit weird I think, maybe Jesse could help us by looking if this is a problem with TJ.