analogue_mo Posted February 14, 2009 Report Share Posted February 14, 2009 Hello everybody,Altough I don't consider myself as a newbie anymore (I'm building my 2nd MB =) ), this is my first post in the forum...I'm building a simple customized midi controller for a MAX5 application that I've been developing. Its kind of a FX processor with 9 FX to choose from, and it features the possibility of recording and playng a 6 second sound sample.I'm using the midibox64 project as the source for this controller:-core stuffed with PIC18f452-1 DIN (2xShift Registers)-1 DOUT (2xShift Registers)each FX has its own button and LED(9)....the buttons are set to onOnly mode and I've changed their behaviour so that when one FX button is pushed it gets illuminated while all other FX button LEDS go off.This was done according to an article that I found a while ago here in the forum (sorry!I dont have the link anymore....) The way to achieve this was to modifie "src/mb64_buttons.inc".......Here´s the code for sharing purposes (so that this help request can help others as well):MB64_BUTTON_OnOnly ;; when on: send button value defined in dump ;; when off: send nothing BRA_IFSET TMP1, 0, ACCESS, MB64_BUTTON_NotifyChangeEnd SET_BSR MB64_BUTTON_VALUES_SR0 setf MB64_BUTTON_VALUES_SR0 SET_BSR MB64_BUTTON_VALUES_SR0+1 setf MB64_BUTTON_VALUES_SR0+1 rcall MB64_BUTTON_Hlp_SaveStat rgoto MB64_BUTTON_SendI'm also using one button to record and one to play the recorded sample, when the user pushes REC the app starts recording for 6 seconds. now MY QUESTION IS:Is it possible to maintain the REC button LED litten while the apllication records, and turn it off when the apllication stops recording? this way the user will be able to identify the recording action of the app...In order to do this I've set the recording button to Toggle, this way, when the user pushes the button it gets litten and the midibox sends a NoteON to the app so that it starts recording....then after the 6 second Record buffer is filled it stops recording and sends a NoteOff message to the midibox (same value as the previous received noteON message).....the thing is that this noteOFF message doesnt turn OFF the rec button LED.........according to other forum articles, I probably would be able to achieve this by using one extra ShiftR for the REC button and one extra ShiftR for the LED of the REC button, this way all other buttons behaviours would stay unchanged....then I would have to configure my "LED Map" table in mk_syx.ini like:[LED_MAP] LED_SR1 = 1 # (Button ID #1-#8) "<---used for FX selection(OnOnly buttons)" LED_SR2 = 2 # (Button ID #9-#16) "<---used for FX selection(OnOnly buttons)" LED_SR3 = 18 # (MIDI Status received for Button ID #17-#24) ......................explanation:LED_SR3 is the extra SR for the REC button, Button ID #17-#24 is the group that represents the extra SR used for the REC button LEDfinally I would have to change the APP so that when it receives a NoteON message (telling it to begin recording) it would have to reply a NoteOn message to the midibox to turn ON the REC btn LED, and a NoteOff message when recording buffer is filled(after 6 seconds of recording).Altough I'm pretty sure that this would work, I want to know if I can set this specific behaviour to TOGGLE button types only, as I changed the behaviour of the ONONLY buttons before......here are the links for the articles that I've been dwelling with in the last coupple of weeks, but unfortunelly with no success....http://www.midibox.org/forum/index.php/topic,6157.15.htmlhttp://www.midibox.org/forum/index.php/topic,9504.0.htmlhttp://www.midibox.org/forum/index.php/topic,5034.0.htmlhttp://www.midibox.org/forum/index.php/topic,10970.0.htmlhttp://www.midibox.org/forum/index.php/topic,6733.0.htmlhttp://www.ucapps.de/mios_c_set_dout.htmlSorry for the complete status report but I figured that Is better to be specific and save time in the future(I´m not very good with explanations, thats why this is my first post). So, after all the hardcore explaining here´s the short version:Is there anyway in midibox64 that I can set the TOGGLE button LEDS exclusive reaction based on received midi events???Thanks to TK and all supporters for making my mad scientist childhood fantasy a reality, my room will never be the same but who cares??? ;D Best regards................Mo Quote Link to comment Share on other sites More sharing options...
stryd_one Posted February 15, 2009 Report Share Posted February 15, 2009 Sorry for the complete status report but I figured that Is better to be specific and save time in the futureRight you are! :) Now we just have to wait for a MB64 expert to come along :)Is there anyway in midibox64 that I can set the TOGGLE button LEDS exclusive reaction based on received midi events???Short answer: Yes, but I don't know how. Quote Link to comment Share on other sites More sharing options...
analogue_mo Posted February 17, 2009 Author Report Share Posted February 17, 2009 HHmmmmm.....not very lucky...........so far!!!ANY M64 SPECIALISTS OUT THERE?????? :o Quote Link to comment Share on other sites More sharing options...
stryd_one Posted February 17, 2009 Report Share Posted February 17, 2009 Shh, it's only been a few days, no need to yell... someone will come by... Quote Link to comment Share on other sites More sharing options...
analogue_mo Posted February 17, 2009 Author Report Share Posted February 17, 2009 hehehe......sorry :-[I'm still new in the forum (in any forum, actually)...........just keeping this post alive and active! Quote Link to comment Share on other sites More sharing options...
stryd_one Posted February 17, 2009 Report Share Posted February 17, 2009 Ahh no sweat man. Well 'keeping it active' is usually known as 'bumping' the thread. There's nothing wrong with that, but if you do it too soon it can be considered impolite. Kinda like "are we there yet are we there yet?' :DTakes a while to learn the netiquette, but generally if you relate a situation to it's real-life parallel like that, you'll be on the money. Quote Link to comment Share on other sites More sharing options...
cimo Posted February 22, 2009 Report Share Posted February 22, 2009 If you go C you can control the behavior of every single button, Stryd will help you ;) 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.