make sbiload to use hwdep interface
PATCH 1/1 make sbiload to use hwdep interface
This patch makes sbiload using the hwdep interface instead of seq instr layer. This simplifies the logic a lot.
Takashi
seq/sbiload/README +20 -40
@@ -1,4 +1,4 @@ This is sbiload - an OPL2/3 FM instrumen -This is sbiload - an OPL2/3 FM instrument loader for ALSA sequencer +This is sbiload - an OPL2/3 FM instrument loader for ALSA hwdep Written by Uros Bizjak <[email protected]> Web: http://www.kss-loka.si/~uros/sbiload.html
@@ -14,62 +14,42 @@ By default it will install into /usr/loc By default it will install into /usr/local/bin, change INSTDIR in make.conf to change this. -Before use ----------- - -Please check that the correct sequencer modules are loaded for your -sound card. You need to load snd-synth-opl3 module. - Usage ----- - loadsbi [-p client:port] [-4] [-l] [-P path] [-v level] instfile drumfile + loadsbi [-D device] [-4] [-P path] [-v level] instfile drumfile - -p, --port=client:port - An ALSA client and port number to use + -D, --device=name - An ALSA hwdep name to use -4 --opl3 - Four operators (OPL3) file type - -l, --list - List possible output ports -P, --path=path - Specify the patch path -v, --verbose=level - Verbose level -Because you may have more than one sound card and each sound -card may have several MIDI connections, you have to tell sbiload -which one to use. +When you have multiple sound cards and/or there may be multiple OPL2/3 +synth devices, you have to tell sbiload which one to use, and pass its +hwdep name via -D option. Otherwise, sbiload will load the data onto +the first found device. -First find out what the possibilities are for your system: +To find out the hwdep name of the OPL devices, check +/proc/asound/hwdep file first. It has the list of hwdep devices +currently available on your system. -If you run: - - sbiload -l + % cat /proc/asound/hwdep + 00-00: Emux WaveTable + 00-01: OPL3 FM + 01-00: OPL3 FM -it will give you a list of the devices. On my system I get: - - Port Client name Port name - 64:0 0: MIDI Synth MIDI 0-0 - 65:0 OPL3 FM Synth OPL3 FM Synth port +In the example above, you have two OPL3 devices. To the first one +(00-01), which means the first card (00-) and the second device (01), +pass "-D hw:0,1". For the second OPL3 device (01-00), pass "-D +hw:1,0" instead. - -Only OPLx FM Synth port can be used with sbiload. In the example above -the first one is the external Midi port, and the second is the internal -four-operator FM synthesizer (OPL3). - -If you don't see anything listed then check that the correct ALSA -modules are loaded as in the section "Before use". Running sbiload --------------- -You specify the port to use with the -p option, or by setting the -environment variable ALSA_OUT_PORT. +Pass the instrument and drum file data as arguments. -For example to use port 0 on client 65 to load four-operator FM -instrument - - sbiload -p 65:0 --opl3 std.o3 drums.o3 - -or - - export ALSA_OUT_PORT=65:0 - sbiload --opl3 std.o3 drums.o3 + % sbiload std.o3 drums.o3 Acknowledgements
seq/sbiload/sbiload.c +162 -400
760 lines not on this page · raw message