Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

Hi thorsten !

i don't know how to create a meta ?

i have read this file : midibox64_sfb_table.txt

and 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

Posted

Hi,

you could start with reading the comments in mb64_meta.inc

If this is too confusing, maybe somebody can program an example for you

Best Regards, Thorsten.

  • 4 years later...
Posted

Hi

I'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.html

Any help or suggestion?

Bye

Anakin

Posted

Hi

Just for contribute to the forum, I was able to code something for this with a help from a friend of mine

something 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...

bye

Anakin

Posted

Looks good, anakin. I made some tiny changes which make it look a bit nicer to me ;)

#define MAXPCNUM 63		// Define higher program change number
unsigned 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]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...