Jump to content

axiomriddler

Members
  • Posts

    14
  • Joined

  • Last visited

About axiomriddler

  • Birthday 01/01/1

Profile Information

  • Gender
    Not Telling

axiomriddler's Achievements

MIDIbox Newbie

MIDIbox Newbie (1/4)

0

Reputation

  1. what do you mean?..(if i didn't misunderstand), i put it in the main.c as follows: void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam { unsigned char array_index; unsigned char bit_index; // DIN 16..63 should toggle if( pin >= 16 && pin <= 63 ) { if( pin_value == 0 ) { // only react when button is pressed // determine the index of the array element (starts from 0) array_index = (pin - 16) >> 3; // fastest way to divide value / 8; // determine bit position bit_index = (pin - 16) & 0x07; // remainder of x/8 // toggle the flag which saves the current button state toggle_state[array_index] ^= (1 << bit_index); // '^' is a XOR operation // send MIDI Note event depending on toggle state MIOS_MIDI_TxBufferPut(0x90); MIOS_MIDI_TxBufferPut(0x30 + pin - 16); MIOS_MIDI_TxBufferPut((toggle_state[array_index] & (1 << bit_index)) ? 0x7f : 0x00); // set LED (same pin number like button) MIOS_DOUT_PinSet(pin, (toggle_state[array_index] & (1 << bit_index)) ? 0x7f : 0x00); } } else { // this branch handles DIN 0..15 and DIN 64..127 } } is that what you mean? thanks heaps for your response :)
  2. hi all.. i need a clue about this modification here is my attempt: i use ain64_din128_dout128_v2c..i did manage to: 1. use 2 encoders at SR1 pin 0-3 2. use 48 toggles at SR 3-SR 8 3. keep 78 buttons in on/off mode at SR 9-SR 16, SR 2, SR 1 pin 4-7 i did modify: main.c ///////////////////////////////////////////////////////////////////////////// // Application specific encoder table // the default (dummy) table has been disabled via -DDONT_INCLUDE_MIOS_ENC_TABLE ///////////////////////////////////////////////////////////////////////////// MIOS_ENC_TABLE { // sr pin mode MIOS_ENC_ENTRY(1, 0, MIOS_ENC_MODE_DETENTED2), MIOS_ENC_ENTRY(1, 2, MIOS_ENC_MODE_DETENTED2), MIOS_ENC_EOT }; ///////////////////////////////////////////////////////////////////////////// // 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 ///////////////////////////////////////////////////////////////////////////// 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 } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an button has been toggled // pin_value is 1 when button released, and 0 when button pressed ///////////////////////////////////////////////////////////////////////////// void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam { unsigned char array_index; unsigned char bit_index; // DIN 16..63 should toggle if( pin >= 16 && pin <= 63 ) { if( pin_value == 0 ) { // only react when button is pressed // determine the index of the array element (starts from 0) array_index = (pin - 16) >> 3; // fastest way to divide value / 8; // determine bit position bit_index = (pin - 16) & 0x07; // remainder of x/8 // toggle the flag which saves the current button state toggle_state[array_index] ^= (1 << bit_index); // '^' is a XOR operation // send MIDI Note event depending on toggle state MIOS_MIDI_TxBufferPut(0x90); MIOS_MIDI_TxBufferPut(0x30 + pin - 16); MIOS_MIDI_TxBufferPut((toggle_state[array_index] & (1 << bit_index)) ? 0x7f : 0x00); // set LED (same pin number like button) MIOS_DOUT_PinSet(pin, (toggle_state[array_index] & (1 << bit_index)) ? 0x7f : 0x00); } } else { // this branch handles DIN 0..15 and DIN 64..127 } } makefile.orig # $Id: Makefile 311 2008-05-01 17:56:23Z tk $ # define the processor, linker file and project name PROCESSOR = 18f452 LKR_FILE = $(MIOS_PATH)/etc/lkr/p$(PROCESSOR).lkr PROJECT = project # list of objects that should be created and linked OBJS = mios_wrapper.o app_lcd.o main.o # include pathes (more will be added by .mk files) GPASM_INCLUDE = SDCC_INCLUDE = # optional defines that should be passed to GPASM/SDCC GPASM_DEFINES = -DDEBUG_MODE=0 SDCC_DEFINES = -DDEBUG_MODE=0 # pass parameters to MIOS wrapper MIOS_WRAPPER_DEFINES = -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE # directories and files that should be part of the distribution (release) package # more will be added by *.mk files DIST = ./ # include the common.mk file include $(MIOS_PATH)/include/makefile/common.mk # include application specific driver (select app_lcd/dummy if MIOS internal driver used) include $(MIOS_PATH)/modules/app_lcd/dummy/app_lcd.mk mios_enc_table.inc ; $Id: mios_enc_table.inc 69 2008-02-01 00:20:18Z tk $ ; ; "Dummy" Configuration Table for Rotary Encoders ; ; Should be included by the application, if no rotary encoders are connected ; in order to pre-initialize the table area with EOT's ; ; ========================================================================== org 0x3280 ; never change the origin! ;; -------------------------------------------------------------------------- ;; In this table DIN pins have to be assigned to rotary encoders for the ;; MIOS_ENC driver ;; ;; up to 64 entries are provided ;; ;; The table must be terminated with an ENC_EOT entry. Unused entries should ;; be filled with ENC_EOT ;; ;; ENC_ENTRY provides following parameters ;; o first parameter: number of shift register - 1, 2, 3, ... 16 ;; o second parameter: number of pin; since two pins are necessary ;; for each encoder, an even number is expected: 0, 2, 4 or 6 ;; o the third parameter contains the encoder mode: ;; either MIOS_ENC_MODE_NON_DETENTED ;; or MIOS_ENC_MODE_DETENTED ;; or MIOS_ENC_MODE_DETENTED2 ;; or MIOS_ENC_MODE_DETENTED3 ;; ;; Configuration Examples: ;; ENC_ENTRY 1, 0, MIOS_ENC_MODE_NON_DETENTED ; non-detented encoder at pin 0 and 1 of SR 1 ;; ENC_ENTRY 1, 2, MIOS_ENC_MODE_DETENTED ; detented encoder at pin 2 and 3 of SR 1 ;; ENC_ENTRY 9, 6, MIOS_ENC_MODE_NON_DETENTED ; non-detented encoder at pin 6 and 7 of SR 9 ;; -------------------------------------------------------------------------- ;; encoder entry structure ENC_ENTRY MACRO sr, din_0, mode dw (mode << 8) | (din_0 + 8*(sr-1)) ENDM ENC_EOT MACRO dw 0xffff ENDM _MIOS_ENC_PIN_TABLE MIOS_ENC_PIN_TABLE ;; encoders 1-16 ;; SR Pin Mode ENC_ENTRY 1, 0, MIOS_ENC_MODE_DETENTED2 ; detented encoder at pin 0 and 1 of SR 1 ENC_ENTRY 1, 2, MIOS_ENC_MODE_DETENTED2 ; detented encoder at pin 2 and 3 of SR 1 ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ;; encoders 17-32 ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ;; encoders 33-48 ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ;; encoders 49-64 ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT ENC_EOT and here is the error message: rm -rf _output/* rm -rf _output rm -rf *.cod *.map *.lst rm -rf *.hex mkdir -p _output sh ./bin/mios-gpasm -c -p p18f452 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0 -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x3 3f -DDONT_INCLUDE_MIOS_ENC_TABLE -I ./modules/mios_wrapper modules/mios_wrapper/ mios_wrapper.asm -o _output/mios_wrapper.o sh ./bin/mios-gpasm -c -p p18f452 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -DDEBUG_MODE=0 modules/app_lcd/dummy/app_lcd.asm -o _ output/app_lcd.o sh ./bin/mios-sdcc -c -mpic16 -p18f452 --fommit-frame-pointer --optimize-goto -- optimize-cmp --disable-warning 85 --obanksel=2 -I./src -I ./include/c -I ./incl ude/share -DDEBUG_MODE=0 main.c -o _output/main.o at 1: warning 117: unknown compiler option '--optimize-goto' ignored main.c:215: error 20: Undefined identifier 'toggle_state' main.c:215: error 22: Array or pointer required for '[]' operation main.c:215: error 20: Undefined identifier 'toggle_state' main.c:215: error 22: Array or pointer required for '[]' operation main.c:220: error 20: Undefined identifier 'toggle_state' main.c:220: error 22: Array or pointer required for '[]' operation main.c:223: error 20: Undefined identifier 'toggle_state' main.c:223: error 22: Array or pointer required for '[]' operation make: *** [_output/main.o] Error 1 they are: line 215 toggle_state[array_index] ^= (1 << bit_index); // '^' is a XOR operation line 220 MIOS_MIDI_TxBufferPut((toggle_state[array_index] & (1 << bit_index)) ? 0x7f : 0x00); line 223 MIOS_DOUT_PinSet(pin, (toggle_state[array_index] & (1 << bit_index)) ? 0x7f : 0x00); what did i do wrong? what about the warning 117 message? what should i do? any helps will be very appeciated... regards, anto
  3. hi all.. any one can give me a clue regarding this? is it OK if i use hardware toggles (instead of momentary push buttons) with standard ain64_din128_dout128_v2c application? i mean it as a visual aid for button state also (i dont use any dout) and i want to use ain64_din128_dout128_v2c application only with minor modification to add 2/4 encoders, all the other buttons setting will be kept in on/off state. so, is it fine with the application and hardware if i use it that way? what if all the buttons are kept "high" by hardware toggles? i think it's OK like "high" state in ains... thanks regards, anto
  4. hi all.. i have built a dual core midibox64 system with ltc module (com port disabled)..i linked them according the example at ltc module webpage, and i read the midibox link webpage. it's stated that the second core provides the lcd menu and events for both core (lcd is attached to the second core) my problems are: - the lcd menu (snapshot, left, right, select) can only be accessed from second core's buttons. - the first core's events and menu settings are not displayed on the lcd (at all) but the ltc's led shows each activity of both cores. so, temporarily i remove 4 menu buttons of the first core and let all its button as on/off ones..ya "blind second core" - jerky movement and (some) undetected midi messages with live 8, problem in live 8? what did i do wrong? what should i do to make it work? i have set them as forwarding point and end point.. anyone can help? thanks heaps... anto
  5. hi.. thanks heaps to all..finally it's made clear... working on it... :) anto
  6. hi all... will it work if i connect the first core (ain64_128din_128dout application) to second core (midibox64e application)?..or should it be in reversed order?...how can i change some button behavior of ain64_128din_128dout into toggle mode?..been looking around... thx before....
  7. hi again.. somebody can explain to me how to change button mode of 64ain, 128din, 128dout application please? i need to change some of them into toggle mode... regards, anto
  8. 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
  9. 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_v2b regards, anto
  10. 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
  11. thx heaps mr thorsten... MIDI events i use are note on/off (momentary) and cc..ya, i can configure the routing in both softwares (ableton live & modul8)... so, based on that information, may i conclude that i should use 64 pots + 128 button by using 1 core, 2 ain, 4 din, mios & ain64_din128_dout128_v2b application..not midibox64 application ? i think this is the most ergonomic & economic solution for me.. :) what if i want to link MB64 to a computer with configurable routing? is it still relevant?..what is your suggestion? regards, anto
  12. thx for yr suggestion.. :) if i change my plan into using MIDIbox64 (for 2 AINs with 64 pots, 2 DINs with 64 buttons) + MIDIO128 (for 2 DINs with 64 buttons, purposed for triggering clips only) in one box, then.. 1. how should i link them in a box? MIDIbox64 for "MIDI in/CORE 1" position and MIDIO128 for "MIDI out/CORE 2" position? http://www.ucapps.de/midibox_link.html sooorry, it's not clear enough for me.. 2. regarding the use of 2 COREs, how should i set the settings for MIDIbox64 & MIDIO128 applications for each CORE? 3. if i only want to use only 1 LCD, should i attach it on the MIDIO128? ...but am still curious for the possibility to use only 1 CORE with enhanced MIDIbox64 application for 2 AINs + 4 DINs (as stated by mr thorsten) :) regards, anto
  13. hi mr thorsten & everybody else... :) am still building my midibox64... i'v read this: http://www.midibox.org/forum/index.php/topic,1952.0.html based on your statements, my question is: how can i easily enhance the midibox64 application so that all 128 digital inputs are working as MIDI triggers (as u mentioned it)? does it mean that i can use 2 AINs + 4 DINs for my midibox64 then? or, should i simply add another core for the additional 64 buttons? what is your suggestion(s)? fyi, i plan the 64 additional buttons (arranged in 8x8 matrix) to trigger video clips in modul8 or music clips in ableton live (i don't use those softwares at the same time). i only use the buttons as the software's on/off switches or triggers. thx heaps.. regards, anto
×
×
  • Create New...