Running external commands

162 views
Skip to first unread message

Flo

unread,
Jul 29, 2012, 1:47:27 AM7/29/12
to midi...@googlegroups.com
Hi :)

I'd like to control LinuxSampler with my MIDI foot controller. I thought
Mididings could help me, because it's written in the description that we
can run external commands, but I did'nt find how to do this.

Can you help me please ?

--
Flo

Aurelien

unread,
Aug 1, 2012, 3:03:12 AM8/1/12
to midi...@googlegroups.com
On Sun, Jul 29, 2012 at 07:47:27AM +0200, Flo wrote :
> Hi :)

Hi Flo!

>
> I'd like to control LinuxSampler with my MIDI foot controller. I
> thought Mididings could help me, because it's written in the
> description that we can run external commands, but I did'nt find how
> to do this.

What kind of external command do you need to run?
I'm not sure, as I do not use LinuxSampler myself, but I think it might
be controlled in MIDI, or even in OSC, which would be easier, I think.



--
Aur�lien

Dominic Sacré

unread,
Aug 4, 2012, 10:05:31 PM8/4/12
to midi...@googlegroups.com, Flo
Hi Flo,

On Sunday 29 July 2012 07:47:27 Flo wrote:
> I'd like to control LinuxSampler with my MIDI foot controller. I
> thought Mididings could help me, because it's written in the
> description that we can run external commands, but I did'nt find how
> to do this.

You can use the System() unit to run shell commands from a mididings
patch, see http://das.nasophon.de/mididings/doc/units.html#calls

The command you pass to System() should be formatted the same way as you'd
type it at the shell prompt.
For a little more flexibility you can pass a Python function to System(),
that takes the incoming MIDI event and returns the command to be executed.

Let me know if this helps,


Dominic

Dominic Sacré

unread,
Aug 4, 2012, 10:08:53 PM8/4/12
to midi...@googlegroups.com
LinuxSampler uses MIDI only for playing the instruments, while configuring
its input/output channels, loading samples etc. is done using its own
network-based protocol.
When configuring LinuxSampler from a command line you'd typically use
netcat to send the commands, and the same should also work from within
System() in a mididings patch.


Dominic

robin....@gmail.com

unread,
Aug 5, 2012, 2:27:59 AM8/5/12
to midi...@googlegroups.com, Flo, domini...@gmx.de

hi, i'm having problems doing this also. could you post a simple example of the System call please? i tried the example on your website, using klick, but got tangled up setting up OSC. would it be possible to post something ultra-simple? thanks

robin

psio...@gmail.com

unread,
Nov 5, 2012, 4:42:30 AM11/5/12
to midi...@googlegroups.com, fl...@gmx.fr
Im working this problem few months...
example file:

from mididings import *
config(
    backend='jack-rt',
    client_name='transpose',
)
config(in_ports=[
('keyb_first' ,'alsa_pcm:USB-Midi-Cable/midi_capture_1' ),
('zkey88' ,'alsa_pcm:UM-ONE/midi_capture_1')
])
config(out_ports=[
('KEYB_FIRST','LinuxSampler_first:KEYB_ORGANY','LS_PIANOFORTE:KEYB_FIRST','LS_percussion:KEYB_PERCUSSION'),
('ZKEY88' ,'LinuxSampler:ZKEY88','LS_Pianoforte:ZKEY88','LS_percussion:ZKEY88')
])
run(
  Transpose(2)        >> 
[
  Velocity(fixed=66)  ,
  LimitPolyphony(2,remove_oldest=False) >>  Channel(7) ,
  Filter(NOTE|CTRL)   >> Channel(4) ,
  Filter(NOTE|CTRL)    >>  LimitPolyphony(2,remove_oldest=False) >> Channel(5) 
]
)

filter voice is still bad, unfortunately - because I used: - LimitPolyphony(2,remove_oldest=False) >>  Channel(7)
Velocity(fixed=66) - pressure sensitivity off key, do not allow it to channel4: - Filter(NOTE|CTRL)   >> Channel(4) ,
In config out ports - contains the names of which must be defined in the file lscp (There are ready-made connection and a big mess - treat this as an example, the names they come up with)
and of course the function transpose =+2
activators have yet to create and link them to the best of shortcut keys - example file (lubuntu):

#!/bin/bash
killall mididings
sleep 0.2
mididings -f /example catalog/transposer2.py

killall is needed to remove the previous connection

Please understand how it can publish it online LinuxSampler
for me it is a big problem - my english is bad....

by the way - are you planning to fix the function: VoiceSplit([patch, ...] ???
Bogdan from Poland

Egor Sanin

unread,
Nov 5, 2012, 2:01:20 PM11/5/12
to midi...@googlegroups.com
Hello psiorgan

On 11/5/12, psio...@gmail.com <psio...@gmail.com> wrote:
> Im working this problem few months...
> example file:
>
> from mididings import *
[SNIP]
> )
>
> filter voice is still bad, unfortunately - because I used:
> - LimitPolyphony(2,remove_oldest=False) >> Channel(7)
> Velocity(fixed=66) - pressure sensitivity off key, do not allow it to
> channel4: - Filter(NOTE|CTRL) >> Channel(4) ,
> In config out ports - contains the names of which must be defined in the
> file lscp (There are ready-made connection and a big mess - treat this as
> an example, the names they come up with)
> and of course the function transpose =+2
> activators have yet to create and link them to the best of shortcut keys -
> example file (lubuntu):

Unfortunately, it completely not clear what you are asking here.

>
> #!/bin/bash
> killall mididings
> sleep 0.2
> mididings -f /example catalog/transposer2.py
>
> killall is needed to remove the previous connection
>
> Please understand how it can publish it online LinuxSampler
> for me it is a big problem - my english is bad....

Could you rephrase your question please?
Reply all
Reply to author
Forward
0 new messages