Need some advice for uP / FPGA - MIDI Patchbay/Processor

solderspongebob

Well-known member
Joined
Jan 10, 2009
Messages
119
Location
High Wycombe, UK
Hi all,

I'm looking into creating a MIDI Patchbay/Processor device that can handle upto 32-MIDI Ins and 32-MIDI Outs. There are legacy units out there on auction sites, but no-one seems to make them anymore. Also, a hardware unit coupled with a USB MIDI interface is a lot more flexible and offers both realtime and playback possibilities that a computer and sequencer don't easily provide.

Initially, I was thinking along the lines of a PIC controller for a simple hardware interface (LCD + buttons) and an FPGA for the routing matrix.

But I realised that with the capability of FPGA's these days, that maybe I could realise the whole project (bar some I/O buffering) on a single FPGA, along with maybe some MIDI Merging and processing/filtering.

In fact, if that is the case and I design the hardware right from day one, then it could be an open-source project whereby anyone out there who wants to develop and expand the capabilities of the device can do so if they have the knowledge.

So to those of you with uP and FPGA experience, what do you think would be the right way to approach this project?
 

Andy Peters

Well-known member
Joined
Oct 29, 2007
Messages
2,018
Location
Sunny Tucson
solderspongebob said:
Hi all,

I'm looking into creating a MIDI Patchbay/Processor device that can handle upto 32-MIDI Ins and 32-MIDI Outs. There are legacy units out there on auction sites, but no-one seems to make them anymore. Also, a hardware unit coupled with a USB MIDI interface is a lot more flexible and offers both realtime and playback possibilities that a computer and sequencer don't easily provide.

Initially, I was thinking along the lines of a PIC controller for a simple hardware interface (LCD + buttons) and an FPGA for the routing matrix.

But I realised that with the capability of FPGA's these days, that maybe I could realise the whole project (bar some I/O buffering) on a single FPGA, along with maybe some MIDI Merging and processing/filtering.

In fact, if that is the case and I design the hardware right from day one, then it could be an open-source project whereby anyone out there who wants to develop and expand the capabilities of the device can do so if they have the knowledge.

So to those of you with uP and FPGA experience, what do you think would be the right way to approach this project?

The tradeoff I always make is this: if there's any kind of logic that benefits from being implemented in a typical sequential-execution microprocessor, do it there instead of in an FPGA. For example, with the day-job projects, we use FPGAs for the high-speed data handling/buffering/controller state machines, and an external processor handles product-to-host communications, housekeeping, temperature control, things like that.

The issue with the external processor is, of course, how to interface it to the FPGA. If data needs to flow to/from the two parts, then think about how to do that. Some micros have an external data bus (I'm thinking Silicon Labs 8051s but others have this too), most have high-speed SPI ports, and so on.

I would start with a big piece of paper and start drawing functional blocks and see how they all connect.

I bet what'll happen is you'll zero in on a Xilinx Spartan 3AN-50 and put a PicoBlaze in there ...

-a

PS: Don't fall into the trap of trying to embed a micro larger than a Xilinx PicoBlaze into your FPGA. Been there, done that, fuggit.
 

solderspongebob

Well-known member
Joined
Jan 10, 2009
Messages
119
Location
High Wycombe, UK
Thanks for your reply Andy - you've given me some real insight into how to approach this.

I'm a newby to FPGA, but kinda understand the principles (book on it's way soon!), which is why I initially thought about it for solving the MIDI Routing issue. I'm thinking now to look at that, along with how to selectively capture any of the Inputs and outputs (pre and post routing) and pass these through a uP for processing.

I'll also look at USB, as there is always the possibility of not only controlling the unit via a software front-end, but also potentially building a multi-port USB MIDI interface into the project.

I've got a long way to go, but will post designs on here as I do. I would want to get the architecture right from day one, so that anyone could build the main board and expand it and develop it to suit their needs.
 

Andy Peters

Well-known member
Joined
Oct 29, 2007
Messages
2,018
Location
Sunny Tucson
solderspongebob said:
Thanks for your reply Andy - you've given me some real insight into how to approach this.

I'm a newby to FPGA, but kinda understand the principles (book on it's way soon!), which is why I initially thought about it for solving the MIDI Routing issue. I'm thinking now to look at that, along with how to selectively capture any of the Inputs and outputs (pre and post routing) and pass these through a uP for processing.

Remember that FPGA design is the same as any other kind of digital logic design. It's just that instead of implementing the design with a board full of TTL or CMOS logic gates, it's all rolled into one device.

I'll also look at USB, as there is always the possibility of not only controlling the unit via a software front-end, but also potentially building a multi-port USB MIDI interface into the project.

Honestly, I have no idea about the best way to do a multi-port USB-to-MIDI interface. MIDI itself is well-supported by USB but of course you need to get the hardware implementation correct. It does boil down to a simple serial interface; how you route/merge/split all of that could be pretty interesting.

-a
 
Top