Jump to content

[solved// multiple core issue => beginStream] DIN problem, strange messages received in midiOX


protofuse

Recommended Posts

hello TK

I forgot to write:

I think about a code problem.

indeed, there aren't randomly events

it happens everytime I push or release a button.

I rechecked my SR connections (I'm using smashTV modules core, din, ain and dout)

all is ok.

but my midibox send this flow of message everytime I push a button.

I have to say I display "last pin pressed" on my LCD... the right number is displayed.

and the right note on  value is correctly sent.

I think about a midi interface issue or a code issue :-(

I attached the code I'm actually using for testing purpose.

main.c

main.h

main.c

main.h

Link to comment
Share on other sites

Such informations are really relevant if you post this in a new thread!

Why not using one of your older threads in the C section, so that everybody knows the history? This would result into more explicit help...

However, the received events are neither defined in pot_event_map, nor button_event_map.

Thats strange. It would be insteresting which events are sent when you are writing:


void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam
{
// a button has been pressed, send Note at channel 1
MIOS_MIDI_TxBufferPut(0x90); // Note at channel 1
MIOS_MIDI_TxBufferPut(pin);  // pin number corresponds to note number
MIOS_MIDI_TxBufferPut(pin_value ? 0x00 : 0x7f); // buttons are high-active
}
[/code]

Best Regards, Thorsten.

Link to comment
Share on other sites

Thorsten,

I wanted to separate post because I thought about separate problems.

I can do as you'd prefer.

your test works very fine.

only note on and note off message sent!

is it a type issue?

my mapping array is:

const unsigned char button_event_map[64][2] = { //------- clip matrix control
		//-------- DIN11
		// Buttons 1-8 = tracks mute = channel 1-8
		{0x90, 0x01},   {0x91, 0x01},   {0x92, 0x01},   {0x93, 0x01},
		{0x94, 0x01},   {0x95, 0x01},   {0x96, 0x01},   {0x97, 0x01},
		// Buttons scenes 1 = 9-16 = channel 1-8
		{0x90, 0x02},   {0x91, 0x02},   {0x92, 0x02},   {0x93, 0x02},
		{0x94, 0x02},   {0x95, 0x02},   {0x96, 0x02},   {0x97, 0x02},
		// Buttons scenes 2 = 17-24 = channel 1-8
		{0x90, 0x03},   {0x91, 0x03},   {0x92, 0x03},   {0x93, 0x03},
		{0x94, 0x03},   {0x95, 0x03},   {0x96, 0x03},   {0x97, 0x03},
		// Buttons scenes 3 = 25-32 = channel 1-8
		{0x90, 0x04},   {0x91, 0x04},   {0x92, 0x04},   {0x93, 0x04},
		{0x94, 0x04},   {0x95, 0x04},   {0x96, 0x04},   {0x97, 0x04},
		//-------- DIN12
		// Buttons scenes 4 = 33-40 = channel 1-8
		{0x90, 0x05},   {0x91, 0x05},   {0x92, 0x05},   {0x93, 0x05},
		{0x94, 0x05},   {0x95, 0x05},   {0x96, 0x05},   {0x97, 0x05},
		// Buttons scenes 5 = 41-48 = channel 1-8
		{0x90, 0x06},   {0x91, 0x06},   {0x92, 0x06},   {0x93, 0x06},
		{0x94, 0x06},   {0x95, 0x06},   {0x96, 0x06},   {0x97, 0x06},
		// Buttons scenes 6 = 49-56  = channel 1-8
		{0x90, 0x07},   {0x91, 0x07},   {0x92, 0x07},   {0x93, 0x07},
		{0x94, 0x07},   {0x95, 0x07},   {0x96, 0x07},   {0x97, 0x07},
		// Buttons scenes control = 57-62 = CHANNEL 16
		{0x9F, 0x01},   {0x9F, 0x02},   {0x9F, 0x03},   {0x9F, 0x04},
		{0x9F, 0x05},   {0x9F, 0x06},
		// Buttons offset control = 63,64 = CHANNEL 16
		{0x9F, 0x07},   {0x9F, 0x08}
};

and you learnt me const are loaded at starting time (instead of static) :)

Link to comment
Share on other sites

Thats a good one.

When I compare the generated _output/main.asm file with and without the cast, I don't see any difference in the assembly code. Are you sure that you haven't changed something else in addition?

Best Regards, Thorsten.

Link to comment
Share on other sites

I think the problem came from midilink command MIOS_MIDI_BeginStream and MIOS_MIDI_EndStream...

Those message named "stranged" in my post were only encapsulation for midilink purpose... and my interface had a strange behaviour when it receives it ... only that.

all is ok now!

Link to comment
Share on other sites

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