The Official Sequential/DSI Forum

NRPN Issues

NRPN Issues
« on: October 26, 2016, 11:47:48 AM »
I am developing a randomization app for the iPad and am currently testing the NRPN implementation.

Problem: All NRPN's are controlling OSC 1 Pitch

This is the MIDI stream I am sending for OSC 1 Pitch with a value of 0: [176, 99, 0, 176, 98, 0, 176, 6, 0, 176, 38, 0]
...which works fine for ALL values (0 - 120)...

Now, my MIDI stream for OSC 1 Fine with a value of 0: [176, 99, 0, 176, 98, 1, 176, 6, 0, 176, 38, 0]
...this still changes OSC 1 Pitch, even though I have the correct MSB and LSB for the OSC 1 Fine NRPN

The same occurs for all other NRPN numbers...they ALL affect only OSC 1 Pitch...what am I missing?

Thanks!

Re: NRPN Issues
« Reply #1 on: October 26, 2016, 12:55:32 PM »
May be a silly question but have you got midi receive set to NRPN rather than CC on the P12.

Re: NRPN Issues
« Reply #2 on: October 26, 2016, 01:02:18 PM »
Yes I do, and OS 1.4.1

Just seems weird that it works perfectly for only 1 parameter O_o

dslsynth

  • ***
  • 1036
Re: NRPN Issues
« Reply #3 on: October 26, 2016, 01:41:29 PM »
NRPN messages can be a bit tricky at first but basically they are just a (id,value) controller message in form pair of 14 bit numbers encoded as four CC messages where each 14 bit part is encoded as 128 * MSB + LSB.

A good trick is to connect your instrument to a MIDI monitoring program and watch the messages being sent when turning a knob on the instrument. The exactly same messages can be sent from the computer to the instrument with the same parameter value changing effect. Please note that the order of the messages matter. Also please consider thinking in hex numbers as that makes the structure of the MIDI protocol so much easier to grasp.

The DSI manuals does describe how NRPN messages look. And its possible to download the full official and free MIDI specification from here:
https://www.midi.org/specifications

What you need now is to take your time to understand what I have written, make the experiment I suggested and study the official MIDI specification. The rest is pure patience and elbow grease. You need to understand the NRPN messages in detail. Once that is working you can easily debug your existing code and spot your error(s).

Good luck!
#!/bin/sh
cp -f $0 $HOME/.signature

Re: NRPN Issues
« Reply #4 on: October 26, 2016, 03:00:48 PM »
Thanks for the reply!

I have analyzed the stream from the P12 using MIDI Monitor for OSX, and it matches the streams I am sending to it, so no idea...I am using the MIDIBUS library for iOS so maybe it's an issue with that, I'll keep at it.

dslsynth

  • ***
  • 1036
Re: NRPN Issues
« Reply #5 on: October 26, 2016, 03:23:40 PM »
Easy one to check: Connect the MIDI Thru port of your P12 to the input of another MIDI interface and monitor what is received there. In that way you can see what is actually being sent to the instrument. Also be sure to check and recheck your use of the API.

As for my own uses I have always only worked with device level raw MIDI data I/O and hence wrote my own tools to handle MIDI data. Not sure if that is possible on iOS or MacOS.
#!/bin/sh
cp -f $0 $HOME/.signature

Re: NRPN Issues
« Reply #6 on: October 26, 2016, 04:06:37 PM »
It seems on iOS the first 2 CC's are dropped upon receive and send, thus the P12 is responding to the NRPN input values by using the default NRPN of 0 (OSC 1 Pitch)...no idea why, I have contacted the dev of MIDIBUS for help. Thanks!

Update: This only occurs if you route the iPad network to / from the P12 using OSX's AUDIO MIDI SETUP "Live Routings" feature...connecting the iPad directly to the P12 or routing through Ableton works fine. No idea why.
« Last Edit: October 26, 2016, 05:37:10 PM by mekohler »

Re: NRPN Issues
« Reply #7 on: October 26, 2016, 05:46:57 PM »
Seems there is a bug in Apple's code for Live routings, as it drops the MIDI CC's for MSB and LSB...This guy reported the problem years ago with no success: https://discussions.apple.com/message/21197986#21197986

Re: NRPN Issues
« Reply #8 on: October 27, 2016, 10:44:03 AM »
I guess if everyone go there and click "I have this question too" button this would help  8)
(Yes, I did it!)

LA


Re: NRPN Issues
« Reply #9 on: October 27, 2016, 11:15:35 PM »
It is best to report things here: http://www.apple.com/feedback/macosx.html rather than the forums.

Not that they will do anything though!

P.S. I tested the mac routing and it always removes CC99 and CC98 even if you just send one of them.

Re: NRPN Issues
« Reply #10 on: November 30, 2016, 09:42:32 PM »
I've run into a problem that's related, but when I use the soundtower editor, my OSC 1 value keeps reseting to C0 when I use the other knobs. Most consistently the delay feedback knob. It annoys the crap out of me. I think I've also seen this on the Tetra soundtower editor. :/