ssp Posted December 17, 2009 Report Share Posted December 17, 2009 (edited) i need to make a little controller similar to the presonus faderport. all it needs is the lcd, the mtc 7 segment time code display and then 5 buttons for the transport, rew, ff, stop, play & record. also a single fader. so as i understand i would go about it this way. using J5 on the core i put a single fader to Vs/Vd/A0 and then i attatch the 5 buttons to A1-A6 grounding the last pin or diabling it in the asm file. question: how do i intergrate the mtc.ic file into the mb64 setup question: how do i assign the mmc commands to the 5 buttons? because i cannot find any info on that on the forums and there isnt an mmc option in serge's editors and also add this to the mb64 setup. Or is there a way to assign the mmc codes using serge's editor?. thanks Edited December 28, 2009 by ssp Quote Link to comment Share on other sites More sharing options...
ssp Posted December 17, 2009 Author Report Share Posted December 17, 2009 (edited) ok i know how to include# the mtc.inc file now thats ok. now i looked into one of the files in the lc folders and found that ;; 7th shift register ;; button LED db ID_MARKER, ID_MARKER db ID_NUDGE, ID_NUDGE db ID_CYCLE, ID_CYCLE db ID_DROP, ID_DROP db ID_REPLACE, ID_REPLACE db ID_CLICK, ID_CLICK db ID_REWIND, ID_REWIND db ID_FAST_FWD, ID_FAST_FWD ;; 8th shift register ;; button LED db ID_STOP, ID_STOP db ID_PLAY, ID_PLAY db ID_RECORD, ID_RECORD db ID_CURSOR_UP, ID_IGNORE ; (no LED supported by host) db ID_CURSOR_LEFT, ID_IGNORE ; (no LED supported by host) db ID_ZOOM, ID_ZOOM db ID_CURSOR_RIGHT, ID_IGNORE ; (no LED supported by host) db ID_CURSOR_DOWN, ID_IGNORE ; (no LED supported by host) now i have a spare core with the mb64 app installed, can i assign the play stop rec etc to the j5 pins on the core instead of the shift registers on a din board? so i have got the fader on vs/vd/A0 and then the buttons on A1-A6 can i mix them on that terminal strip and mios will take it? the only other option is to make a dinx2 board just have two shift registers, with the mb64 menu buttons on the first sr and the mmc on the second sr. what would be great is to have say an mb-lc mmc.inc file available that can be dropped into the folder and intergrated. Edited December 17, 2009 by ssp Quote Link to comment Share on other sites More sharing options...
ssp Posted December 22, 2009 Author Report Share Posted December 22, 2009 (edited) well i have spent the day going over the lc files from top to bottom, i havent found what im looking for, it has to be there but i cannot for the life of me see it! if the mmc is transmitted as sysex commands then where are the commands? thorsten if you read this, help please mate ;) also can i have 1 fader and 5 buttons on j5 of the core running mb64 or mb64e and use the fader as a master fader and the buttons for mmc use. how do i edit this so that the buttons use A1-A6 on J5 with the fader using A0? thanks Edited December 22, 2009 by ssp Quote Link to comment Share on other sites More sharing options...
ssp Posted December 24, 2009 Author Report Share Posted December 24, 2009 (edited) ok after much reading i have figured out the mmc stuff. the cores device id being 00 button / mmc.cmd / sysex.cmd 1 STOP F07F000601F7 2 PLAY F07F000602F7 3 FFWD F07F000604F7 4 RWD FO7F000605F7 5 REC FO7F000606F7 how can i assign these to 5 buttons by making a dinx2 board? serges editor doesnt allow you to apply sysex commands to buttons and i dont know enough about asm files to edit those to a shift register on an dinx2 board. how can i apply this to these buttons in the asm files please? i can then re-compile and test. i read this thread but i dont understand it im afraid. im thinking its like this MB64_META_Handler for mmc stop command? SO USING THIS MB64_META_Handler for mmc stop command? SO USING THIS button / mmc.cmd / sysex.cmd 1 / STOP / F07F000601F7 movlw 0xF0 call MIOS_MIDI_TxBufferPut movlw 0x7F call MIOS_MIDI_TxBufferPut movlw 0x00 call MIOS_MIDI_TxBufferPut movlw 0x06 call MIOS_MIDI_TxBufferPut movlw 0x01 call MIOS_MIDI_TxBufferPut andlw 0xF7 call MIOS_MIDI_TxBufferPut return however would i need a double button press for the mmc or would the single mmc transmit of the sysex string be ok? Edited December 24, 2009 by ssp Quote Link to comment Share on other sites More sharing options...
ssp Posted December 28, 2009 Author Report Share Posted December 28, 2009 i have raed and read the meta_event file in the src folder in the mb64e main folder. i still do not understand how you define the sysex string to a certain button on a certain shift register. so say the mb64e uses the first 8 connectors on the first sr for its menu buttons, then the second shift register would have 8 buttons free for me to use as assignments for my sysex. how do you assign the sysex to each button 1-5 on the second sr? as these would need to be done via sysex in the meta handler wouldnt they? im now totally lost on how to assign 5 buttons to meta events to transmit mmc commands, and also if it needs to be a double send or not. can anyone shed some light on this as i have been trying to make sense of it for the last few days. Quote Link to comment Share on other sites More sharing options...
ssp Posted December 28, 2009 Author Report Share Posted December 28, 2009 (edited) i have just spent 2 hours editing the mb64e_meta.inc file so as i can put mmc sysex codes to buttons. even after all the reading up i have done and the editing i havent got anywhere with editing the meta file to assign the mmc sysex to 5 nuttons on the second shift register on a dinx4 board. now the id of the button on the din im using is 30 so i edited the meta file like so. from this ;; -------------------------------------------------------------------------- MB64E_META_Handler_00 ;; this example sends a SysEx string: F0 43 10 5C 10 10 31 vv F7 (AN1x: high pass filter) ;; META Event: "F0 00" (enc) or "F0 00 7F @OnOff" (Button - 7F may vary) movlw 0x31 ; store parameter value in W rgoto META_Send_AN1x_SysEx ; branch to SysEx routine i then edited it to this ;; -------------------------------------------------------------------------- MB64E_META_Handler_00 ;; this example sends a SysEx string: F0 7F 00 06 01 F7 (MMC: STOP) ;; META Event: "F0 00" (enc) or "F0 00 30 @OnOff" (Button - 30 as used on the second shift register for a test button) movlw 0x31 ; store parameter value in W rgoto META_Send_MMC_SysEx ; branch to SysEx routine now you have this line above^^ movlw 0x31 ; store parameter value in W do i edit the "movlw 0x31" so that the 0x31 is a different value? do i make it 00 or 7f? also do i then edit the handler like this ;; -------------------------------------------------------------------------- ;; This is a subroutine which sends a SysEx stream for MMC STOP ;; IN: parameter address in working register WREG ;; enc/button value in MIDI_SEND META_Send_MMC_SysEx movwf TMP1 ; temporary store parameter value from working register W into TMP1 call MIOS_MIDI_BeginStream ; begin stream movlw 0xf0 ; send 0xf0 call MIOS_MIDI_TxBufferPut movlw 0x7f ; send 0x7f call MIOS_MIDI_TxBufferPut movlw 0x00 ; send 0x00 call MIOS_MIDI_TxBufferPut movlw 0x06 ; send 0x06 call MIOS_MIDI_TxBufferPut movlw 0x01 ; send 0x01 call MIOS_MIDI_TxBufferPut movlw 0xf7 ; send 0xf7 call MIOS_MIDI_TxBufferPut movf TMP1, W ; send parameter value, stored in TMP1 call MIOS_MIDI_TxBufferPut movf MIDI_EVNT_VALUE, W ; send enc/button value, stored in MIDI_EVNT_VALUE <<--- do i edit this with a value instead of "w"? call MIOS_MIDI_TxBufferPut movlw 0xf7 ; send 0xf7 call MIOS_MIDI_TxBufferPut goto MIOS_MIDI_BeginStream ; end stream and exit after doing that i recompiled the hex and uploaded it to the core, and then tried the button and it still sent out a note c_2 127 sysex id 30 can someone please tell me what im doing wrong here because i still cannot fathom out how to assign a set of 5 mmc sysex commands to 5 buttons on shift register 2 on a dinx4 board. thank you. Edited December 28, 2009 by ssp Quote Link to comment Share on other sites More sharing options...
ssp Posted December 29, 2009 Author Report Share Posted December 29, 2009 just tried several things and im still getting nowhere with this, im missing something but i cant see what it is. :logik: Quote Link to comment Share on other sites More sharing options...
TK. Posted December 29, 2009 Report Share Posted December 29, 2009 Whenever a meta event is assigned to a button, pot or encoder, the meta handler will be called and here it's totally in your hand how the event should be processed. To improve the understanding, just let's try different code snippets. 1) send a constant SysEx stream - replace the code in mb64e_meta.inc by: MB64E_META_Handler_Enc MB64E_META_Handler_Fader MB64E_META_Handler_Button movlw 0xf0 call MIOS_MIDI_TxBufferPut movlw 0x01 call MIOS_MIDI_TxBufferPut movlw 0x02 call MIOS_MIDI_TxBufferPut movlw 0x03 call MIOS_MIDI_TxBufferPut movlw 0xf7 call MIOS_MIDI_TxBufferPut return [/code] Note that all Labels are assigned to the same code, so that encoders/faders and buttons can access the same meta events. Now assign "F0 00" to a button, e.g. with the mk_syx.pl script (I prefer this one), or with serge's SysEx editor (don't know if it still works, it hasn't been maintained since years, and I'm a Mac user...) The button should send this SysEx string. Depending on the button mode (OnOff/Toggle/OnOnly) it will be sent only on pressed, or on pressed/depressed button. I would recomment OnOnly mode here, so that the event will only be sent when the button is pressed, and not when it has been depressed Next step: as you can read in the comments: [code] ;; -------------------------------------------------------------------------- ;; This function is called by MB64E_midi.inc when a meta event (Fx xx) has ;; been assigned to a enc or button ;; You can use this handler to enhance the firmware by your own MIDI events. ;; Here you are able to send more than one MIDI event (i.E. two Note On ;; Events to control Cakewalk via MIDI remote with one button), or a ;; SysEx/NRPN string to your synthesizer, or just to toggle PIC pins ;; in order to switch relays... ;; IN: ;; on enc events (entry point: MB64E_META_Handler_Enc): ;; o Enc number in MB64E_CURRENT_ENC (BANKED access required!) ;; o first MIDI byte in MIDI_EVNT0 (no BANKED access required) ;; o second MIDI byte in MIDI_EVNT1 (no BANKED access required) ;; o enc value in MIDI_EVNT_VALUE (no BANKED access required) ;; ;; on button events (entry point: MB64E_META_Handler_Button): ;; o Enc number in MB64E_CURRENT_BUTTON (BANKED access required!) ;; o first MIDI byte in MIDI_EVNT0 (no BANKED access required) ;; o second MIDI byte in MIDI_EVNT1 (no BANKED access required) ;; o button value in MIDI_EVNT_VALUE (no BANKED access required) ;; -------------------------------------------------------------------------- Parts of the MIDI event (Fx xx, marked with x) are available in variables, which you can use to build your SysEx stream. E.g., with: MB64E_META_Handler_Enc MB64E_META_Handler_Fader MB64E_META_Handler_Button movlw 0xf0 call MIOS_MIDI_TxBufferPut movf MIDI_EVNT1, W call MIOS_MIDI_TxBufferPut movlw 0xf7 call MIOS_MIDI_TxBufferPut return [/code] The SysEx stream will contain the second byte of the MIDI event. E.g., with Meta Event "F0 11" this routine will now send "F0 11 F7" And with Meta Event "F0 22" this routine will send "F0 22 F7" Now try: [code] MB64E_META_Handler_Enc MB64E_META_Handler_Fader MB64E_META_Handler_Button ;; send F0 7F 00 06 xx F7 movlw 0xf0 call MIOS_MIDI_TxBufferPut movlw 0x7f call MIOS_MIDI_TxBufferPut movlw 0x00 call MIOS_MIDI_TxBufferPut movlw 0x06 call MIOS_MIDI_TxBufferPut movf MIDI_EVNT1, W call MIOS_MIDI_TxBufferPut movlw 0xf7 call MIOS_MIDI_TxBufferPut return and try Meta event "F0 01", "F0 02", "F0 03", "F0 04", "F0 05" with button mode "OnOnly" Success? Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ssp Posted December 29, 2009 Author Report Share Posted December 29, 2009 thorsten thanks for your reply, i just tried it again and im still confused. i know you have limited time but could you show me an example by doing a meta event for the mmc stop command with a handler, if i see it there then it will click and i nad then see where i am going wrong, at the moment im still confused. you say the mk_syx.pl script is easier, but i wouldnt have a clue how to use that either! i wouldnt know what to do in that to make changes as i cant find much info. thanks again simon Quote Link to comment Share on other sites More sharing options...
TK. Posted December 29, 2009 Report Share Posted December 29, 2009 i know you have limited time but could you show me an example by doing a meta event for the mmc stop command with a handler, if i see it there then it will click and i nad then see where i am going wrong, at the moment im still confused. But the last example was already your MMC handler - please let me know what was unclear here? you say the mk_syx.pl script is easier, but i wouldnt have a clue how to use that either! i wouldnt know what to do in that to make changes as i cant find much info. I just have released a new midibox64e_v2_2d package (-> http://www.ucapps.de/mios_download.html), where you will find informations about the mk_syx Script under tools/mk_syx/README.txt, and the MMC handler example under meta_examples/3/mb64e_meta.inc Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ssp Posted December 29, 2009 Author Report Share Posted December 29, 2009 thanks again thorsten i will look at that now. i just grabbed the mk_sysx file and i find this: [bUTTONS] # First 16 Buttons 1 = 90 3C 7F @OnOff 2 = 91 3C 7F @OnOff 3 = 92 3C 7F @OnOff 4 = 93 3C 7F @OnOff 5 = 94 3C 7F @OnOff 6 = 95 3C 7F @OnOff 7 = 96 3C 7F @OnOff 8 = 97 3C 7F @OnOff 9 = 98 3C 7F @OnOff 10 = 99 3C 7F @OnOff 11 = 9A 3C 7F @OnOff 12 = 9B 3C 7F @OnOff 13 = 9C 3C 7F @OnOff 14 = 9D 3C 7F @OnOff 15 = 9E 3C 7F @OnOff 16 = 9F 3C 7F @OnOff what would i put into this line here: 9 = 98 3C 7F @OnOff to make the 1st button on the 2nd sr send the stop mmc sysex string? do i just put it like this: 9 = F0 7F 00 06 01 F7 @OnOff Quote Link to comment Share on other sites More sharing options...
TK. Posted December 29, 2009 Report Share Posted December 29, 2009 No, you would write: 9 = F0 01 00 @OnOnly [/code] Only three values can be defined, and the third value is not used by the meta handler example I gave you... To trigger the remaining MMC commands, use: [code] 10 = F0 02 00 @OnOnly 11 = F0 03 00 @OnOnly 12 = F0 04 00 @OnOnly 13 = F0 05 00 @OnOnly Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ssp Posted December 29, 2009 Author Report Share Posted December 29, 2009 thorsten i used the meta file you placed in the folder 3 in the 2.2d update and then went into serges mb64e editor and applied the meta events to each button, its working great now, and i applied other buttons also., logic worked first time, i have to check the pause one again because thats the only one that didnt work. i will put the meta file here to show you, many thanks its sunk it a bit better now. Quote Link to comment Share on other sites More sharing options...
ssp Posted December 29, 2009 Author Report Share Posted December 29, 2009 tk ok things are working fine apart from the pause button, for some reason pause is not working here are the mmc commands for sysex An MMC message (that is sent to, or generated by, an MMC device) is: F0 7F deviceID 06 command F7 The third byte is the Device ID. The fifth byte is the command: 01 Stop 02 Play 03 Deferred Play 04 Fast Forward 05 Rewind 06 Record Strobe (Punch In) 07 Record Exit (Punch out) 08 Record Ready (Record Pause) 09 Pause 0A Eject 0B Chase 0F MMC Reset 40 Write 44 Locate/Go to 47 Shuttle so here is my meta file as you can see i set the pause to 09 as per the standard mmc commands. MB64E_META_Handler ;; send MMC command: ;; F0 7F 00 06 xx F7 ;; With Meta event "F0 01" you will send MMC Stop ;; With Meta event "F0 02" you will send MMC Play ;; With Meta event "F0 04" you will send MMC FFwd ;; With Meta event "F0 05" you will send MMC Rwd ;; With Meta event "F0 06" you will send MMC Rec ;; With Meta event "F0 07" you will send MMC Rec exit ;; With Meta event "F0 09" you will send MMC Pause ;; button mode should be set to "OnOnly" now i fired my mac up its running the last revision of leopard not and i then started logic pro up, in the preferences i set it to recieve mmc. ok so stop, play , rew, ffwd, rec(punch in) rec stop(punch out) all work fine, i just cant get pause to work for some reason. any ideas? also how can i add this to the meta file for a single encoder to use as a shuttle wheel? The Shuttle MMC message Both forward and backward shuttling share the following MMC message: F0 7F 00 06 47 03 sh sm sl F7 Note: sh, sm and sl are defined as Standard Speed in the MIDI 1.0 Recommended Practice RP-013. Quote Link to comment Share on other sites More sharing options...
ssp Posted December 30, 2009 Author Report Share Posted December 30, 2009 ok well it looks like logic doesnt accept the mmc pause command it would seem i cant understand why these daw's dont take the full suite of mmc commands when thrown at them over midi, but never mind. so the only thing i need to add is a single encoder for a jogwheel, thorsten is it better to use a table now or have a second meta handler like this as an example? ; $Id: mb64e_meta.inc 875 2009-12-29 13:06:43Z tk $ ;; -------------------------------------------------------------------------- ;; This function is called by MB64E_midi.inc when a meta event (Fx xx) has ;; been assigned to a enc or button ;; You can use this handler to enhance the firmware by your own MIDI events. ;; Here you are able to send more than one MIDI event (i.E. two Note On ;; Events to control Cakewalk via MIDI remote with one button), or a ;; SysEx/NRPN string to your synthesizer, or just to toggle PIC pins ;; in order to switch relays... ;; IN: ;; on enc events (entry point: MB64E_META_Handler_Enc): ;; o Enc number in MB64E_CURRENT_ENC (BANKED access required!) ;; o first MIDI byte in MIDI_EVNT0 (no BANKED access required) ;; o second MIDI byte in MIDI_EVNT1 (no BANKED access required) ;; o enc value in MIDI_EVNT_VALUE (no BANKED access required) ;; ;; on button events (entry point: MB64E_META_Handler_Button): ;; o Enc number in MB64E_CURRENT_BUTTON (BANKED access required!) ;; o first MIDI byte in MIDI_EVNT0 (no BANKED access required) ;; o second MIDI byte in MIDI_EVNT1 (no BANKED access required) ;; o button value in MIDI_EVNT_VALUE (no BANKED access required) ;; -------------------------------------------------------------------------- MB64E_META_Handler_Enc ;; THIS IS JUST AN EXAMPLE META EVENT HANDLER ;; ADAPT IT FOR YOUR NEEDS! ;; we are using the same handler for pots and buttons here rgoto MB64E_META_Handler MB64E_META_Handler_Fader ;; THIS IS JUST AN EXAMPLE META EVENT HANDLER ;; ADAPT IT FOR YOUR NEEDS! ;; we are using the same handler for pots and buttons here rgoto MB64E_META_Handler MB64E_META_Handler_Button ;; THIS IS JUST AN EXAMPLE META EVENT HANDLER ;; ADAPT IT FOR YOUR NEEDS! ;; we are using the same handler for pots and buttons here rgoto MB64E_META_Handler ;; -------------------------------------------------------------------------- ;; THIS IS JUST AN EXAMPLE META EVENT HANDLER ;; ADAPT IT FOR YOUR NEEDS! ;; HINT: if a large number of SysEx strings with the same structure (means: ;; for the same synth) should be sent, it would be more advantageous to ;; use a table which contains the parameter values and refers to the ;; sending routines ;; ;; More examples are located in the meta_examples directory ;; -------------------------------------------------------------------------- MB64E_META_Handler_01 ;; send MMC command: ;; F0 7F 00 06 xx F7 ;; With Meta event "F0 01" you will send MMC Stop ;; With Meta event "F0 02" you will send MMC Play ;; With Meta event "F0 04" you will send MMC FFwd ;; With Meta event "F0 05" you will send MMC Rwd ;; With Meta event "F0 06" you will send MMC Rec ;; With Meta event "F0 07" you will send MMC Rec exit ;; With Meta event "F0 08" you will send MMC Rec ready ;; With Meta event "F0 09" you will send MMC Pause ;; button mode should be set to "OnOnly" movlw 0xf0 call MIOS_MIDI_TxBufferPut movlw 0x7f call MIOS_MIDI_TxBufferPut movlw 0x00 call MIOS_MIDI_TxBufferPut movlw 0x06 call MIOS_MIDI_TxBufferPut movf MIDI_EVNT1, W call MIOS_MIDI_TxBufferPut movlw 0xf7 call MIOS_MIDI_TxBufferPut ;; -------------------------------------------------------------------------- The Shuttle MMC message Both forward and backward shuttling share the following MMC message: F0 7F 00 06 47 03 sh sm sl F7 Note: sh, sm and sl are defined as Standard Speed in the MIDI 1.0 Recommended Practice RP-013 ;; -------------------------------------------------------------------------- MB64E_META_Handler_02 ; F0 (sysex start) ; 7F (factory brand ID) ; 00 (synth type or ID) ; 06 (file version) ; 47 (program parameter) ; 03 (parameter number) ; sh (parameter value = std speed) ; sm (parameter value = std speed) ; sl (parameter value = std speed) ; F7 (sysex end) movlw 0xf0 call MIOS_MIDI_TxBufferPut movlw 0x7f call MIOS_MIDI_TxBufferPut movlw 0x00 call MIOS_MIDI_TxBufferPut movlw 0x06 call MIOS_MIDI_TxBufferPut movlw 0x47 call MIOS_MIDI_TxBufferPut movf MIDI_EVNT1, W call MIOS_MIDI_TxBufferPut movf MIDI_EVNT_VALUE, W andlw 0x0f call MIOS_MIDI_TxBufferPut swapf MIDI_EVNT_VALUE, W andlw 0x0f call MIOS_MIDI_TxBufferPut andlw 0xf7 call MIOS_MIDI_TxBufferPut return Quote Link to comment Share on other sites More sharing options...
TK. Posted January 2, 2010 Report Share Posted January 2, 2010 Currently you are using the same handler for encoders/faders/buttons, since all three labels point to the same code: MB64E_META_Handler_Enc MB64E_META_Handler_Fader MB64E_META_Handler_Button ;; meta handler ;; ... return [/code] So long you only need a single variant for encoders, you could also write it below the MB64E_META_Handler_Enc label, and let the code below MB64E_META_Handler_Fader and MB64E_META_Handler_Button as it is. [code] MB64E_META_Handler_Enc ;; meta handler for encoders ;; ... return MB64E_META_Handler_Fader MB64E_META_Handler_Button ;; meta handler for faders/buttons ;; ... return I think this is the most simple solution (you asked for it) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ssp Posted January 2, 2010 Author Report Share Posted January 2, 2010 thanks for the reply thorsten. i understand some of what you say, however its the actual meta event itself im not sure if i got it right or not you see. i put it like this ;; -------------------------------------------------------------------------- The Shuttle MMC message Both forward and backward shuttling share the following MMC message: F0 7F 00 06 47 03 sh sm sl F7 Note: sh, sm and sl are defined as Standard Speed in the MIDI 1.0 Recommended Practice RP-013 ;; -------------------------------------------------------------------------- MB64E_META_Handler_02 ; F0 (sysex start) ; 7F (factory brand ID) ; 00 (synth type or ID) ; 06 (file version) ; 47 (program parameter) ; 03 (parameter number) ; sh (parameter value = std speed) -\ ; sm (parameter value = std speed) -------- i do not know if these are correct and the meta handler is correct ; sl (parameter value = std speed) _/ ; F7 (sysex end) movlw 0xf0 call MIOS_MIDI_TxBufferPut movlw 0x7f call MIOS_MIDI_TxBufferPut movlw 0x00 call MIOS_MIDI_TxBufferPut movlw 0x06 call MIOS_MIDI_TxBufferPut movlw 0x47 call MIOS_MIDI_TxBufferPut movf MIDI_EVNT1, W call MIOS_MIDI_TxBufferPut movf MIDI_EVNT_VALUE, W andlw 0x0f call MIOS_MIDI_TxBufferPut swapf MIDI_EVNT_VALUE, W andlw 0x0f call MIOS_MIDI_TxBufferPut andlw 0xf7 call MIOS_MIDI_TxBufferPut return i have just about understood the mmc meta events that i havce used, however as this is a lrager string and also as it now becomes a seperate meta handler, im not sure how i would implement it, if i would have to use a table or do a seperate handler as i did above by calling it "meta_handler_02" i still dont understand the multiple use of meta handlers, i am also looking over the mk.sys files and i will try that also as it is something else for me to learn. thanks for your input on this, its making learning it much easier. Quote Link to comment Share on other sites More sharing options...
ssp Posted January 4, 2010 Author Report Share Posted January 4, 2010 thorsten i have tried every way to get this shuttle wheel meta event to work and i am having not much luck with it, i tried the second handler routine and it didnt work. im sorry i dont understand the example you suggested in your reply, i dont fully understand the meta events yet. i expect it is easier to do in the mk.sys file and do it like that but i have to learn that one yet. im hoping for a suggestion that will make my head finally understand this meta events etc. thanks very much i hope you had a good new year. Quote Link to comment Share on other sites More sharing options...
Bassman Posted February 22, 2010 Report Share Posted February 22, 2010 I think the simpler Meta Event solution, though you do say you have it working now, is this single Meta Event. MB64E_META_Handler_00 ;; this example sends a SysEx string: F0 7f 00 06 vv F7 ;; Button set to Meta Event, ;; 1st parameter 00 (Meta Event 00) ;; 2nd parameter vv (mmc function Stop 01, Play 02, FFwd 03, Rewd 04, Rec 05 etc) call MIOS_MIDI_BeginStream ; begin stream movlw 0xf0 ; send 0xf0 call MIOS_MIDI_TxBufferPut movlw 0x7f ; send 0x7f call MIOS_MIDI_TxBufferPut movlw 0x00 ; send 0x00 call MIOS_MIDI_TxBufferPut movlw 0x06 ; send 0x06 call MIOS_MIDI_TxBufferPut movf MIDI_EVNT_VALUE, W ; send button value, stored in MIDI_EVNT_VALUE call MIOS_MIDI_TxBufferPut movlw 0xf7 ; send 0xf7 call MIOS_MIDI_TxBufferPut goto MIOS_MIDI_BeginStream ; end stream and exit This way, you can have as many MMC buttons as you want, just by making any button a Meta Event, parameter 1 - 00, and parameter 2 - the MMC command number. I'm thinking about the Shuttle problem, it's more complex. bassman Quote Link to comment Share on other sites More sharing options...
ssp Posted November 27, 2019 Author Report Share Posted November 27, 2019 (edited) Its weird looking a this all these years later and understanding what i didnt back then. Also the issue with the shuttle was solved i missed the full string.. Forward: F0 7F device_ID 06 47 03 sh sm sl F7 -> 21 13 n Reverse: F0 7F device_ID 06 47 03 sh sm sl F7 -> 21 23 n Also the movlw function, which means 'Move Literal Value Into W', or put the value that follows directly into the W register. I found a pdf a while ago that explainied pic programming here is the link incase anyone wants it: http://groups.csail.mit.edu/lbr/stack/pic/pic-prog-assembly.pdf I just got a couple of core8 from modular addict as i like the old pic mb64e and its also a good build with my son who is getting into music and midi and electronics, he is 13 and enjoying it. Edited November 27, 2019 by ssp 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.