JazzyPidjay Posted March 17, 2005 Report Share Posted March 17, 2005 Hi !!after many tests, with the Vmidibox64...i can't understand how two buttons can send Program Change + / -with a potentiometer, i'm able to send Program Change (0...127)but it's not very easy to set up like this.With the button i can only set the Program Change to a specific value. ???Anybody know how to Increment/Decrement Program Change ?thanks Quote Link to comment Share on other sites More sharing options...
TK. Posted March 20, 2005 Report Share Posted March 20, 2005 Hi,you can create a meta event for such a behaviour, but this won't work with the virtual midibox (which doesn't support all features of the original MIDIbox)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
JazzyPidjay Posted March 20, 2005 Author Report Share Posted March 20, 2005 Hi thorsten !i don't know how to create a meta ?i have read this file : midibox64_sfb_table.txtand i know i can set Meta Event values in "Edit event" in my Midibox.but i don't know "where" and "what" i must do ?thanks Quote Link to comment Share on other sites More sharing options...
TK. Posted March 20, 2005 Report Share Posted March 20, 2005 Hi,you could start with reading the comments in mb64_meta.incIf this is too confusing, maybe somebody can program an example for youBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
anakin Posted June 22, 2009 Report Share Posted June 22, 2009 HiI'm looking for an help with something like this...I'm building a very simple pedalboard midi controller ( just built) using midio128 as app. It work good, only send note_on note_off messages depending on key pressed.Obviously I change for my needings the ini files for range of notes.Now I would like to expand it adding two addition buttons: one for increase program change and one for decrease it.I think it is quite clear that I can't use the ini file for do this because it is not implemented in the code, so I need to code something new.I want to use Midio128 as it is so simple and direct, but I don't know how to do this in the code ( and where...) Any suggestions?I'm considering also to use other applications maybe in C ( maybe easier for me to code in) but using something like ain64_din128_dout128_v2_0 I need to make also modification in the hardware ( put all analogs to ground).I look also this post ( yes, I used the search!!!) that is exactly what I need but I can't understand how to do...http://www.midibox.org/forum/index.php/topic,427.0.htmlAny help or suggestion?ByeAnakin Quote Link to comment Share on other sites More sharing options...
anakin Posted June 25, 2009 Report Share Posted June 25, 2009 HiJust for contribute to the forum, I was able to code something for this with a help from a friend of minesomething like this: ///////////////////////////////////////////////////////////////////////////// // Local variables ///////////////////////////////////////////////////////////////////////////// // Store Program Change Number int CurrentPC = 0; // Define higher program change number #define MAXPCNUM 63 ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an button has been toggled // pin_value is 1 when button released, and 0 when button pressed ///////////////////////////////////////////////////////////////////////////// if (pin == 13 && pin_value == 1) { CurrentPC++; if (CurrentPC > MAXPCNUM ) CurrentPC = MAXPCNUM; MIOS_MIDI_BeginStream(); MIOS_MIDI_TxBufferPut(0xC0); // Program Change Event MIOS_MIDI_TxBufferPut(CurrentPC); // Program Change Number MIOS_MIDI_EndStream(); } if (pin == 14 && pin_value == 1) { CurrentPC--; if (CurrentPC < 0 ) CurrentPC = 0; MIOS_MIDI_BeginStream(); MIOS_MIDI_TxBufferPut(0xC0); // Program Change Event MIOS_MIDI_TxBufferPut(CurrentPC); // Program Change Number MIOS_MIDI_EndStream(); } What do you think about?Maybe not so elegant...Hope this will help someone...byeAnakin Quote Link to comment Share on other sites More sharing options...
nILS Posted July 2, 2009 Report Share Posted July 2, 2009 Looks good, anakin. I made some tiny changes which make it look a bit nicer to me ;)#define MAXPCNUM 63 // Define higher program change numberunsigned char CurrentPC = 0; // Store Program Change Number/////////////////////////////////////////////////////////////////////////////// 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 { if (!pin_value) return; if (pin == 13) { CurrentPC = (CurrentPC < MAXPCNUM) ? CurrentPC++ : MAXPCNUM; MIOS_MIDI_BeginStream(); MIOS_MIDI_TxBufferPut(0xC0); // Program Change Event MIOS_MIDI_TxBufferPut(CurrentPC); // Program Change Number MIOS_MIDI_EndStream(); } if (pin == 14) { CurrentPC = (CurrentPC > 0) ? CurrentPC-- : 0; MIOS_MIDI_BeginStream(); MIOS_MIDI_TxBufferPut(0xC0); // Program Change Event MIOS_MIDI_TxBufferPut(CurrentPC); // Program Change Number MIOS_MIDI_EndStream(); }}[/code] 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.