axiomriddler Posted September 9, 2009 Report Share Posted September 9, 2009 hi all..need help here..i have been looking into the mb64e, trying to put 2 encoders into ain64_din128_dout128_v2b application. but still can't figure it out. (total noob :) ) anybody can help me?regards,anto Quote Link to comment Share on other sites More sharing options...
spongebob Posted September 9, 2009 Report Share Posted September 9, 2009 add to main.c MIOS_ENC_TABLE { // sr pin mode MIOS_ENC_ENTRY(1, 0, MIOS_ENC_MODE_NON_DETENTED), MIOS_ENC_ENTRY(1, 2, MIOS_ENC_MODE_NON_DETENTED), MIOS_ENC_EOT }; change Makefile.orig # pass parameters to MIOS wrapper MIOS_WRAPPER_DEFINES = -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE Quote Link to comment Share on other sites More sharing options...
avogra Posted September 9, 2009 Report Share Posted September 9, 2009 err,does this app care about encoders at all? the name at least contains explicitly ain, din and dout, no encoders there.-- just looked into the source and the corresponding function is empty, so no encoders :(you could try "enc_speed_v1b" under troubleshooting instead, to test the encoders. still you have to setup the encoders in mios_enc_table.inc. what spongebob suggested works in C-Apps only, this one is in assembler.which application do you want to use in the end?--- oh, i should read more carefully ^^so you want to adapt the ain63_din128_... to also handle encoders? mb64e is in assembler, but you can look through the examples in ucapps.de -> MIOS - C Interface. There are some coding examples for encoders.ok, i hope one of the answers is what you wanted to know :PGood Luck :) Alex Quote Link to comment Share on other sites More sharing options...
axiomriddler Posted September 9, 2009 Author Report Share Posted September 9, 2009 hi, thanks to all..i don't know if ain64_din128_dout128_v2b application is able to handle encoders with its din or not. that's why i asked 4 that.. :)what i mean here is to know if ain64_din128_dout128_v2b (with little modifications) can also support 2 encoders. i hope that i can use (the modified) ain64_din128_dout128_v2b application to handle 64 pots, 124 buttons, + 2 encoders using only 1 core (instead of using 2 cores running midibox64 + midibox64e for the equivalent controls)fyi, i won't use the douts...i saw traktorizer's din pin allocation, that's why i ask for that possibility with ain64_din128_dout128_v2bregards,anto Quote Link to comment Share on other sites More sharing options...
TK. Posted September 9, 2009 Report Share Posted September 9, 2009 what i mean here is to know if ain64_din128_dout128_v2b (with little modifications) can also support 2 encoders. i hope that i can use (the modified) ain64_din128_dout128_v2b application to handle 64 pots, 124 buttons, + 2 encoders using only 1 core (instead of using 2 cores running midibox64 + midibox64e for the equivalent controls)of courseadd to main.cMIOS_ENC_TABLE { // sr pin mode MIOS_ENC_ENTRY(1, 0, MIOS_ENC_MODE_NON_DETENTED), MIOS_ENC_ENTRY(1, 2, MIOS_ENC_MODE_NON_DETENTED), MIOS_ENC_EOT};[/code] change Makefile.orig [code]# pass parameters to MIOS wrapperMIOS_WRAPPER_DEFINES = -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE thats correct - in addition, the ENC_NotifyChange() has to be enhanced, so that MIDI events are sent on encoder movements. E.g.: void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam{ MIOS_MIDI_TxBufferPut(0xb0); // CC at MIDI Channel #1 MIOS_MIDI_TxBufferPut(0x10 + encoder); // CC# is 0x10 (16) for first encoder MIOS_MIDI_TxBufferPut((0x40 + incrementer) & 0x7f); // this "40 +/- speed" format is used by NI software and some others}[/code]to send relative CC events (will work fine with Traktor)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
axiomriddler Posted September 10, 2009 Author Report Share Posted September 10, 2009 geee..thanks heaps mr. thorsten :)it's very revealing..where should i put those lines? how should i write for that? i mean to use the last 4 dins of shift register IC 8 for the 2 encoders... ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an encoder has been moved // incrementer is positive when encoder has been turned clockwise, else // it is negative ///////////////////////////////////////////////////////////////////////////// MIOS_ENC_TABLE { // sr pin mode MIOS_ENC_ENTRY(8, 4, MIOS_ENC_MODE_NON_DETENTED), MIOS_ENC_ENTRY(8, 6, MIOS_ENC_MODE_NON_DETENTED), MIOS_ENC_EOT }; void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam { MIOS_MIDI_TxBufferPut(0xb0); // CC at MIDI Channel #1 MIOS_MIDI_TxBufferPut(0x10 + encoder); // CC# is 0x10 (16) for first encoder MIOS_MIDI_TxBufferPut((0x40 + incrementer) & 0x7f); // this "40 +/- speed" format is used by NI software and some others } is that right if i write it there that way? ??? any wrong syntax?regards,anto Quote Link to comment Share on other sites More sharing options...
Nasrudin Posted September 25, 2009 Report Share Posted September 25, 2009 maybe you should take a good look into the "whole code" first before rewriting it ;-)Anyway: MIOS_ENC_TABLE has to be placed into main.c. it defines the type of your encoders and where you connected it.define the entries as they are described under \include\asm\mios_enc_table.incafter that we have to modify the make.orig file in order not to include mios_enc_table.inc during compiling process (can somebody tell me why i cant use that file?). Tk described that two post above mine.at last you have to "modify ENC_NotifyChange in main.csearch for the funktion, its is allready defined, but the body does not contain any code yet.fill inside the lower code between the curly brackets you posted.GreetingsNasrudin Quote Link to comment Share on other sites More sharing options...
axiomriddler Posted October 5, 2009 Author Report Share Posted October 5, 2009 hi..thanks heaps to all..finally it's made clear...working on it... :)anto Quote Link to comment Share on other sites More sharing options...
nILS Posted October 11, 2009 Report Share Posted October 11, 2009 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.