Page 2 of 2

Re: Ramp switches value

Posted: 16 Feb 2012 08:17
by Keithlostracco
I got it. It was actually quite simple I just had to create 2 more variables v1, v2 where v1 was the value being sent out to the first cc in the else part of the if statement and v2 = 127-v1 which is cc2. simple!

Code: Select all

	else 
	{
		v1 = floor(abs(s > 0 ? (1-ramp_x[n])*127 : ramp_x[n]*127));
		v2 = 127-v1;
		ctlout(0,CC+n, v1, CC_Chn);
		ctlout(0,CC2+n, v2, CC_Chn);
	}
I still don't fully understand everything that's going on in that patch but one day if you have time maybe you could break it down me?