Hi Adam,
The most basic thing you could do is execute:
$ mididings 'run(Channel (1) >> System("ls"))'
In the above, mididings is invoked from the commandline, and the
program filters incoming MIDI data, responds only to Channel 1 and
executes the system command "ls".
There are a couple of things you can do to modify the above and make
it more robust: make a script, use different mididings units to
execute system commands.
One of the ways to make a script is to wrap the above like so:
#!/usr/bin/python2
from mididings import *
run (Channel (1) >> System ("ls"))
Put the above in a file and make it executable.
The second thing to do is not use the System unit, instead, add a
python function in your script which will call system commands using
all the robust mechanism available in Python, then use the mididings
unit Call to call that function.
Here's an example:
#!/usr/bin/python2
from mididings import *
def helloworld(ev):
print "Hello World!"
run (
Channel (1) >> Call( helloworld)
)
Mididings is extremely powerful, you can read more about the various units here:
http://das.nasophon.de/mididings/doc/index.html
Good luck!
> --
> You received this message because you are subscribed to the Google Groups
> "mididings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
mididings+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
>