alsa/all_notes_off
Takashi Iwai dd7b3ef9f8 Accepting request 243338 from home:tiwai:branches:multimedia:libs
- Remove obsoleted README.SuSE (bnc#889023)
- Correct SUSE branding names in some texts (bnc#889023,FATE#316521)
- Properly include time.h for CLOCK_MONOTONIC_RAW:
  0015-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch

OBS-URL: https://build.opensuse.org/request/show/243338
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=164
2014-08-01 07:38:49 +00:00

24 lines
688 B
Bash

#!/bin/bash
#
# Send an "all notes off" event to all channels of all
# MIDI-Devices configured in the System
#
# Written by Matthias Nagorni, (c) 2001 SuSE GmbH Nuremberg
# (c) 2014 SUSE Linux Products GmbH
#
for d in /dev/snd/midiC?D?; do
echo Sending "all notes off" to MIDI device $d
cat /usr/lib/all_notes_off.bin > $d
done
if [ -x /usr/bin/pmidi ]; then
echo Can execute pmidi. Fine.
plist=$(pmidi -l)
for p in $plist; do
p1=${p%:0}
if [ "$p1" != "$p" ] && [ $p1 -gt 16 ]; then
echo Sending "all notes off" to MIDI port $p
pmidi -p $p -d 0 /usr/lib/all_notes_off.mid
fi
done
fi