So i started converting my whole synth to NRPN control because i need more parameters than CC allows for.
i am running into issues correctly scaling the incoming values to a bipolar frac though. i am sending nrpns with value ranges 0-4095 from my midibox via DIN midi then use @DrJustice's NRPN objects, with an added internal <<2 bitshift to get to full frac range. This is the code that works perfectly fine in the main axoloti patch, connected disp dials show the correct -64...+64 resp. 0...+64 values, corresponding to my sent 0-4095 NRPN.
outlet_fb = (midi_value_frac << 3)- (1<<27);
outlet_fp = midi_value_frac<<2;
now the bipolar version goes all bad once i put the same NRPN object in the synth poly voice sub-patch. i am monitoring the NRPN values from within the synth voice via a patch frac outlet, connected to a disp dial int he main patch and i can't get the bitshift/offset right. using this:outlet_fb = (midi_value_frac << 2)- (1<<26);
i get kinda close but i still reach +/-64 at about 80% of the NRPN value already.
how can it be that the same object gives me different outputs?
will be back at my axo in a few and reinstigate this, maybe it was too late last night. but i tried for at least 2h to get this right and failed. whatever bitshifts/offsets i tried i either got something completely off or in a way to big/small scale.