jeroddumas Posted June 3, 2005 Report Share Posted June 3, 2005 I have all parts ready for my motormix emulation except for motorfaders. I was wondering what do I need to do to get my encoders working for fader control. Could someone help, I am not a programmer. Quote Link to comment Share on other sites More sharing options...
TK. Posted June 3, 2005 Report Share Posted June 3, 2005 all I can provide is this code:void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam{ unsigned int value; // encoder number 0, 2, 4, 6, 8, 10, 12, 14: VPOT // encoder number 1, 3, 5, 7, 9, 11, 13, 15: Fader replacement if( encoder < 16 ) { if( !(encoder & 1) ) MM_VPOT_SendENCEvent(encoder >> 1, incrementer); else { // add incrementer to absolute value value = MM_MF_FaderPosGet(encoder >> 1); if( MIOS_HLP_16bitAddSaturate(incrementer, &value, 0x3ff) ) { // send fader event MM_MF_FaderEvent(encoder >> 1, value); } } } // encoder number 16: datawheel else if( encoder == 16 ) MM_VPOT_SendJogWheelEvent(incrementer); else { // here you could handle additional encoders }}[/code]Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
jeroddumas Posted June 3, 2005 Author Report Share Posted June 3, 2005 thanks tk, what file would that be a part of? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.