Home › Forums › General › Programming › weird negative modulation behaviour
- This topic has 5 replies, 2 voices, and was last updated 10 years, 8 months ago by
Hecticcc.
-
AuthorPosts
-
October 8, 2012 at 9:43 pm #731
Hi y’all,
I am still working on my emu 6400 sampler panel, getting there bit by bit, but i have stumbled on a strange bug regarding negative modulation with sysex strings.
At first i thougt it was weird behaviour from the emu unit but after analysing what is happening with midi-ox i have found that ctrlr cuts off one byte of the message whenever the modulation goes below 1 and interprets it as a "system reset" messageFor example a sysex string is sent out of Ctrlr is:
[code:2ybzu5h4]f0 18 21 01 55 01 02 03 01 1c ff 7f f7[/code:2ybzu5h4]
and when i route it through midi-ox i get this for all values below 1:
[code:2ybzu5h4]f0 18 21 01 55 01 02 03 01 1c 7f f7[/code:2ybzu5h4]
alongside a system reset message generated by the "ff" portion of the message…The weirdest part is that the sampler sometimes reacts to the negative values correctly, but ONLY when the modulation comes from a positive value and crosses 0, and only when using the mouse to adapt the value. When i type in a value that should send out a negative value i don’t cross 0 and nothing happens.
Anyone have an idea for a workaround?
using Ctrlr 5.0.3 rev.1102 nightly
October 8, 2012 at 9:49 pm #4847a byte FF is impossible in MIDI it’s incorrect and should be dropped by the driver.
October 8, 2012 at 10:11 pm #4848Of course, silly me for not realising the obvious…
So I should find a way prevent the modulator from sending out anything above 7f , or better find out what value triggers the negative amount in the emu and insert that, right?
I guess tomorrow I will be back to learning lua…
Would you (or anyone for that matter) mind getting me on track with a simple script I can adapt? I have already worked out some basics in lua but I am far from a programmer and am struggling a bit…October 8, 2012 at 10:16 pm #4849you need to find how your device maps negative values (it’s usually some simple arithmetic), and you can always use the modulator expressions to map those negatives to positive values, no need for lua here.
October 8, 2012 at 10:28 pm #4850Thank you for making this clear to me, I will try out what you suggest.
And also thanks for the swift response – Serdecznie dziÄ™kujÄ™October 10, 2012 at 10:51 am #4851I have been trying with the modular expressions but i am still getting weird results.
I will decribe more detailed what is happening in my panel:
What i am trying to do is send out a sysex LSB/MSB value withing a certain range recognised by the emu.
For this specific parameter the ranges are :min: 1c 7F – dec: 028 127 –this equals -100%
default: 00 00 – dec: 000 000 –this equals 0%
max: 64 00 – dec: 100 000 –this equals +100%Whenever i go below zero with the ctrlr modulator, the MSB it sends out flips from 00 to FF, i need to be able to constrain this to 7F somehow so the emu recognises it a a "negative value in LSB" message.
The LSB behaves correctly, it is only the MSB portion giving me troubleThe closest i get with the expressions is when i make the modulator count from 0 to 200 and the do modulatorValue-100 and midiValue+100, but then i still get behaviour like described in my first post.
When i make the modulator count from -100 to 100 with the same expressions it only sends out positive values.***edit***
Been able to get correct behaviour using a uiFixedSlider and mapping out the raw data ranges
” title=”Smile” />
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.