MsAlsaSeq: ALSA driver for MidiShare

De wikijoan
Salta a la navegació Salta a la cerca

A Linux, hem de tenir instal.lada la llibreria MidiShare, d'una banda, i tot el sistema de so ALSA, per l'altra. ALSA és el que s'encarrega de parlar amb els dispositius físics, la targeta de so. Aleshores el que fa MidiShare és proporcionar un driver ALSA, i d'aquesta manera els projectes MidiShare poden sonar.

man MsAlsaSeq

MSALSASEQ(1)                MidiShare User’s Manual               MSALSASEQ(1)



NAME
       msAlsaSeq - ALSA driver for MidiShare

SYNOPSIS
       msAlsaSeq [options] [client-name]

DESCRIPTION
       msAlsaSeq   creates  an  ALSA  sequencer  client  and  a  corresponding
       MidiShare client, both named client-name  ("MidiShare/ALSA  Bridge"  by
       default)  and establishes connections to other ALSA clients as given by
       the -i and -o options. MIDI input received by the ALSA  client  becomes
       the  input  of the MidiShare client, and output of the MidiShare client
       is sent to the output side of the  ALSA  client.  This  allows  you  to
       access ALSA devices and other ALSA clients from MidiShare applications,
       simply by connecting your MidiShare application  to  the  input/and  or
       output of the msAlsaSeq MidiShare client.

       You  can  just start the program as msAlsaSeq and establish connections
       to other ALSA clients manually with aconnect(1) or your favourite  ALSA
       patchbay.  Alternatively,  you  can  specify  the  desired  connections
       directly on the command line. For instance,

                msAlsaSeq -i 64:0 -o 64:0

       connects input and output to port 0 of client 64. Usually  this  corre‐
       sponds  to the external MIDI interface of your first soundcard. To find
       out about the available ALSA sequencer clients and ports on  your  sys‐
       tem,  run the ALSA program aconnect with the -i and -o options. You can
       also use the MidiShare msconnect  program  to  connect  your  MidiShare
       applications with the MidiShare client created by msAlsaSeq.

       Instead  of a numeric ALSA client id, you can also specify the client’s
       name. Shell wildcards (‘*’, ‘?’ etc.)  are recognized as well. E.g.,

               msAlsaSeq -i ’Rawmidi*’:0

       connects the input to port 0 of the first client whose name starts with
       ‘Rawmidi’.

       By  default,  the  MidiShare  port number of a received event is always
       zero, and transmitted events are always  sent  to  all  connected  ALSA
       clients,  no  matter which MidiShare port was specified. This behaviour
       is consistent with the other drivers supplied with the Linux version of
       MidiShare, and is convenient if you want to dynamically connect to dif‐
       ferent ALSA clients with the aconnect utility. If  necessary,  multiple
       instances  of msAlsaSeq can be run to access different ALSA clients. In
       this case it is useful to specify the client-name parameter to  distin‐
       guish the different clients. Example:

                msAlsaSeq "ALSA Midi Port" -i 64:0 -o 64:0
                msAlsaSeq "ALSA Wavetable Synth" -o 65:0

       Alternatively, you can also specify a mapping between ALSA client ports
       and MidiShare ports as follows:

                msAlsaSeq -i 64:0/0 -o 64:0/0 -o 65:0/1

       Here we configured one input port, which is mapped to MidiShare port 0,
       and  two  output ports which are mapped to the MidiShare ports 0 and 1,
       respectively. This provides some degree of compatibility with the MacOS
       and  Windows  versions of MidiShare (where you usually access different
       devices using corresponding port  numbers,  instead  of  connecting  to
       different  MidiShare  clients), but is less versatile, as all input and
       output ports have to be specified in  advance  and  cannot  be  changed
       dynamically.

OPTIONS
       -h     Prints a short usage message and exits.

       -i client:port[/msport]
              Establishes  an  input connection with the given ALSA client and
              port. The client can be given either by its numeric id or a pat‐
              tern  for  the  client name. The MidiShare port number msport is
              optional. If present, it indicates that input is mapped  to  the
              given MidiShare port when an event is delivered to the MidiShare
              application.

       -o client:port[/msport]
              Establishes an output connection for the given ALSA  client  and
              port.  If  the  MidiShare  port  number  msport  is  given, only
              MidiShare events directed to that port will be  output  on  this
              connection.

BUGS
       Right  now  msAlsaSeq  does  not keep track of the original ALSA times‐
       tamps. The timestamp of a received event thus  indicates  the  time  at
       which the event was read by the driver.

SEE ALSO
       aconnect(1), http://www.alsa-project.org
       http://www.grame.fr/MidiShare

AUTHOR
       Albert Graef, University of Mainz. (Based on Grame’s msRawMidi driver.)



                                   May 2004                       MSALSASEQ(1)