"Show-In-A-Box"
Stage Control Center MIDI Ports
 

A little bit more MIDI!

More Midi
 Oh no! It's turning into a monsta!! I've decided (at this moment) to give the "main" processor 4 MIDI Output ports. I say "ports" as each will be turned on/off independently or together as assigned to a MIDI channel.
Also I need the MainPIC to communicate with the Arduino (diagram right) at 115,200 baud during startup for creating .TAP files from .MID files, sending that data to the PIC for organizing, then back to the Arduino to save new .TAP file to the SD Card.

 The simplest way was to select "ports" that data should go to using an octal latch off the PIC's I/O bus to control some gate logic circuitry. Wow it's been a long time since I've had to play with these!
 Because the processor outputs are quiescent high, OR gates have been used. The logic for switching them in is then inverted. (See the truth table) Nor gates have been used for the MIDI Out drivers to avoid having to add a second transistor to each port. These gates are CMOS to save power draw.
 The 6n137 is an opto-isolator for incoming MIDI, which is  a normal practice for MIDI.

 Port assignment will need to be a Global "default" setting so even if the panel Preset was changed, the MIDI hookups wouldn't, and from experience I know that sometimes I want to have my keyboards, sometimes my Korg Micro, and other times the V-Drums.

 

 The MIDI "song" settings can change the Port Layout (via MIDI chan.16), so one would need to be sure that the setup remains stable for ALL songs. I may write in a menu to allow logical overrides if ports are being added to a setup, but this may be a daunting task... I just don't want to have to create the same song for 3 different setups.

Adding sensors to the ports (if low then nothing connected) might be a method, as long as I use the same ports for the same instruments always:
Port 1=internal (VS-1053 & MPX-8), Port 2=Kawaii keyboard, Port 3=Yammy drums, Port 4=Korg synth
Port 4 may have lights and amp in a MIDI chain
Then if the ports are connected, the default for channel x no longer applies.
 

A typical setup for my stuff would be:


MIDI Channel# Default Port# "Sensed" Port#
1 1 (VS-1053) 2 (keyboards)
2 1 (VS-1053) 2 (keyboards)
3 1 (VS-1053) 2 (keyboards)
4 1 (VS-1053) 4 (Casio)
5 (none) 4 (Korg)
6 (none) 4 (strip-lites)
7 (none) 4 (600W-amp)
8 1 (VS-1053) 1 (VS-1053)
9 1 (VS-1053) 1 (VS-1053)
10 1 (VS-1053) 3 (YammyDrum)
11 1 (VS-1053) 3 (YammySyn)
12 (none) 4 (Lights)
13 1 (VS-1053) 3 (YammySyn)
14 1 (VS-1053) 1 (VS-1053)
15 (none) 3 (YammySyn)
 The main problem with my setup is that, in economizing and maximizing, I have several MIDI receivers on one port. As a work-around, as I built these "peripherals" (Lighting, amp/mixer control etc) each one was assigned a different channel.

Channel 5 must go to the Korg on port 4 because I always set the korg in a chain and it only "sees" channel 5.

Channel 16 is skipped as this is reserved for "on-the-fly" panel control and set-up overrides by MIDI song. This is one of the really cool features of this project, automation!

These settings could be overridden by the "Song" but extreme care would need to be taken

MIDI Channel# Default Port# "Sensed" Port#
1 1 (VS-1053) 2 (keyboards)
2 1 (VS-1053) 2 (keyboards)
3 1 (VS-1053) 2 (keyboards)
4 1 (VS-1053) 2 (keyboards)
5 (none) 4 (Korg)
6 1 (VS-1053) 3 (YammySyn)
7 1 (VS-1053) 2 (keyboards)
8 1 (VS-1053) 1 (VS-1053)
9 1 (VS-1053) 1 (VS-1053)
10 1 (VS-1053) 3 & 1 if<note9
11 1 (VS-1053) 3 (YammySyn)
12 1 (VS-1053) 3 (YammySyn)
13 1 (VS-1053) 3 (YammySyn)
14 1 (VS-1053) 3 (YammySyn)
15 1 (VS-1053) 3 (YammySyn)
This would be the setup if I didn't have any lights and amp, just synths. Now I'm wondering if I shouldn't set, say, 4 "pages" of port controls. One for each kind of setup.

That's adding some complexity, but it'd be a good method once the decision as to what should go where is made.
Also, the on-board MPX8 will be set to play it's samples using notes 1 to 8, so on this "sensing" switch, I'd have to include a routine that only allows notes <9 to pass, so the VS1053 isn't drumming at the same time.

The whole point of this project is to get away from wires and hookups and complexity, but I also would like the option to be able to "add on". It is a perplexing problem!

Because the VS1053 is kinda "MIDI-ish", it'd be nice to have the option to add better drums or piano. Before putting on a show, I generally prepare quite a bit, but I'd like to make this as easy as possible.

 The .MID file format *does* have a port assignment (Meta FF 21), but nothing I have can write that to a MIDI file so it's kinda useless, so really there's no other way of assigning MIDI ports.
Multiple ports seems evil at the moment, but eventually I'll work it out!

  It's always good to have mucho flexibility, but in an organized way (listen to me lol!) At first I thought 4 ports for a portable stage box was over-doing it a bit, but now I see it's not!
The idea of being able to send on multiple ports at the same time is a habit I gained from using FL Studio's "Layer" channel. It's gotten so I'm accustomed to the rich sound of 2 (or more) pianos playing together. So channel 1, patch 1 can output to all of the ports for 4 different midi synth's all playing piano. Yummy!

 

  to  The VS1053 MIDI Synth Board Hack
  ..to Show-in-a-box home page
 

 

Disclaimer: This is not an instructional page to build or manufacture the above project, nor are there any guarantees of accuracy herein.
This page is an "of interest" discussion, and the project is intended for my own personal use.
If you have any questions, or wish to pursue this project, you may contact me (Sandra) at fresh(at)freshnelly.com