0

Make midi controller regulate system volume. With the following code a midi controller can be used for controlling the audio volume of a linux system:

aseqdump -p 20 | sed -nur 's/^.*controller 14, value (.*)/\1/p' | \ 
while read l; do amixer -q set Master $l; done

Given that the midi controller's client nr is: 20 (this can be determined by aconnect -i) and the 'nr' of the treble is 14 (see aseqdump output for details)

Is there a way to do this more directly, e.g. in order to circumvent the parsing?

  • Not really, something will need to read the MIDI events and take action when an appropriate event is parsed out of the stream. – thrig Jul 21 '16 at 18:06
  • You would have to write your own program to receive MIDI messages. Please note that you can use the client name instead of the number. – CL. Jul 21 '16 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.