Jump to content

Forwarding midi in to midi out


anakin
 Share

Recommended Posts

Hi

I've build up a midi controller using 2 cores in a chain the first running Midio and the second running ain64_din128_dout128_v2_0.zip: I have this problem, first core is the one running midibox with the ain64_din128 ecc...second core is the one for midio and after this I have the midi out. This is what happens: all events coming from the first core pass thru second core (midio) and go to midi out but, as I have also a midi in connected to the first core, when I plug something to the midi in and look for the messages to pass thru core 1, core 2 and coming out from midiout, this doesn't happens because the first core doesnt want to let pass messages from midi.

Is it a software problem? I think I have to activate something in the Main.c (or wherever) in the ain64_din128_dout128_v2_0.zip...but how to do this?

Thank you very much

Anakin

Link to comment
Share on other sites

Just a precisation because, as it happens many times, I've red some posts...

I try to explain my problem and my project:

3 cores chained together: first is running midimerge for scanning 2 midi in, second is running ain64_din128_dout128_v2_0 ( the C version ) and the third running midio128, all are connected via J11.

The entire box is working good but the two midi in are dead, so I made some tests and finally see that the core running ain64_din128_dout128_v2_0 doesn't let data from midi in forward to the out so messages coming from the two midi in stops here!

Questions:

1) How and where can I enable the merger in the codes of ain64_din128_dout128_v2_0?

2) It's safe using unly midimergeon feature or it's better using midilink forwardind-endpoint feature? in this case where and how can I activate the function? Do I have to activate it also in the core running merger?

Any other suggestions?

Thank you very much!

Merry Christmas!

Anakin

Link to comment
Share on other sites

ain64_din128_dout128_v2_0 has to be changed manually.

Within the Init() function, you have to add

MIOS_MIDI_MergerSet(MIOS_MIDI_MERGER_MBLINK_EP); // endpoint

or

MIOS_MIDI_MergerSet(MIOS_MIDI_MERGER_MBLINK_FP); // forwarding point

depending on the position in the chain.

It makes sense to get use of the MIDIbox Link approach, it doesn't hurt and it prevents feedback loops

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten

It's all clear!

I've just make the change in this way for the first Core that is the first in the chain directly connected to midi in:

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS after startup to initialize the 
// application
/////////////////////////////////////////////////////////////////////////////
void Init(void) __wparam
{
  MIOS_MIDI_MergerSet(MIOS_MIDI_MERGER_MBLINK_FP); // forwarding point
  
  // set shift register update frequency
  MIOS_SRIO_UpdateFrqSet(1); // ms

  // we need to set at least one IO shift register pair
  MIOS_SRIO_NumberSet(NUMBER_OF_SRIO);

  // debouncing value for DINs
  MIOS_SRIO_DebounceSet(DIN_DEBOUNCE_VALUE);

  MIOS_SRIO_TS_SensitivitySet(DIN_TS_SENSITIVITY);

  // initialize the AIN driver
  MIOS_AIN_NumberSet(AIN_NUMBER_INPUTS);
#if AIN_MUXED_MODE
  MIOS_AIN_Muxed();
#else
  MIOS_AIN_UnMuxed();
#endif
  MIOS_AIN_DeadbandSet(AIN_DEADBAND);
}

Do you think it's right?

Thank you very much and merry christmas!!!

Anakin

Link to comment
Share on other sites

Hi

I made some tests, some good, some bad, but, at last I can't make the Mblink work as I want.

Let's try to explain:

I made basically 3 kind of tests:

1) the first was to made the change that Mr. Thorsten suggested me in the ain64_din128_dout128_v2_0 as described above and in the core 2 configured as forwarding point (core 1 running merger with pic18f452 so midiout of it go to midiin of core 2, core 3 running midio ) and make also the change to midio configuration enabling mblink_ep because is the last core and after this there's the midiout connected to a PC running midiox for testing.

RESULT: Midimessages from the two midiin connected to the merger (core1) don't go out and midiox only read midimessages from core 2 and core 3

2) Second was to change only the configuration of midio changing from mblink_ep to "enable" (simple merge).

RESULT:Midimessages from the two midiin connected to the merger (core 1) go out and I can read them in midiox, but when a generate midimessages with core 2 (e.g. moving a pot) , together with every CC (or others) messages I get also an additional message "undefined" STATUS 249 ( I think is a dedicated message for the midilink function)

3)Third was to change only the configuration of midio changing from mblink_ep to "mblink_fp".

RESULT:Midimessages from the two midiin connected to the merger (core 1) go out and I can read them in midiox, but when a generate midimessages with core 2 (e.g. moving a pot) , together with every CC (or others) messages I get also an additional message "undefined" STATUS 249 ( I think is a dedicated message for the midilink function) and the same is when I generate messages with core 3.

CONCLUSIONS: WHERE IS MY ERROR?

Any suggestion? The only thing that was not involved with my changes is the merger...do I have to make some changes also in this?

Thank you all for the help you can give me!!!

Anakin

Link to comment
Share on other sites

Hi Anakin,

RESULT: Midimessages from the two midiin connected to the merger (core1) don't go out and midiox only read midimessages from core 2 and core 3

Thats correct, all MIDI messages which are not tunneled won't be forwarded by an endpoint. You haven't mentioned, that you also want to forward MIDI events of a HW merger - this would only work if the merger is connected *after* the endpoint.

2) Second was to change only the configuration of midio changing from mblink_ep to "enable" (simple merge).

RESULT:Midimessages from the two midiin connected to the merger (core 1) go out and I can read them in midiox, but when a generate midimessages with core 2 (e.g. moving a pot) , together with every CC (or others) messages I get also an additional message "undefined" STATUS 249 ( I think is a dedicated message for the midilink function)

Yes, you can ignore this message, it's used as indicator for tunneled events (I misuse an unused event of the MIDI protocol here, but it doesn't hurt).

Any suggestion? The only thing that was not involved with my changes is the merger...do I have to make some changes also in this?

No, the merger project is not prepared for MIDIbox Link.

I think that there are two solutions: either disable MIDIbox Link (only enable the merger, don't declare cores as FP or EP) - disadvantage: feedback loop of your MIDI software forwards incoming MIDI events as well - or connect the MIDI merger at the end of the chain.

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 2 weeks later...

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

×
×
  • Create New...