ThumbJam with OSCulator - MIDI note mapping

Post Reply
meowsqueak
Posts: 8
Joined: Sat Apr 09, 2011 9:52 pm

ThumbJam with OSCulator - MIDI note mapping

Post by meowsqueak »

I'm having some trouble getting the note values from OSC messages to map to MIDI notes in OSCulator. According to the TJ documentation, the first parameter of the /tj/#/note message contains the "midi note number of the pitch" - I assume this is in the range 0-127. OSC messages are normally in the range 0.0-1.0 so I'm trying to use the "Scaling Page" to create proper MIDI notes.

The problem seems to be that, well, frankly, I can't work out the correct mapping. I've tried setting the Input Max to 127, while keeping the Output Max at 1.0, and I've also tried setting the Output Max to 127 (but that caused the MIDI note pitch to go nuts). I've tried a lot of different settings and I'm not able to get anything that works properly.

The closest I've got is to set Input Min to 0, Input Max to 24, but this seems to be about four octaves too high, so that C0 maps to C4.

Secondly, I've noticed that although TJ is set to *not* send pitchbend, it seems to be sending multiple note-on messages when I tilt my iPhone. This means that any slight movement of the iPhone causes multiple note-on MIDI messages to be sent to my synth.

Has anyone had any success configuring TJ with OSCulator/OSC? I had a play with DSMIDI too, and that seemed to work, although it had the same retriggering problem as mentioned above.

User avatar
Jesse
Posts: 1053
Joined: Tue Dec 15, 2009 3:25 am

Actually, I think the

Post by Jesse »

Actually, I think the documentation is wrong, TJ does actually output 0.0 -> 1.0. I've attached an example OSCulator patch that should work for you as an example.

[EDIT] Nevermind, it was right before!

meowsqueak
Posts: 8
Joined: Sat Apr 09, 2011 9:52 pm

Hi Jesse, thank you for your

Post by meowsqueak »

Hi Jesse, thank you for your reply.

Your patch is very similar to one I had, before I started messing with the MIDI note mappings. Unfortunately it does not seem to map correctly.

According to the OSCulator documentation, I can use:

defaults write net.osculator.OSCulator LogDomains -dict-add 'MIDI Notes' YES

to enable MIDI note debugging. So I did this, and when I run OSCulator from the command line it tells me what MIDI note value each OSC input produces. It gives me output like:


2011-04-10 17:45:41.683 OSCulator[7011:903] 0x200353380: MIDI Note ON: 232 (vel:127) [ch:1]
2011-04-10 17:45:42.297 OSCulator[7011:903] 0x200353380: MIDI Note OFF: 232 (vel: 0, prev pitch:232) [ch:1]

So I can tell you that with your patch I get the following mappings from ThumbJam to MIDI Note:

C1 232
C#1 103
D 230
D#1 101
E1 228
F1 99
F#1 226
G1 97
G#1 224
A1 95
A#1 222
B1 93
C2 220
...
C3 208
...
C4 196
...
C5 184
C#5 55
(and so on)

There appears to be two interleaved sequences here - but both are decreasing as the note goes *up*, and the higher values are too high for my synth (Reason) to play.

It almost looks like the values are wrapping around so that they 'alias' as a descending instead of ascending sequence.

I tried swapping min & max in OSCulator (so it goes from 1.0-0.0 instead of 0.0-1.0), and now there are still two distinct sequences, but at least they go 'up' in the right direction. G3 in TJ maps to F#2 however, so it's still no good.

I'm willing to help sort this out so if you have any ideas let me know and I'll give them a try :)

User avatar
Jesse
Posts: 1053
Joined: Tue Dec 15, 2009 3:25 am

Actually, it was right

Post by Jesse »

Actually, it was right before, the first parameter was indeed midi note number. All I had to do in the Scaling page in osculator was to set the input maximum to 127. The attached osculator patch works correctly for me.Image

meowsqueak
Posts: 8
Joined: Sat Apr 09, 2011 9:52 pm

Ok, now I'm confused! Your

Post by meowsqueak »

Ok, now I'm confused! Your patch works for me too, but it looks almost identical to mine - and mine definitely does *not* work. I hear sounds, but several 'regions' in TJ result in the same MIDI note being generated. Other than the Console Log, I can't see what is different between our two patches!

Also, although yours works properly for MIDI mapping, I get a lot of retriggers coming through even when I'm holding a note and not moving my finger, which makes it a little bit difficult to use. Do you see/hear a similar thing? It seems to be related to the accelerometer, as if I slightly tilt the iPhone (note that I have TJ set to *not* send PitchBend info) it sends new note-on messages and I get a stuttering effect.

I also get a stuttering effect if I drag between notes in TJ.

Edit: ah, I've just realised that this happens if I'm using a custom instrument that I created myself - in this case a 'silent' instrument with no samples. If I use one of the stock instruments, this stuttering goes away. A clue perhaps?

Thank you very much for the patch however - it's great that it works, I'll definitely use it. I'm just really astonished that yours works and mine does not! Am I missing something really obvious? :)
Image

User avatar
Jesse
Posts: 1053
Joined: Tue Dec 15, 2009 3:25 am

Unfortunately, the file

Post by Jesse »

Unfortunately, the file inside the zip appears corrupt so I can't compare it. All I did was go to the View Menu->Scalings Page, and set the In Max parameter for the 0th parameter of the note message to 127.0.

meowsqueak
Posts: 8
Joined: Sat Apr 09, 2011 9:52 pm

Corrupt? Hmm, I just

Post by meowsqueak »

Corrupt? Hmm, I just downloaded it and unzipped it and it opens in OSCulator fine. Strange.

meowsqueak
Posts: 8
Joined: Sat Apr 09, 2011 9:52 pm

I'm not sure the zip file is

Post by meowsqueak »

I'm not sure the zip file is corrupt, can you try downloading it again please? I've been communicating with the OSCulator author here:

http://www.osculator.net/forum/threads/ ... -available

There was no problem with the zip file there.

Can you please tell me which version of OSCulator you used to create the patch that you posted? It seems possible that when I create the same patch with OSCulator 2.10.7.1, it doesn't work properly at all, and yet your patch works fine.

Would be great to get to the bottom of this, as I hope to use ThumbJam via OSC in a new project soon.

meowsqueak
Posts: 8
Joined: Sat Apr 09, 2011 9:52 pm

Just to be complete, this was

Post by meowsqueak »

Just to be complete, this was finally resolved here:

http://www.osculator.net/forum/threads/ ... 1#post6333

(except for the odd missing notes, even with ad-hoc WiFi)

Post Reply