Re: [LAU] Live setup question with Carla

From: David Adler <d.adler@email-addr-hidden>
Date: Tue Sep 25 2018 - 16:30:37 EEST

On 25.09.2018 13:32, Jeanette C. wrote:
> Hey hey,
> I am helping a friend to set up a live performance system. The general
> requirements are: one master keyboard connected to a notebook, which
> hosts several plugins (VST through wine and Pianoteq in some form). The
> challenge: switch the sound engine which the master keyboard is
> controlling via MIDI (from the keyboard) or through another cheap
> controller.
>
> The current state: use Carla to host the instruments and try to map
> certain MIDI controllers to switch the internal routing. To that end I
> found one thread on Linux Musicians, where FalkTX suggested using some
> MIDI filtering plugin (like pizmidi-plugins or x42) or a standalone app
> like mididings. No final solution was posted/described.

Hi Jeanette

I'm using a mididings router for exactly that purpose.

It has 2 inputs and 8 outputs, all either Jack or Alsa,
depending on the backend selected.

One input ('data') receives the MIDI data to be routed
and a second one ('ctl') listens for certain CC numbers
that will switch the routing to one of the outputs.

I don't fully understand every aspect of it (e.g. why the
scene numbers are magically tied to the CC numbers
by a +1 relation), copy-pasted and adapted it years ago.
Since then it serves the purpose.

Run it with
$ mididings -f <filename>

with <filename> containing the following:

from mididings import *

# setup backend, names and ports

config(

   # select alsa backend, alsa or jack
   backend = 'alsa',

   # alsa/jack client name
   client_name = 'adingsroute',

   # two inputs, one to control scenes, one for the
   in_ports = ['data', 'ctl'],

   # 16 output ports
   out_ports = [
     'CH-1',
     'CH-2',
     'CH-3',
     'CH-4',
     'CH-5',
     'CH-6',
     'CH-7',
     'CH-8',
   ],
)

run(
   scenes = {
     32: Scene('input -> CH-1',
       Port('CH-1')
     ),
     33: Scene('input -> CH-2',
       Port('CH-2')
     ),
     34: Scene('input -> CH-3',
       Port('CH-3')
     ),
     35: Scene('input -> CH-4',
       Port('CH-4')
     ),
     36: Scene('input -> CH-5',
       Port('CH-5')
     ),
     37: Scene('input -> CH-6',
       Port('CH-6')
     ),
     38: Scene('input -> CH-7',
       Port('CH-7')
     ),
     39: Scene('input -> CH-8',
       Port('CH-8')
     ),
   },
   # ctl data: filter by port and stuff,
   # use number of EVENT_* for scene selection
   control = PortFilter('ctl') >> CtrlFilter(31,32,33,34,35,36,37,38) >>
CtrlValueFilter(0) >> SceneSwitch(EVENT_CTRL),

   # input data: filter by port
   pre = PortFilter('data'),
)
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue Sep 25 20:15:01 2018

This archive was generated by hypermail 2.1.8 : Tue Sep 25 2018 - 20:15:01 EEST