CptCredible:
Hello.
I am Daniel and I want to have a midi merger, but they are not cheap, and they are usually too big and heavy for my liking, so I want to make my own... I came up with the following solution for receiving potentially simultaneous midi messages and making sure to output them one at a time. ...
I would love it if you could tell me that this was a stupid idea and that there is a much easier way to achieve what I want to do.
I even have a handfull of attiny85s lying around, Could i do it with them do you suppose? i.e. can i make it go at 16MHZ and stil have RX and TX pins and a way to set and read the flag?
Thanks for any light you might shed on this.
Daniel
This is an interesting approach, Daniel. Did you get any further with it?
It hadn't actually occurred to me to use multiple CPUs with a shared flag, but it makes a lot of sense. Trying to do it in software on a single CPU seems to raise more problems.
Would each CPU run the same code? I'd prefer to give one priority of the other(s), but it could do that by reading an input pin, with a jumper or similar, I suppose.
I think prioritising could help - maybe daisy chaining for multiple inputs, otherwise there's a remote chance of a clash, plus there's usually going to be a main stream of data (e.g. from a keyboard or wind controller), and additional streams from things like expression pedals. Also, you might want to allow for totally locking out the other CPUs during a Sysex data transfer.
I guess the flag could be made to physically time out - e.g. a simple RC circuit that discharges itself in a few milliseconds, if it doesn't get reset by a CPU saying it's finished with it - e.g. with transistors to charge and discharge the capacitor quickly, to set and reset the flag, and a resistor to discharge it slowly to time out, as a safeguard against locking up, for some reason. Normally, a CPU could pulse the base of the Set transistor, but could hold it for Sysex transfers.