PreenFM > preenfm2 and preenfm3

MIDI messages question

(1/2) > >>

chaocrator:
making a PreenFM2 template for my NRPN-capable hardware MIDI controller, i encountered the following issue.

midi messages manual says:

LFO <n> Shape              MSB = 1   LSB = 40 + n*4       where 1 <= n <= 3
which results: 40+1*4 = 44 for LFO1, 40 + 2*4 = 48 for LFO2, and 40 + 3*4 = 52 for LFO 3
but according to the manual,
Free Env1 Attack           MSB = 1   LSB = 52
same for
LFO <n> Freqency           MSB = 1   LSB = 41 + n*4       where 1 <= n <= 3
results: 41+1*4 = 45 for LFO1, 41 + 2*4 = 49 for LFO2, and 41 + 3*4 = 53 for LFO 3
but according to the manual,
Free Env1 Decay            MSB = 1   LSB = 53
same for
LFO <n> Bias               MSB = 1   LSB = 42 + n*4       where 1 <= n <= 3
results: 42+1*4 = 46 for LFO1, 42 + 2*4 = 50 for LFO2, and 42 + 3*4 = 54 for LFO 3
but according to the manual,
Free Env1 Sustain          MSB = 1   LSB = 54
and same for
LFO <n> Key Sync           MSB = 1   LSB = 43 + n*4       where 1 <= n <= 3
results: 43+1*4 = 47 for LFO1, 43 + 2*4 = 51 for LFO2, and 43 + 3*4 = 55 for LFO 3
but according to the manual,
Free Env1 Release          MSB = 1   LSB = 55
so, the question is: where's the error ?
thanks in advance.

Xavier:
Thanks a lot for your message. I fixed the errors.

LFO <n> : NRPN LSB should use (n-1) in the formula instead of n.

Let me know if you find other errors.

Xavier

chaocrator:
theoretically, no other errors at the moment.
anyway, this week i will test every single parameter input one by one, so i'll let you know if something will not work as expected.

chaocrator:
yet another question is how the values of parameters like IM or A, D, S, R are actually calculated.
i'm trying to understand whether i should send those values as 7-bit or as 14-bit.

Xavier:

For all NRPN floating point params : the forumla is :

--- Code: ---            valueToSend = (floatValue - param->minValue) * 100.0f + .1f ; // minValue if the minimal value authorized for the param (-1.0; 0.0...).
            cc.value[0] = 6;
            cc.value[1] = (unsigned char) (valueToSend >> 7);
            sendMidiCCOut(&cc, false);
            cc.value[0] = 38;
            cc.value[1] = (unsigned char) (valueToSend & 127);
            sendMidiCCOut(&cc, false);

--- End code ---

IF the minimal value of the param is 0.0 which is the case for ADSR.
The NRPN 14 bits value is the time in 1/100th of seconds.

If you use CC you cannot send all values :
https://github.com/Ixox/preenfm2/blob/master/src/midi/MidiDecoder.cpp#L477
The param will be value/64 in sec for A, and /32 for R.

Xavier

Navigation

[0] Message Index

[#] Next page

Go to full version