Home › Forums › General › Using Ctrlr › uiSlider Invert Modulator Value From MIDI Value
- This topic has 24 replies, 4 voices, and was last updated 9 years, 6 months ago by
King PP.
-
AuthorPosts
-
August 21, 2013 at 1:40 am #12173
I have a uiSlider Modulator that sends a 0-127 control, this works fine. However the MIDI message it receives seems to be completely inverted, this sends the dial to the exact opposite position to where it should be.
What would be the best way to correct this, something to do with ‘midiValue’ maybe?
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 21, 2013 at 11:02 am #12190Can you tell me exactly what gets received, paste the data from the MIDI Monitor for 0,32,64,127 values.
August 21, 2013 at 1:39 pm #12195I use this for converting to opposite values, works with decimals & hex as input.
function invertNumber(input) local range = 127 local output = range + (input*-1) return (output) end
Then just call it whenever you need it somewhere.
August 21, 2013 at 10:39 pm #12241Hi Atom, as requested the data from the MIDI monitor is
7f,5f,3f,00
So the 3P is definitely sending inverted data for this byte.
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 21, 2013 at 10:43 pm #12242Then in the reverse expression just do 127 – midiValue, you’ll get the reverse values, but i don’t understand how it goes in a normal fashin in the direction of the synth and just the synth replies in an inverted form.
August 21, 2013 at 11:03 pm #12244I put “midiValue – 127” in the reverse expression, but still the problem persists.
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 21, 2013 at 11:13 pm #12245not midiValue – 127 (assuming that the synth sends 23, then the expression will be 23 – 127 = -104)
you want the expression to evaluate to a set of values your modulator has, so it’s 127 – modulator value, when the synth send 127 the expression will be 0, when it send 27 the expression will be 100 and so on.
you need to find the expression that suits your needs.
August 21, 2013 at 11:46 pm #12247Syntax and stuff has got the better of me again. I didn’t realise you could put the – in front of the value (because all the examples I’d seen had it behind). But I now understand a little more of the maths the expression is performing.
I have tried 127 – modulatorValue, 127 – midiValue, swapped them around, doubled them, halved them… nothing seems to work.
I also gave Hecticcc’s method a go… no luck
It makes absolutely no sense.
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 22, 2013 at 12:00 am #12250Can you send/attach the panel and paste a dump of the data, when twisting the knob from 0 to max. I’ll see what i can do.
August 22, 2013 at 12:16 am #12251Files attached as requested, I appreciate your time and effort Atom.
Attachments:
You must be logged in to view attached files.Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 22, 2013 at 10:21 am #12268The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.
You will need to figure out a formula for it or make a script that translates these values.
August 22, 2013 at 10:51 am #12270The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.
You will need to figure out a formula for it or make a script that translates these values.
The values are me twisting the knob as Atom requested. Just like the avatar to the left : )
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 22, 2013 at 12:01 pm #12276That’s not an issue i think, a bigger issue is a bug i found yesterday about 2am and i had to delete the nightly build. I’ll try to fix it today and update then.
August 22, 2013 at 12:51 pm #12281The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.
You will need to figure out a formula for it or make a script that translates these values.
The values are me twisting the knob as Atom requested. Just like the avatar to the left : )
Lol, self-facepalm time 😀
August 22, 2013 at 1:13 pm #12282As far as i can tell you don’t need to do anything, i need to fix my bug and the default expression will work, there is no additional logic needed here. Just give me some time to fix my side.
August 22, 2013 at 2:37 pm #12290As far as i can tell you don’t need to do anything, i need to fix my bug and the default expression will work, there is no additional logic needed here. Just give me some time to fix my side.
Cool, I look forward to giving the new version a go. I’m being dragged away from my synths and computer (kicking & screaming) for a long weekend. I’ll touch base a soon as I get back. Many thanks.
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 29, 2013 at 10:40 pm #12681Hi Atom, I downloaded the latest nightly build (Ctrlr_1539.dmg) for Mac OSX and still the inverted modulator persists. Did you have time to try a fix this time around?
I understand you have a life outside Ctrlr, so I’m not hassling you regarding this. Cheers.
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalAugust 29, 2013 at 11:08 pm #12682I haven’t forgot, i found some bugs i generated myself in the latest nightly, i’ll try to fix what i can and post a build in a few hours.
August 29, 2013 at 11:36 pm #12685One thing i noticed you can’t (shouldnt) use
127 - modulatorValue
in the reverse expression, at least not in your case you should use
127 - midiValue
at the moment of receiving the MIDI message your modulator value can be anything, you are setting it, so setting the new value based on the OLD value is just not a wise thing to do (unless you know what you are doing)
August 29, 2013 at 11:53 pm #12690Ooops! good spot, corrected many thanks.
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystal -
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.