Jump to content

julienvoirin

Programmer
  • Posts

    790
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by julienvoirin

  1. can we use this technique to make lettering on frontpanel ?? i've seen a webpage where the guy explain how to make painting with transfer and printer and acid!!
  2. yes i found some stuff and there are lots of interesting info. Thanks TK
  3. TK write about MIOS32 in the topic of the SEQ v4 and the BLM. What is this MIOS 32 ??? I will develop a midibox with very complicated functions in 2 weeks (I am still waiting my RGB Hong Kong LED :-\) and will do it in C Starting with the new MIOS would avoid me to do 2 times the same job (and avoiding ASM is more cool) So where can I get MIOS32 ??
  4. If I've well understood the schematic (easy) and the code (harder) it is NOT compatible (obvious modifications in the code) with common anode LEDS, isn't it ?
  5. all these features please me a lot : it will replace my MPC ^^ Do you plan to play different sequences of different length at the same time i mean A and B play simultaniously, A is 4 bars, B is 6 for example)? a Chop Shop function for each track (real time remix) ? That's great, thanks !
  6. you can do what you want if the parameter is controlled by a CC (128 values) or NRPN. If SysEx, it will be more complicated. I noticed that several parameters use 255 values, so ... Seriously, SID has been designed to be controlled by the control surface of TK. It is easier to do like him. Study the parameter chart and think about. It's not easy IMO. And you will need more than 14 potentiometers.
  7. Your english is ... not clear. Here is what I did (soon in the wiki) : Device One = A piano keyboard based on MIOS, Core ID4 ; it has a midi out and a midi in. Device Two = Wilba MB6582, Core ID0, 1, 2, 3. What I wanted : i play on the piano, notes go to the MB6582 and output from the MB6582 in order to record it in Protools. So I connected the out of the piano to the in of MB6582 and configured the MBLINK EndPoint/ ForwardPOint. Merger enabling was a very bad solution because of the feedback loop (when my DAW play the SID receive and forward events in this case, it isn't conveniant for re-recording) What happens ? The Host sends the events to device one, device one forward them to device two and END. If you tweak device one, events go to device two (and device two react to them) and send them to the host by is MIDI out (in order to record in Protools). Device One can be considered like a remote for device two. IMO it is what you want to do if the parameters of the SID are controlled by SySex or CC But notice that you can already tweak 5 knobs on the MB6582 (while activating "CC" it send CC to the host)
  8. TK, YOU ARE THE BEST !!! EVER ! Thanks a lot !!! Begin stream and End solved my problem. Now i better understand why it is useful to add those 2 codelines ;)
  9. why a note is played after 7 seconds?the note is played directly, it is the tone that appears 7 seconds after it is like the MB6582 needs 7 seconds to generate the tone. Maybe a priority task issue ? EDIT In fact my core ID04 had the wrong app I reuploaded app with MBLINK_FP and now the MB6582 sounds like it should (no more 7sec delay). But, obvious the MB6582 has the MBLINK_EP active it doesn't forward note events generated by the core with MBLINK_FP active.. I don't understand.
  10. i just notice there is no more MBLINK in SIDv2 but MBNet. It explains my problem, doesn'it ?
  11. DJ and TK, i have the same problem. I want to add the MB6582 a Keyboard. I have done the keyboard using a core with ID 04, a scan matrix and enabling : movlw MIOS_MIDI_MERGER_MBLINK_FP call MIOS_MIDI_MergerSet I have activated the merger in main.inc of the MB6582 (his ID is 00) with movlw MIOS_MIDI_MERGER_MBLINK_EP call MIOS_MIDI_MergerSet instead of movlw MIOS_MIDI_MERGER_DISABLED call MIOS_MIDI_MergerSet And concerning the midi data, everything works as expected from a midi box linked chain (very clever to have developped this). BUT the MB6582 will produce a tone only 7 seconds after pushing a key on the Keyboard (7 sec after the Note On 3 bytes) !!!!!! Note off is executed immediatly IMO, the merger function (end point) is executed too late in the SID app. Am I right ? Where should it be placed ? Changing the code as MIOS_MIDI_MERGER_ENABLED in both applications (SID+Keyboard) solve this issue but create a midi loopback with the Host computer
  12. Et bien moi je te conseille vivement ECE :) ils ont plein de vieux trucs bradés à 1€ comme des alim 9V DC, des câbles tous prets, etc ... Et ils sont très sympa, et très calés. Malakof, bof, tu perdras moins de temps en commandant directement sur le site plutot que de te perdre en banlieue.
  13. ton projet est largement faisable et simple du point de vue de la programmation de l'appli. pars sur une base de midiio128. Ensuite tu peux faire un patch dans Live (qui émule n'importe quel controleur midi en mackie control) ou un midi learn Subtilités à vérifier : intéret ? RAS facile RAS encore géré par la section AIN vérifie que Live envoie des messages MIDI quand tu actives ces boutons dans l'interface (les clip en lecture envoient un message de note on par exemple), ensuite il sufira de coder l'appli pour que la LED s'allume à réception du messages midi adéquat (je te filerai un coup de pouce si besoin c super facile) trop facile, DIN le gere direct exactement et avec un script c super simple à faire avec n'importe quel controleur midi du marché et de midibox.org ; ils sont trop forts chez Ableton.bon bricolage
  14. Hello guys I've got 4 high quality Penny + Giles 10K log faders (PGF3620/D). I would like to transform them into linear faders to use with MIOS. Do you know electronic or software solutions ? Best regards
  15. so tell the granny it is. But i am not sure she will understand what is a TB303 clone maybe can you hide the panels inside books ?! LOL
  16. it's the FarWest ! cold war style or what !?
  17. WELLER WELLER WELLER WELLER WELLER WELLER WELLER WELLER WELLER anyone blue.(WECP20)
  18. Super toy !! Et super boulot, je suis bien content que ma boite marron se soit muée en une sucette multicolore ;) Congrats !!
  19. dear sasha, concerning your panel design, don't you think it would be more logical to invert UP and DOWN button for transpose function ?? downtransposing is usually done on the left of the keyboard, while up transpose is on the right regards
  20. no, unfortunatly, you have to use the cimo sm1024 code for that. Ask him via the forum.Another solution is to use and encoder to define the velocity value (fixed or modulating while you are playing), i did it for my previous user project (la boite à boutons) Cheers
  21. diodes were inverted !! and i like this "switch/case" design : no matter what is the button pressed, it can send whatever you want for message (CC, program, sysex ....) it seems easier to me for beginner and enhancement ;) TK uses the same method for every app : you configure the name of the button, not its function, the function is defined later.
  22. Dear Freddy, don't hesitate to use this code (maybe delete statement for unused keys). Dear Stryd, ok switch is the HEAVY way, but the PIC manages it very well and it has the benefit to allow you sub functions (SHIFT+a key). Code isn't linear but i am not the designer at Yamaha ; why making a 8*6 matrix ??
  23. WORKING Application ! Connect : a Yamaha mini Keyboard to J8/J9, a pot to J5 pinA0 (Pitch wheel) and GO ! /* * Mini driver MIDI de clavier 49 touches * ========================================================================== * * Copyright 2008 Julien Voirin (julien.voirin@free.fr) * Licensed for personal non-commercial use only. * All other rights reserved. * * ========================================================================== */ #include "cmios.h" #include "pic18f452.h" #include "main.h" #include "sm_simple.h" ///////////////////////////////////////////////////////////////////////////// // Global variables ///////////////////////////////////////////////////////////////////////////// unsigned char midich; unsigned char function_button; unsigned char octave; // pour l'affichage unsigned char Note; unsigned char Canal; // status of application (see bitfield declaration in main.h) app_flags_t app_flags; ///////////////////////////////////////////////////////////////////////////// // Local variables ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Fonction for highlighting the green light ///////////////////////////////////////////////////////////////////////////// void GreenLIGHT_On(void){ PORTDbits.RD4 = 1; } void GreenLIGHT_Off(void){ PORTDbits.RD4 = 0; } ///////////////////////////////////////////////////////////////////////////// // Fonction de gestion de l'octave ///////////////////////////////////////////////////////////////////////////// void OCTAVE(void){ // octave doit être compris entre 0 et 127 inclus //octave &= 0x7F; if (octave<=-1) octave &=0x00; if (octave>=0x7f) octave &=0x7F; } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS after startup to initialize the // application ///////////////////////////////////////////////////////////////////////////// void Init(void) __wparam { // initialize the scan matrix driver SM_Init(); // initialize the shift registers MIOS_SRIO_NumberSet(1); // use up to 16 shift registers if value = 16 MIOS_SRIO_DebounceSet(20); // debouncing value for DINs MIOS_SRIO_UpdateFrqSet(2); // set update frequency MIOS_SRIO_TS_SensitivitySet(0); // disable touch sensors // configure MIDI-Merger (enable) MIOS_MIDI_MergerSet(MIDI_MERGER_MODE); // initialize the AIN driver MIOS_AIN_NumberSet(AIN_NUMBER_INPUTS); MIOS_AIN_UnMuxed(); MIOS_AIN_DeadbandSet(AIN_DEADBAND); midich=0x00; // canal midi au démarrage = channel one function_button = 0x00 ; // i.e bouton FCT pas appuyé octave=0x24; // 3octaves * 12 semitons = 36 = 0x24 // All Notes off MIOS_MIDI_TxBufferPut( 0xB0 ); MIOS_MIDI_TxBufferPut( 0x7B ); MIOS_MIDI_TxBufferPut( 0x00 ); } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS in the mainloop when nothing else is to do ///////////////////////////////////////////////////////////////////////////// void Tick(void) __wparam { // call the scan matrix button handler SM_ButtonHandler(); // management of the octave rules OCTAVE(); Canal = midich; } ///////////////////////////////////////////////////////////////////////////// // 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 { // clear LCD MIOS_LCD_Clear(); // request display update app_flags.DISPLAY_UPDATE_REQ = 1; } ///////////////////////////////////////////////////////////////////////////// // 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 { // update display only when requested to minimize the CPU load if( !app_flags.DISPLAY_UPDATE_REQ ) return; app_flags.DISPLAY_UPDATE_REQ = 0; // print note number MIOS_LCD_CursorSet(0x00 + 0); MIOS_LCD_PrintCString("Note:"); if (sm_button_value == 0){ MIOS_LCD_PrintBCD3(Note); MIOS_LCD_PrintCString(" "); }else{ MIOS_LCD_PrintCString(" __ "); } //print midi channel MIOS_LCD_CursorSet(0x00 + 0x09); MIOS_LCD_PrintCString("CH."); MIOS_LCD_PrintBCD2(Canal+0x01); // control visuel du canal midi (pour ajouter une LED par exemple) if (midich==0) GreenLIGHT_On();// allumage de J14 à +5V quand le canal midi est CH.1 (0x90) else GreenLIGHT_Off(); /* // print message on screen depending on button status (debug, need a 4*20LCD) MIOS_LCD_CursorSet(0x80 + 0); if( sm_button_value ) MIOS_LCD_PrintCString("Button Depressed"); else MIOS_LCD_PrintCString("Button Pressed "); // print Column and Row MIOS_LCD_CursorSet(0xC0 + 0); MIOS_LCD_PrintCString("Col:"); MIOS_LCD_PrintBCD3(sm_button_column); MIOS_LCD_PrintCString(" Row:"); MIOS_LCD_PrintBCD3(sm_button_row); */ } // 64 characters (0x40) are reserved for each line, up to 4 lines are (natively) spported: // 1st line begins at 0x00 // 2nd line begins at 0x40 // 3rd line begins at 0x80 //4th line begins at 0xc0) ///////////////////////////////////////////////////////////////////////////// // 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 { } ///////////////////////////////////////////////////////////////////////////// // 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 { // call the Scan Matrix Driver SM_PrepareCol(); } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS after the shift register have been loaded ///////////////////////////////////////////////////////////////////////////// void SR_Service_Finish(void) __wparam { // call the Scan Matrix Driver SM_GetRow(); } ///////////////////////////////////////////////////////////////////////////// // 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 { } ///////////////////////////////////////////////////////////////////////////// // 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 { } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a pot has been moved ///////////////////////////////////////////////////////////////////////////// void AIN_NotifyChange(unsigned char pin, unsigned int pin_value) __wparam { /* // a pot has been moved, send CC# at channel 1 MIOS_MIDI_TxBufferPut(0xb0); // CC at channel 1 MIOS_MIDI_TxBufferPut(pin); // pin number corresponds to CC number MIOS_MIDI_TxBufferPut(MIOS_AIN_Pin7bitGet(pin)); // don't send 10bit pin_value, but 7bit value */ unsigned long pin_value1 ; switch ( pin ) { case 0 : // first J5 Header pin pin_value1 = ((pin_value << 4)) ; // expanding 10bits to 14 bits !! BITSHIFTING MIOS_MIDI_TxBufferPut(0xE0 + midich); // Pitch bend MIOS_MIDI_TxBufferPut((unsigned int)((pin_value1) >> 0 )& 0x7f); // pitch Data LSB MIOS_MIDI_TxBufferPut((unsigned int)(((pin_value1)>> 7 )& 0x7f)); // pitch Data MSB break; } } ///////////////////////////////////////////////////////////////////////////// // This function is NOT called by MIOS, but by the scan matrix handler // in sm_simple.asm, when a pin of the scan matrix has been toggled // Note: in addition to "pin" and "value", the "sm_button_column" and // "sm_button_row" are available as global variables (defined in sm_simple.h) ///////////////////////////////////////////////////////////////////////////// void SM_NotifyToggle(unsigned char pin, unsigned char value) __wparam { // send pin number and value as Note On Event switch( pin ) { case 6: // 1ere touche C0 if (function_button == 1 && value == 0){ midich = 0x00; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x00 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x00 + octave; } break; case 0: // 2eme touche C#0 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x01 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x01 + octave; break; case 1: // 3me touche D0 if (function_button == 1 && value == 0){ midich = 0x01; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x02 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x02 + octave; } break; case 2: // 4eeme touche D#0 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x03 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x03 + octave; break; case 3: // 5eme touche E0 if (function_button == 1 && value == 0){ midich = 0x02; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x04 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x04 + octave; } break; case 4: // 6eme touche F0 if (function_button == 1 && value == 0){ midich = 0x03; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x05 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x05 + octave; } break; case 5: // 7eme touche F#0 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x06 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x06 + octave; break; case 8: // 8eme touche G0 if (function_button == 1 && value == 0){ midich = 0x04; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x07 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x07 + octave; } break; case 9: // 9eme touche G#0 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x08 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x08 + octave; break; case 10: // 10eme touche A0 if (function_button == 1 && value == 0){ midich = 0x05; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x09 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x09 + octave; } break; case 11: // 11eme touche A#0 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x0A + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x0A + octave; break; case 12: // 12eme touche B0 if (function_button == 1 && value == 0){ midich = 0x06; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x0B + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x0B + octave; } break; /////////////////////////////////////////// case 13: // 1ere touche C1 if (function_button == 1 && value == 0){ midich = 0x07; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x0C + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x0C + octave; } break; case 16: // 2eme touche C#1 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x0D + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x0D + octave; break; case 17: // 3me touche D1 if (function_button == 1 && value == 0){ midich = 0x08; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x0E+ octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x0E + octave; } break; case 18: // 4eeme touche D#1 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x0F + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x0F + octave; break; case 19: // 5eme touche E1 if (function_button == 1 && value == 0){ midich = 0x09; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x10+ octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x10 + octave; } break; case 20: // 6eme touche F1 if (function_button == 1 && value == 0){ midich = 0x0A; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x11+ octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x11 + octave; } break; case 21: // 7eme touche F#1 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x12+ octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x12 + octave; break; case 24: // 8eme touche G1 if (function_button == 1 && value == 0){ midich = 0x0B; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x13 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x13 + octave; } break; case 25: // 9eme touche G#1 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x14 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x14 + octave; break; case 26: // 10eme touche A1 if (function_button == 1 && value == 0){ midich = 0x0C; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x15 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x15 + octave; } break; case 27: // 11eme touche A#1 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x16 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x16 + octave; break; case 28: // 12eme touche B1 if (function_button == 1 && value == 0){ midich = 0x0D; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x17 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x17 + octave; } break; //////////////////////////////////////////// case 29: // 1ere touche C2 etc... if (function_button == 1 && value == 0){ midich = 0x0E; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x18 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x18 + octave; } break; case 32: // 2eme touche C#2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x19 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x19 + octave; break; case 33: // 3me touche D2 if (function_button == 1 && value == 0){ midich = 0x0F; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x1A + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x1A + octave; } break; case 34: // 4eeme touche D#2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x1B + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x1B + octave; break; case 35: // 5eme touche E2 if (function_button == 1 && value == 0){ octave = octave - 0x0C ; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x1C + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x1C + octave; } break; case 36: // 6eme touche F2 if (function_button == 1 && value == 0){ octave = octave + 0x0c; }else{ MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x1D + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x1D + octave; } break; case 37: // 7eme touche F#2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x1E + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x1E + octave; break; case 40: // 8eme touche G2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x1F + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x1F + octave; break; case 41: // 9eme touche G#2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x20 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x20 + octave; break; case 42: // 10eme touche A2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x21 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x21 + octave; break; case 43: // 11eme touche A#2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x22 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x22 + octave; break; case 44: // 12eme touche B2 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x23 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x23 + octave; break; /////////////////////////////////////////// case 45: // 1ere touche C3 etc... MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x24 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x24 + octave; break; case 48: // 2eme touche C#3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x25 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x25 + octave; break; case 49: // 3me touche D3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x26 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x26 + octave; break; case 50: // 4eeme touche D#3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x27 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x27 + octave; break; case 51: // 5eme touche E3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x28 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x28 + octave; break; case 52: // 6eme touche F3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x29 + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x29 + octave; break; case 53: // 7eme touche F#3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x2A + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x2A + octave; break; case 56: // 8eme touche G3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x2B + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x2B + octave; break; case 57: // 9eme touche G#3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x2C + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x2C + octave; break; case 58: // 10eme touche A3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x2D + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x2D + octave; break; case 59: // 11eme touche A#3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x2E + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x2E + octave; break; case 60: // 12eme touche B#3 MIOS_MIDI_TxBufferPut(0x90 + midich); MIOS_MIDI_TxBufferPut(0x2F + octave); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); Note = 0x2F + octave; break; /////////////////////////////////////////////// case 61: // touche FUNCTION if (value == 0){ function_button = 0x01; MIOS_LCD_CursorSet(0x40); MIOS_LCD_PrintCString("Choose CH or Oct+/-"); }else{ function_button = 0x00; MIOS_LCD_CursorSet(0x40); MIOS_LCD_PrintCString(" "); } break; case 07 : //sustain MIOS_MIDI_TxBufferPut(0xB0 + midich); MIOS_MIDI_TxBufferPut(0x40); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); break; } // request display update app_flags.DISPLAY_UPDATE_REQ = 1; }
×
×
  • Create New...