Jump to content

Phatline

Members
  • Posts

    1,277
  • Joined

  • Last visited

  • Days Won

    71

Everything posted by Phatline

  1. 3.Matrix-Buttons (2x8 aka 64xVirtual Buttons>the matrix) While i dont have problems with 1Dimensional Arrays. I have massiv Problems with the 2 Dimensional Arrays. following codes are working: if((TrgBtnOut[0]==1 && TrgBtnIn[0]==1)){Matrix[0][7] =! Matrix[0][7];} if((TrgBtnOut[0]==1 && TrgBtnIn[1]==1)){Matrix[1][0] =! Matrix[1][0];} these not: (Matrix[2][0] - Matrix[7][0] making troubles if((TrgBtnOut[0]==1 && TrgBtnIn[2]==1)){Matrix[2][0] =! Matrix[1][0];} if((TrgBtnOut[0]==1 && TrgBtnIn[2]==1)){Matrix[2][0] =! Matrix[2][0];} if((TrgBtnOut[0]==1 && TrgBtnIn[1]==1)){Matrix[2][0] =! Matrix[2][0];} Error:
  2. 2. CODE Striped Down: with 1D Array Variables // main.c // 8x8 LED-Matrix-Test // The Program light up all 64 LEDs ///////////////////////////////////////////////////////////////////////////// //Include files #include <cmios.h> #include <pic18fregs.h> #include "main.h" ///////////////////////////////////////////////////////////////////////////// // VARIABLES - - - Description of Variables can be found in void init(void) __wparam! ///////////////////////////////////////////////////////////////////////////// app_flags_t app_flags; // status of app (see bitfield declaration in main.h) unsigned int MtxCount; unsigned int MtxCount_H; int MtxDoutV; int MtxDoutH; int MtxDoutVtmp; int MtxDoutHtmp; int MatrixRow0[8]={1}; //Fill-Initialize the Matrix with 1 > LEDs should ligth up int MatrixRow1[8]={1}; //1D because for me 2D Arrays give me Strange Errors in Mios8 int MatrixRow2[8]={1}; int MatrixRow3[8]={1}; int MatrixRow4[8]={1}; int MatrixRow5[8]={1}; int MatrixRow6[8]={1}; int MatrixRow7[8]={1}; ///////////////////////////////////////////////////////////////////////////// // INITALIZE //////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// void Init(void) __wparam{ //DIN DOUT AIN Setup MIOS_SRIO_UpdateFrqSet(1); //set shift register update frequency in ms MIOS_SRIO_NumberSet(12); // we need to set at least one IO shift register pair //Set Number of DOUT-Register where the LED Matrix is connected (start by 0) MtxDoutVtmp = 10; //Nr.off Vertikal Shiftregister - 0 is the First Register!!!!!! MtxDoutHtmp = 11; //Nr.off Horizontal Shiftregister - 0 is the First Register!!!!!! MtxDoutV = MtxDoutVtmp * 8; //DOUT-PIN-Calculation: Vertikal Shiftregister MtxDoutH = MtxDoutHtmp * 8; //DOUT-PIN-Calculation: Horizontal Shiftregister MtxCount_H = 0; //Horizontal Counter init > must be 0 > dont Change! } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS before the shift register are loaded (every ms) ///////////////////////////////////////////////////////////////////////////// void SR_Service_Prepare(void) __wparam{ /////////DOUT-Matrix-routine///////// //Deactivate Vertical PINs (from last cycle) MIOS_DOUT_PinSet( MtxDoutV, 0); //MtxDoutV= Number of HC595Register - Predefinied e.g.10 MIOS_DOUT_PinSet((MtxDoutV+1), 0); //HC595 OUT-PORTs=8 MIOS_DOUT_PinSet((MtxDoutV+2), 0); //+2 is the 3rd (starting by 0) Pin of this Registor MIOS_DOUT_PinSet((MtxDoutV+3), 0); //so: (10x8=80)+3 = 83.Pin MIOS_DOUT_PinSet((MtxDoutV+4), 0); MIOS_DOUT_PinSet((MtxDoutV+5), 0); MIOS_DOUT_PinSet((MtxDoutV+6), 0); MIOS_DOUT_PinSet((MtxDoutV+7), 0); //Deactivate the last Horizontal PIN (from last cycle) MIOS_DOUT_PinSet(MtxCount_H, 0); MtxCount_H = MtxDoutH+MtxCount; //MtxDoutH=Number of Connected Register*8=Pin Number //Activate Vertical Lines MIOS_DOUT_PinSet( MtxDoutV, MatrixRow0[MtxCount]); MIOS_DOUT_PinSet((MtxDoutV+1), MatrixRow1[MtxCount]); MIOS_DOUT_PinSet((MtxDoutV+2), MatrixRow2[MtxCount]); MIOS_DOUT_PinSet((MtxDoutV+3), MatrixRow3[MtxCount]); MIOS_DOUT_PinSet((MtxDoutV+4), MatrixRow4[MtxCount]); MIOS_DOUT_PinSet((MtxDoutV+5), MatrixRow5[MtxCount]); MIOS_DOUT_PinSet((MtxDoutV+6), MatrixRow6[MtxCount]); MIOS_DOUT_PinSet((MtxDoutV+7), MatrixRow7[MtxCount]); //Activate Horizontal Line MIOS_DOUT_PinSet(MtxCount_H, 1); //Activate First Row - Negatives Side of Diodes //Counter - count from 0-7 then 0 again... if (MtxCount < 8) {MtxCount = MtxCount + 1;} if (MtxCount > 7) {MtxCount = 0;} } void Tick(void) __wparam{} void Timer(void) __wparam{} void DISPLAY_Init(void) __wparam{} void DISPLAY_Tick(void) __wparam{} void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam{} void MPROC_NotifyFoundEvent(unsigned entry, unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam{} void MPROC_NotifyTimeout(void) __wparam{} void MPROC_NotifyReceivedByte(unsigned char byte) __wparam{} void SR_Service_Finish(void) __wparam{} void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam{} void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam{} void AIN_NotifyChange(unsigned char pin, unsigned int pin_value) __wparam{} wy i use MIOS_DOUT_PinSet instead of MIOS_DOUT_SRSet? >because I dont know better!
  3. Variables: 7x 1-Dimensional Array Variable: // VARIABLES //1D Array (Blow Up Code) unsigned int MtxRow0[8]={0}; unsigned int MtxRow1[8]={0}; unsigned int MtxRow2[8]={0}; unsigned int MtxRow3[8]={0}; unsigned int MtxRow4[8]={0}; unsigned int MtxRow5[8]={0}; unsigned int MtxRow6[8]={0}; unsigned int MtxRow7[8]={0}; //Initalize LED-Matrix for(tmpCount=0; tmpCount<8; tmpCount++){ //=0: StartValue, &lt;7: under 7Cycles?, tmpCount++: MatrixRow0[tmpCount]=1; //fill the Matrix to test the hardware MatrixRow1[tmpCount]=1; MatrixRow2[tmpCount]=1; MatrixRow3[tmpCount]=1; MatrixRow4[tmpCount]=1; MatrixRow5[tmpCount]=1; MatrixRow6[tmpCount]=1; MatrixRow7[tmpCount]=1;} //Matrix 1:1 Routing MatrixRow0[0]=0; MatrixRow1[1]=0; MatrixRow2[2]=0; MatrixRow3[3]=0; MatrixRow4[4]=0; MatrixRow5[5]=0; MatrixRow6[6]=0; MatrixRow7[7]=0; or 1x 2-Dimensional Array Variable: Mtx[8][8] //Have ERRORS later in the program // VARIABLES //2D Array (the way to go) unsigned int Mtx[8][8]; unsigned int MtxCount; unsigned int MtxCountOffset; unsigned int MtxCount_H; unsigned int MtxCount_V; // INITALIZE //////////////////////////////////////////////////////////////// void Init(void) __wparam{ //Initalize 2D-Array-LED-Matrix ---Workaround for(tmpCount=0; tmpCount>8; tmpCount++) //=0: StartValue, &lt;7: under 7Cycles?, tmpCount++: +1everycycle {Mtx[0][tmpCount]=1; //fill the Matrix to test the hardware Mtx[1][tmpCount]=1; Mtx[2][tmpCount]=1; Mtx[3][tmpCount]=1; Mtx[4][tmpCount]=1; Mtx[5][tmpCount]=1; Mtx[6][tmpCount]=1; Mtx[7][tmpCount]=1;} Errors on my Way: unsigned int Mtx[8][8]={0}; ergo I cant initalize that way.... nor this way: // VARIABLES --- Global &amp; Local /////////////////////////////////////////////////// unsigned int Mtx[8][8]={{}};
  4. thankz for the tip, but no - not intrested, my matrix is already wired
  5. Österreich, Schweiz, Deutschland - wo kommst denn her?
  6. analog modules that have adresses? (=digital), i dont get you. CV? Trigger? which Resolution the velocity should have? questions after questions...
  7. any tips, from which program i can crap the code? the blm code: http://ucapps.de/mios/blm_scalar_v1_0a.zip the LEDs on the Matrix-Board connectetd to J3_1 going to Scalar-Board looking very simular to the SID-Matrix Shematic, except the Transistors, and without the 8 Resistors. & this code is what i see a 8Bit app... so the way to go, i think? A other Idea, get it from the ASM - codet - SID Application SID ASM code: http://ucapps.de/mios/midibox_sid_v2_043.zip because the documentation of "MIOS8 C Interface" says: and under the folder src is a file named: "cs_menu_matrix.inc"" >>> but how to mix that? - where to copy this file, how to load it in the main.c, which command to add and so on. the button thing is clear, but the LED thing where to send my 00 01 02 03 04 05 06 07, 10 11 12 13... not so clear, because of multiplexing... ok in one second that pin and that pin, in the other ms that pin and that pin, but in real code ---pfffuuu to much (newbee) --- but i think that is handled in background, without a need to know (like normal din, out, that in main.c give me notifcation if something happens, or in main c activate a dout pin...) i have more time up tomorrow to get into this, but a quickstart, or a startpoint is really welcome! thankz
  8. mein erster gedanke: "Platzhalter" für dinsync ...kabel dran, ihrgendwo auf core, und dann programmieren...nur für alle fälle.
  9. well anyone had done this up to now? i am starting programming today a 8x8 LED-Matrix (like SID-Matrix, but sid is ASM) , there are some usefull links here! but have anyobody stripped down it already?
  10. Paint it Black - to avoid reflections of the Acrylic Overlay. 6Ours or so later (cant say... 2 evenings) I cant help - I am in love The hardware for the TRIGGER-MATRIX-PART is done Well a bit to big... I have to replace 2 Potentiometers of the Clap-Section to the bottum (where is place). even if i mount it 90° there is not enoug place (because of 2Faders left and right to the Matrix) but big is good for my big fingers :phone:
  11. From the album: TekkStar (Tama Techstar Midification)

    hmmm I have the replace 2 Potentiometers of the clap section ---- no problem, below is enough place for it! a little big is this thing... but it is for PLAYING not for SETUPing ... well with my big fingers.
  12. From the album: TekkStar (Tama Techstar Midification)

    after ours and ours later - the trigger matrix is born
  13. From the album: TekkStar (Tama Techstar Midification)

    well a cd marker is not the best solution to paint a pcb black... it looses colour...
  14. From the album: TekkStar (Tama Techstar Midification)

    4 Kill switches 1 Over-Roll-Button 1 Velocity Invert Button 1 Random-Kill-Fader 1 Velocity Offest-Fader
  15. hätte kein Problem damit hätte auch kein Problem damit, bei so kleinen Platinen ist das rausziehen der Stecker schwierig genug.
  16. super ja lötet eh wer anderer, wenn ichs aber selber löten müsste würde ich das netzwerk bevorzugen > ein smd part das mal auf 2 pins hält, hält... > aber wie gesagt ich muss es ja nicht machen, ist ja sinn der sache.
  17. ITT SCHADOW - DTL 2 SW Germany/Austria: http://www.reichelt.at/DTL-2-SW/3/index.html?&ACTION=3&LA=446&ARTICLE=7248&artnr=DTL+2+SW&SEARCH=dtl+2 I ordered 300 Pieces years ago, the plan was to build a super sequencer.... well then came touchscreens
  18. well this 3rd post will keep the main.c uptodate, the code is simple but may be interesting /* main.c * TekkStar * * build 2 Midimize a Tama Techstar 306 >>> Do something usefull with it... * 4 Velocity per Voice, 8 Voices (6 Drums + 1Filter +1 Amp). * 4 Velocity Depending Note Killswitches * random Note Kill Fader * Velocity Offset Fader * * Hardware: * 1stDOUTX4: 1st Voice: Pin0-3 =Velocity 0-3 (use different Resistor Values) * 2nd Voice: Pin4-7 =Velocity 0-3 (I used: 5K6,4K7,2K2,1K) * .... 8th Voice: Pin28-31 =Velocity 0-3 (Connect together: all 4 Resistors @ Trig-out-side) * 2ndDOUTX4: Pin 32 = Kill-Button-Velocity 3 * Pin 33 = Kill-Button-Velocity 2 * Pin 34 = Kill-Button-Velocity 1 * Pin 35 = Kill-Button-Velocity 0 * Pin 36 = Kill-Button-Velo-Trigger-Indicator3 (easier find which BTNs make Effect...) * Pin 37 = Kill-Button-Velo-Trigger-Indicator2 (...not all 4 Velocitys are always used...) * Pin 38 = Kill-Button-Velo-Trigger-Indicator1 (...sometime you hear nothing...) * Pin 39 = Kill-Button-Velo-Trigger-Indicator0 (...and thats may be not good...) * 3rdDOUTX4: Pin 40 = Gate Indicator 4 Random Kill > Flashes if Notes get killed * Pin 41 = Velocity Invert Button > Inverts the 4 Velocity Stages (lo=hi, hi=lo) * Pin 42 = OverRoll --- Take every incoming Notes and place it on all Triggers * J5 of 8Bit Core: Analog Input 0: random Kill * Analog Input 1: Velocit Offset (0=-64,64=Orginal,127=+64) * * * ========================================================================== * Copyright - Phatline aka Crimic aka GreatFullTekk * Licensed for personal non-commercial use only. All other rights reserved. * ========================================================================== */ ///////////////////////////////////////////////////////////////////////////// //Include files #include <cmios.h> #include <pic18fregs.h> #include "main.h" ///////////////////////////////////////////////////////////////////////////// // VARIABLES --- Global & Local////////////////////////////////////////////// app_flags_t app_flags; // status of app (see bitfield declaration in main.h) unsigned char last_ain_pin; unsigned char last_din_pin; unsigned char last_dout_pin; // Midisetup int CHON; int CHOF; int N0; int N1; int N2; int N3; int N4; int N5; int N6; int N7; // Pots unsigned int random; unsigned int VelOff; unsigned int VelInvert; //Invert the Pins by Velocity spreading.... unsigned int random1; int velocity; int velopin; int KillBtn1; int KillBtn2; int KillBtn3; int KillBtn4; int OverRoll; unsigned char random_seed_l; unsigned char random_seed_h; unsigned int random_tmp; unsigned int random_nr; int rgate; ///////////////////////////////////////////////////////////////////////////// // INITALIZE //////////////////////////////////////////////////////////////// void Init(void) __wparam { MIOS_AIN_NumberSet(7); MIOS_AIN_UnMuxed(); MIOS_AIN_DeadbandSet(7); //DIN DOUT AIN Setup MIOS_SRIO_UpdateFrqSet(1); //set shift register update frequency in ms MIOS_SRIO_NumberSet(9); // we need to set at least one IO shift register pair MIOS_SRIO_DebounceSet(10); //debouncing value for DINs MIOS_SRIO_TS_SensitivitySet(0); // Midisetup (Channels, Note Numbers for Trigger) CHON = 153; //Ch1:90, 2:91, 3:92, 4:93, 5:94, 6:95, 7:96, 8:97, 9:98, 10:153, 11:9A, 12:9B, 13:9C... CHOF = 137; //Ch1:80, 2:81, 3:82, 4:83, 5:84, 6:85, 7:86, 8:87, 9:88, 10:137, 11:8A, 12:8B, 13:8C... N0 = 48; //Note - Input Nr. N1 = 49; N2 = 50; N3 = 51; N4 = 52; N5 = 53; N6 = 54; N7 = 55; velocity = 0; velopin = 0; KillBtn1 = 1; MIOS_DOUT_PinSet(32, 1); KillBtn2 = 1; MIOS_DOUT_PinSet(33, 1); KillBtn3 = 1; MIOS_DOUT_PinSet(34, 1); KillBtn4 = 1; MIOS_DOUT_PinSet(35, 1); OverRoll = 0; random = 0; //Analog In: randomly Kill Notes Events --- 0=0Kill 255=All Kill VelOff = 64; //Shifts Velocity Spreading for the DOUTs (where differnt Resistor Values soldered..) VelInvert = 0; //Invert the Pins by Velocity spreading.... random1 = 0; //1st Kill Function (Operator only -used 4 coding) random_seed_l = 0; random_seed_h = 127; rgate = 1; random_tmp = 64; random_nr = 127; } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS in the mainloop when nothing else is to do ///////////////////////////////////////////////////////////////////////////// void Tick(void) __wparam {} ///////////////////////////////////////////////////////////////////////////// // This function is periodically called by MIOS. The frequency has to be // initialized with MIOS_Timer_Set ///////////////////////////////////////////////////////////////////////////// void Timer(void) __wparam {} ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when the display content should be // initialized. Thats the case during startup and after a temporary message // has been printed on the screen ///////////////////////////////////////////////////////////////////////////// void DISPLAY_Init(void) __wparam { MIOS_LCD_Clear(); // clear screen MIOS_LCD_CursorSet(0x00); //step2 1st Line MIOS_LCD_PrintCString("TekkStar"); //message 1st Line MIOS_LCD_CursorSet(0x40); //step2 2nd Line MIOS_LCD_PrintCString("GreatFullTekk"); //message 2nd Line } ///////////////////////////////////////////////////////////////////////////// // This function is called in the mainloop when no temporary message is shown // on screen. Print the realtime messages here ///////////////////////////////////////////////////////////////////////////// void DISPLAY_Tick(void) __wparam { // do nothing if no update has been requested if( !app_flags.DISPLAY_UPDATE_REQ ) return; // clear request app_flags.DISPLAY_UPDATE_REQ = 0; } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a complete MIDI event has been received ///////////////////////////////////////////////////////////////////////////// void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam { if(evnt0 == CHOF) { // if note off: force evnt2 to 0 for easier handling of 'LED off' evnt2 = 0; MIOS_DOUT_PinSet(0, 0); //1st DOUT-Shift-Register --- Turn Off MIOS_DOUT_PinSet(1, 0); MIOS_DOUT_PinSet(2, 0); MIOS_DOUT_PinSet(3, 0); MIOS_DOUT_PinSet(4, 0); MIOS_DOUT_PinSet(5, 0); MIOS_DOUT_PinSet(6, 0); MIOS_DOUT_PinSet(7, 0); MIOS_DOUT_PinSet(8, 0); //2nd DOUT-Shift-Register --- Turn Off MIOS_DOUT_PinSet(9, 0); MIOS_DOUT_PinSet(10, 0); MIOS_DOUT_PinSet(11, 0); MIOS_DOUT_PinSet(12, 0); MIOS_DOUT_PinSet(13, 0); MIOS_DOUT_PinSet(14, 0); MIOS_DOUT_PinSet(15, 0); MIOS_DOUT_PinSet(16, 0); //3rd DOUT-Shift-Register --- Turn Off MIOS_DOUT_PinSet(17, 0); MIOS_DOUT_PinSet(18, 0); MIOS_DOUT_PinSet(19, 0); MIOS_DOUT_PinSet(20, 0); MIOS_DOUT_PinSet(21, 0); MIOS_DOUT_PinSet(22, 0); MIOS_DOUT_PinSet(23, 0); MIOS_DOUT_PinSet(24, 0); //4th DOUT-Shift-Register --- Turn Off MIOS_DOUT_PinSet(25, 0); MIOS_DOUT_PinSet(26, 0); MIOS_DOUT_PinSet(27, 0); MIOS_DOUT_PinSet(28, 0); MIOS_DOUT_PinSet(29, 0); MIOS_DOUT_PinSet(30, 0); MIOS_DOUT_PinSet(31, 0); MIOS_DOUT_PinSet(36, 0); //5th DOUT-Shift-Register --- Turn Off (Velo-Split-Indicator) MIOS_DOUT_PinSet(37, 0); //5th DOUT-Shift-Register --- Turn Off (Velo-Split-Indicator) MIOS_DOUT_PinSet(38, 0); //5th DOUT-Shift-Register --- Turn Off (Velo-Split-Indicator) MIOS_DOUT_PinSet(39, 0); //5th DOUT-Shift-Register --- Turn Off (Velo-Split-Indicator) } //random Number Set if(evnt0==CHON) { random_tmp = random_seed_l * random_seed_h; random_seed_l = TMR0L + (random_tmp & 0xff); //TMR0L = Timer random_seed_h = 0x69 + (random_tmp >> 8); random_nr = random_tmp % 127; //>> 2; // divede by 2 > bitshifting - thx2"kpete" } //random Number <= random Poti? if( (evnt0==CHON) && (random < random_nr) ) {rgate = 1; MIOS_DOUT_PinSet(40, 0);}//Pass Notes if( (evnt0==CHON) && (random > random_nr) ) {rgate = 0; MIOS_DOUT_PinSet(40, 1);} //Kill Notes //velocity + velocity offset if(evnt0==CHON) {velocity = evnt2 + (VelOff - 64);} //@64=orginal, @0=velo-64, @127=velo+64 //velocity > spreading 2 DOUT-Pins > split in 4 velocity groups (4Dout Pins, 4 different Resistors) //Normal if((evnt0==CHON) && (velocity < 30) && (VelInvert==0)) {velopin = 0; MIOS_DOUT_PinSet(36, 1);} //1K if((evnt0==CHON) && (velocity > 30) && (velocity < 64) && (VelInvert==0)) {velopin = 1; MIOS_DOUT_PinSet(37, 1);} //2K2 if((evnt0==CHON) && (velocity > 64) && (velocity < 96) && (VelInvert==0)) {velopin = 2; MIOS_DOUT_PinSet(38, 1);} //4K7 if((evnt0==CHON) && (velocity > 90) && (VelInvert==0)) {velopin = 3; MIOS_DOUT_PinSet(39, 1);} //5K6 //Pins Inverted / swapped if((evnt0==CHON) && (velocity < 30) && (VelInvert==1)) {velopin = 3; MIOS_DOUT_PinSet(39, 1);} //LED: Indicates Trigger - easier to find Effectiv Killbutton... if((evnt0==CHON) && (velocity > 30) && (velocity < 64) && (VelInvert==1)) {velopin = 2; MIOS_DOUT_PinSet(38, 1);} if((evnt0==CHON) && (velocity > 64) && (velocity < 96) && (VelInvert==1)) {velopin = 1; MIOS_DOUT_PinSet(37, 1);} if((evnt0==CHON) && (velocity > 90) && (VelInvert==1)) {velopin = 1; MIOS_DOUT_PinSet(36, 1);} //Trigger1 Detection - random Gate - Velocity set - Kill Pins - Overroll if( (evnt0==CHON) && ((evnt1==N0) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(0, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N0) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(1, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N0) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(2, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N0) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(3, 1);} //1.Trigger, 2.Velociy //Trigger2 Detection - random Gate - Velocity set - Kill Pins if( (evnt0==CHON) && ((evnt1==N1) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(4, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N1) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(5, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N1) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(6, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N1) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(7, 1);} //1.Trigger, 2.Velociy //Trigger3 Detection - random Gate - Velocity set - Kill Pins if( (evnt0==CHON) && ((evnt1==N2) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(8, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N2) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(9, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N2) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(10, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N2) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(11, 1);} //1.Trigger, 2.Velociy //Trigger4 Detection - random Gate - Velocity set - Kill Pins if( (evnt0==CHON) && ((evnt1==N3) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(12, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N3) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(13, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N3) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(14, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N3) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(15, 1);} //1.Trigger, 2.Velociy //Trigger5 Detection - random Gate - Velocity set - Kill Pins if( (evnt0==CHON) && ((evnt1==N4) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(16, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N4) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(17, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N4) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(18, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N4) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(19, 1);} //1.Trigger, 2.Velociy //Trigger6 Detection - random Gate - Velocity set - Kill Pins if( (evnt0==CHON) && ((evnt1==N5) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(20, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N5) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(21, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N5) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(22, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N5) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(23, 1);} //1.Trigger, 2.Velociy //Trigger7 Detection - random Gate - Velocity set - Kill Pins if( (evnt0==CHON) && ((evnt1==N6) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(24, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N6) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(25, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N6) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(26, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N6) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(27, 1);} //1.Trigger, 2.Velociy //Trigger8 Detection - random Gate - Velocity set - Kill Pins if( (evnt0==CHON) && ((evnt1==N7) || (OverRoll==1)) && (rgate==1) && (velopin==3) && (KillBtn1==1) ) {MIOS_DOUT_PinSet(28, 1);} //1.Trigger, 1.Velociy if( (evnt0==CHON) && ((evnt1==N7) || (OverRoll==1)) && (rgate==1) && (velopin==2) && (KillBtn2==1) ) {MIOS_DOUT_PinSet(29, 1);} //1.Trigger, 2.Velociy if( (evnt0==CHON) && ((evnt1==N7) || (OverRoll==1)) && (rgate==1) && (velopin==1) && (KillBtn3==1) ) {MIOS_DOUT_PinSet(30, 1);} //1.Trigger, 3.Velociy if( (evnt0==CHON) && ((evnt1==N7) || (OverRoll==1)) && (rgate==1) && (velopin==0) && (KillBtn4==1) ) {MIOS_DOUT_PinSet(31, 1);} //1.Trigger, 2.Velociy } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a MIDI event has been received // which has been specified in the MIOS_MPROC_EVENT_TABLE ///////////////////////////////////////////////////////////////////////////// void MPROC_NotifyFoundEvent(unsigned entry, unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam {} ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a MIDI event has not been completly // received within 2 seconds ///////////////////////////////////////////////////////////////////////////// void MPROC_NotifyTimeout(void) __wparam {} ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a MIDI byte has been received ///////////////////////////////////////////////////////////////////////////// void MPROC_NotifyReceivedByte(unsigned char byte) __wparam {} ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS before the shift register are loaded ///////////////////////////////////////////////////////////////////////////// void SR_Service_Prepare(void) __wparam {} ///////////////////////////////////////////////////////////////////////////// // Shiftregister has been loaded? ///////////////////////////////////////////////////////////////////////////// void SR_Service_Finish(void) __wparam {} ///////////////////////////////////////////////////////////////////////////// // Buttons has toggled? // pin_value is 1 when button released, and 0 when button pressed ///////////////////////////////////////////////////////////////////////////// void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam { //Toggle Kill-Switches & Kill-LEDs if(pin == 0 && pin_value == 0){KillBtn1 =! KillBtn1;} //toggle if(KillBtn1 == 0){MIOS_DOUT_PinSet(32, 0);} if(KillBtn1 == 1){MIOS_DOUT_PinSet(32, 1);} if(pin == 1 && pin_value == 0){KillBtn2 =! KillBtn2;} //toggle if(KillBtn2 == 0){MIOS_DOUT_PinSet(33, 0);} if(KillBtn2 == 1){MIOS_DOUT_PinSet(33, 1);} if(pin == 2 && pin_value == 0){KillBtn3 =! KillBtn3;} //toggle if(KillBtn3 == 0){MIOS_DOUT_PinSet(34, 0);} if(KillBtn3 == 1){MIOS_DOUT_PinSet(34, 1);} if(pin == 3 && pin_value == 0){KillBtn4 =! KillBtn4;} //toggle if(KillBtn4 == 0){MIOS_DOUT_PinSet(35, 0);} if(KillBtn4 == 1){MIOS_DOUT_PinSet(35, 1);} if(pin == 4 && pin_value == 0){VelInvert =! VelInvert;} //toggle if(VelInvert == 0){MIOS_DOUT_PinSet(41, 0);} if(VelInvert == 1){MIOS_DOUT_PinSet(41, 1);} if(pin == 5 && pin_value == 1){OverRoll = 0;} //Momentary if(OverRoll == 0){MIOS_DOUT_PinSet(42, 1);} if(pin == 5 && pin_value == 0){OverRoll = 1;} //Momentary if(OverRoll == 0){MIOS_DOUT_PinSet(42, 0);} MIOS_LCD_Clear(); // clear screen MIOS_LCD_CursorSet(0x00); //step2 1st Line MIOS_LCD_PrintBCD3(pin); //message 1st Line MIOS_LCD_CursorSet(0x40); //step2 2nd Line MIOS_LCD_PrintBCD3(pin_value); //message 2nd Line } ///////////////////////////////////////////////////////////////////////////// // Encoder has Mooved? // incrementer is positive when encoder has been turned clockwise, else // it is negative ///////////////////////////////////////////////////////////////////////////// void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam {} ///////////////////////////////////////////////////////////////////////////// // Potentiometer has Mooved? ///////////////////////////////////////////////////////////////////////////// void AIN_NotifyChange(unsigned char pin, unsigned int pin_value) __wparam { random = MIOS_AIN_Pin7bitGet(0); VelOff = MIOS_AIN_Pin7bitGet(1); }
  19. ich bin an sowas auch intressiert, falls was auf die beine bringst bin ich dabei mit mindestens 5xDoutX4 und 5DinX4
×
×
  • Create New...