MIDI routing

The standard V4 Zynthian has physical MIDI input and output ports, ability to connect to some network MIDI devices and USB MIDI, both host and OTG. By default all MIDI inputs are connected to all layers. MIDI FX layer outputs are connected to the built-in physical MIDI output and network MIDI targets. These two may be toggled via the layer’s output routing function. Layers cannot be connected to other MIDI outputs, e.g. USB MIDI. This is by design but I feel there is room for improvement. (I submitted a feature request but @jofemodo asked us to discuss it here first.)

The recently added MIDI FX layers offers the ability to use Zynthian as a MIDI processor, e.g. connect MIDI input to a plugin and the plugin’s output to MIDI output. This would allow such things as keyboard split, velocity dynamics adjustment, etc. for external devices.

I would like to see the ability to feed a MIDI FX layer to any MIDI output. Routing could default to current behaviour. All outputs could appear in the routing list. I would like this to be saved with the snapshot. Zynthian should gracefully ignore any routings involving a missing (temporary) MIDI device, e.g. USB MIDI but retain the routing information in the snapshot. Maybe such routing could be removed if the snapshot is saved whilst the device is missing. It may be possible to implement this functionality with MIDI filters but it seems more intuitive to use MIDI output routing.

I don’t propose changing any input routing. We may consider this advantageous in the future, e.g. allow two MIDI controllers to use channel 1 and route each to different engines but I think we can already do similar with MIDI filters so probably not worth it.

As a minimum I think we should be able to route to any MIDI output.

Please offer suggestions, support, alternative ideas, etc.

7 Likes

I agree we need this. as it is, its preventing me from controlling the lights on my Launch pads.

1 Like

OK! Let’s do It. Open a fracture request.
Anyway, i would like to add that currently you can choose, from webconf, the hardware MIDI ports being connected to Zynthian input and output.

Cheers!

Are you able to reopen fracture request 263? I can add my detailed description from above.

Is there a possibillity to route midi CC from one layer to an other?
Example:
PureData-Layer CC out > Synth-Layer IN.

In the Wiki I found this:
https://wiki.zynthian.org/index.php/MIDI_Filter_Rule_Language
But it is more for routing from Midi IN.

Hi @aw-bs,
try this:
make 1th layer PD
make 2nd layer FluidSynth
from Layers menu select 1#PD and go to Layer Options by bold click
select MIDI Routing
and select [ ]2#FS

a make test :slight_smile:

1 Like

Hi @ToFF,
thank you for your help.
But it is not working.
Midi-Log only here some traffic, nothing in ZynMidiRouter:
image

OK, so make experiment with Clone MIDI or Add MIDI-FX on Layer Options. Also look on web config to menu Software/LV2-Plugins and select other available MIDI Tools.

Or maybe someone more experienced will advise …

This should work, except you need to add a MIDI Channel filter to the FS layer, or set the right channel on the CC messages sent from PD.

Enjoy!

I followed the steps two times, no success.

image

image

image

Where can I find the chapter in wiki for these routing functionality?

I only found:

no Midi filter used

ops, can you send pd file, i’ll try connection on my zynthian…

aw.pd (332 Bytes)

This would be very helpfull.
Thank you in advance!
:+1:zynconfig.yml (910 Bytes)
aw.zip (752 Bytes)

Hi @aw-bs.

I maked some preparatiom, my AKAI EWI USB I rerouter by BomeBox, so I have on channel 1 only CC7 and on channel 2 only Note ON, Note OFF. This was going to Zynthian.

In Zynthian I setup to layers, 1#PD, 2#FS. Loaded your files, I edited pd files to set output to channel 2 and CC#7. Controled setup by patchage and I tried connect PD Midi Out to ZynMidi Router main in.

I was successful. Here is some tones

Here is pd files aw (1).zip (743 Bytes)
and snapshots 006-PD ; FS.zss (18.2 KB)

I dont used any CC maping on layers, only send midi to for PD layer

But nex step was clear all and load snapshot… and this not work now… :worried:

Hi @ToFF ,
for me it´s not possible to connect:

The question is if this connection can be done without a vnc connection.
Therefore the mapping should be working…
…no idea

Thank you for our time.
:grinning:

Hi @aw-bs, Change your pd patch like this and it should work. Then route MIDI as you previously explained.
PD file

Hi @ronsum,
thank you, it was a good solution.
Now it works.
I changed a little bit to adapt the channel and the cc number from ui:

image

Have you any idea to bring the midi clock in here?

Can you explain what you hope to accomplish with midi clock and what you’ll be using to generate the midi clock?

This is to record and play midi events (CC) with arrays and this by using the internal clock.
Otherwise a metro object can do it in the same way.
Only to see if it works…

Okay, I’ll make a patch to demonstrate. I have plans today so give me a day or two.

It seems to me the jack transport clock is not integrated in pure data. However, the MIDI-FX Layer named MIDI Clock Generator can be used to route it’s internal clock or a host clock such as the zynthian sequencer to the midirealtimein object in pure data. A counter object can be used to adjust the incoming pulses to match the clock tempo. Here’s how it looks:
MidiRealtimeIn
Here’s an example pd patch that uses the clock to step through a simple 8-step sequencer. The patch includes a control to select a midi channel to send the midi note data to. The pure data layer has to be routed to the synth layer you want it to control. To use the jack clock, a sequence in the zynthian sequencer needs to be started. The MIDI Clock Generator lets you chose which clock you want to use to control the tempo . Of course the zynthian sequencer can do all of this without using pure data or the MIDI Clock Generator. I made this patch and snapshot just to show how to bring in the jack clock to control the patch tempo.
ClkTest.zip (2.2 KB)
008-clocktest1.zss (24.5 KB)
I included a snapshot of the layers I used to demonstrate.

1 Like