Jump to content

secondary midi input


jeb
 Share

Recommended Posts

hello,

i have done a midibox (with my own program based on the midiinout128 example)

with pots, buttons, etc.

i want to add a secondary midi input that will be merged with the first one.

i did like in the midi merger project : RA4 (from the PIC of the core, i.e. pin #6) to

a second optocoupler with resistors, diode, etc.....

do i have to remove the R2 1K resistor if I use the second midi input ?

because there is already a 1.2K resistor between PIC RA4 and 5v 

(provided by the second MIDI (optocoupler, etc.) module (see midimerger.pdf))....

what do i have to add in the code ?

thanx

jeb

Link to comment
Share on other sites

The PIC18F452 has one UART, so it will only support one MIDI IN unless you have a little help.

There is a "IIC" or "I2C" MIDI module that can add another input, or there is a MBNet offering (very recently) that will allow you to network modules together over a CAN bus. This would require a processor change.

I'm no expert, but I think those are your options at this time. I'm sure if I got something wrong, then smarter people will correct me.

Have Fun,

LyleHaze

Link to comment
Share on other sites

hello,

ok if this doesn't work...

in fact i don't need to merge 2 inputs...

i have to use MIDI IN #1 at a certain moment and MIDI IN #2 at another moment.

but never both at the same time.

in fact i'm looking for a solution that allow me NOT to unplug one cable and replug

another... that would be boring....

is it possible to select one of the two MIDI IN ? (not to merge them

if not possible)

with a button for example or dynamically in the code that would ""switch"""

the input.

for the moment i have done it with an inversor (mechanical) switch but it's a bit boring...

i would like to switch it from the code ....

jeb

Link to comment
Share on other sites

I think the problem would be if you switched while either one of the signals was in the middle of a message. That would corrupt the message and possibly confuse the UART.

It would also require more parts, as there is no way I know of to switch the UART inputs in software.

_But_, don't let me discourage you. If you are sure that's what you want to do, Enjoy the challenge!

LyleHaze

Link to comment
Share on other sites

hello,

1) what happens if i connect the 2 outputs of the 2 octo-couplers (one for each MIDI In)

to the same core ?

pin 6 of octocoupler 1 (MIDI IN #1)  \

                                                  ------------- pin 26 of PIC18F      (pin RX)

pin 6 of octocoupler 2 (MIDI IN #2)  /

will it work if i'm sure message won't come AT THE SAME TIME (from the differents outputs) ?

2) if i do :

pin 6 of octocoupler 1 (MIDI IN #1)  ---> pin 26 of PIC18F      (pin RX)

pin 6 of octocoupler 2 (MIDI IN #2)  ---> pin 6 of PIC18F      (pin RA4 like for the merger project)

I want to use the inputs NOT BOTH AT THE SAME TIME.

how to tell MIOS that MIDI comes from pin 26 or pin 6 ?

3) any other switching option ? apart putting a mechanical switch (that's what i've done!) ?

jeb

Link to comment
Share on other sites

The MIDImerger project is a very timing sensitive project where the second MIDI In is realised as a software UART. It is not possible to use the same approach if the CPU is loaded with other tasks, so it is especially not possible to use the same approach with MIOS.

Solution 1 is not possible, as MIDI lines are current loops

Solution 3: just use two optocouplers, and join the signals with a digital multiplexer. Maybe transmission gates (4066) could also be used.

Best Regards, Thorsten.

Link to comment
Share on other sites

thanx a lot for your response !

how to use a digital multiplexer ? (which reference?)

which pins are to be connected ?

with this solution, will it be real merger ? or is it a solution

only when we are sure that the MIDI messages from

the 2 MIDI IN do NOT come at the same time ?

thanx in advance !

MIDIBOX is great !!

Link to comment
Share on other sites

This will be of course no real MIDI merger, but my assumtion was, that this is already clear to you.

I cannot give you a schematic for such a multiplexing circuit, but Wikipedia gives you a basic description: http://en.wikipedia.org/wiki/Multiplexer

If this information is not enough, I would suggest to build a seperate PIC based MIDI merger, it's propably easier for you, and it's more powerful

Best Regards, Thorsten.

Link to comment
Share on other sites

hello,

thanx a lot.

a multiplexer would be good for me (much cheaper !! and easier than

building a complete core with a PIC...)

could you just give me the name of the chip needed (74?? , 74157 ?) and

then i promiss i will do it by myself without asking any questions.... ;)

thanx

jeb

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

×
×
  • Create New...