annotate plugin/api/alsa/README @ 282:d9319859a4cf tip

(none)
author benoitrigolleau
date Fri, 31 Oct 2008 11:00:24 +0000
parents fc9323a41f5a
children
rev   line source
lbajardsilogic@0 1 libdssialsacompat 1.0.8a
lbajardsilogic@0 2 ========================
lbajardsilogic@0 3 libdssialsacompat is simply an extraction from and repackaging of
lbajardsilogic@0 4 the code from alsa-lib 1.0.8, necessary to support DSSI on non-ALSA
lbajardsilogic@0 5 systems. It is copyright (c)2005 under the GNU Lesser General
lbajardsilogic@0 6 Public License, version 2.1 or later. See the enclosed file COPYING
lbajardsilogic@0 7 for details.
lbajardsilogic@0 8
lbajardsilogic@0 9 More information on DSSI can be found at:
lbajardsilogic@0 10
lbajardsilogic@0 11 http://dssi.sourceforge.net/
lbajardsilogic@0 12
lbajardsilogic@0 13 Introduction
lbajardsilogic@0 14 ============
lbajardsilogic@0 15 The DSSI specification makes use of the ALSA snd_seq_event_t
lbajardsilogic@0 16 structure for passing MIDI events. This has the advantage of making
lbajardsilogic@0 17 it immediately familiar to developers familiar with ALSA, but the
lbajardsilogic@0 18 disadvantage of making porting DSSI applications and plugins to
lbajardsilogic@0 19 systems that lack ALSA more difficult.
lbajardsilogic@0 20
lbajardsilogic@0 21 libdssialsacompat is intended to provide the snd_seq_event_t
lbajardsilogic@0 22 declarations and handling code necessary to compile and use DSSI on
lbajardsilogic@0 23 non-ALSA systems. It aims to allows compiling DSSI code with as
lbajardsilogic@0 24 little change as possible, while not presenting itself in such a way
lbajardsilogic@0 25 as to fool other autoconf-enabled code into thinking a system has
lbajardsilogic@0 26 ALSA.
lbajardsilogic@0 27
lbajardsilogic@0 28 libdssialsacompat is simply an extraction of the relevant
lbajardsilogic@0 29 snd_seq_event_t declarations, and raw MIDI stream to snd_seq_event_t
lbajardsilogic@0 30 encoder code, from alsa-lib version 1.0.8, packaged into a
lbajardsilogic@0 31 convenient library.
lbajardsilogic@0 32
lbajardsilogic@0 33 This library does NOT provide any sort of emulation of the ALSA
lbajardsilogic@0 34 audio, MIDI, or sequencer devices. The only part of ALSA that is
lbajardsilogic@0 35 required by the DSSI specification is the snd_seq_event_t definition
lbajardsilogic@0 36 and handling, and that is all libdssialsacompat is intended to
lbajardsilogic@0 37 replace. Other ALSA code should be ported to native facilities.
lbajardsilogic@0 38
lbajardsilogic@0 39 Installation
lbajardsilogic@0 40 ============
lbajardsilogic@0 41 libdssialsacompat uses GNU autoconf and automake, so installation can
lbajardsilogic@0 42 be a simple as `./configure && make && make install'. See the
lbajardsilogic@0 43 enclosed file INSTALL for more information.
lbajardsilogic@0 44
lbajardsilogic@0 45 The library itself is installed to <prefix>/lib; for example, on Mac
lbajardsilogic@0 46 OS X, the following files are installed:
lbajardsilogic@0 47
lbajardsilogic@0 48 <prefix>/lib/libdssialsacompat.0.0.0.dylib
lbajardsilogic@0 49 <prefix>/lib/libdssialsacompat.0.dylib
lbajardsilogic@0 50 <prefix>/lib/libdssialsacompat.a
lbajardsilogic@0 51 <prefix>/lib/libdssialsacompat.dylib
lbajardsilogic@0 52 <prefix>/lib/libdssialsacompat.la
lbajardsilogic@0 53
lbajardsilogic@0 54 The header files are installed to <prefix>/include/dssi/alsa:
lbajardsilogic@0 55
lbajardsilogic@0 56 <prefix>/include/dssi/alsa/asoundef.h
lbajardsilogic@0 57 <prefix>/include/dssi/alsa/asoundlib.h
lbajardsilogic@0 58 <prefix>/include/dssi/alsa/seq.h
lbajardsilogic@0 59 <prefix>/include/dssi/alsa/seq_event.h
lbajardsilogic@0 60 <prefix>/include/dssi/alsa/seq_midi_event.h
lbajardsilogic@0 61 <prefix>/include/dssi/alsa/sound/asequencer.h
lbajardsilogic@0 62
lbajardsilogic@0 63 Note that they are NOT installed to <prefix>/include/alsa, which
lbajardsilogic@0 64 could make them visible to non-libdssialsacompat-aware autoconf
lbajardsilogic@0 65 configure scripts, possibly fooling them into thinking the full ALSA
lbajardsilogic@0 66 was available.
lbajardsilogic@0 67
lbajardsilogic@0 68 Finally, a pkgconfig configuration file is installed:
lbajardsilogic@0 69
lbajardsilogic@0 70 <prefix>/lib/pkgconfig/libdssialsacompat.pc
lbajardsilogic@0 71
lbajardsilogic@0 72 Use
lbajardsilogic@0 73 ===
lbajardsilogic@0 74 At its most basic, compiling with gcc and libdssialsacompat consists
lbajardsilogic@0 75 of adding '-I<prefix>/include/dssi -L<prefix>/lib -ldssialsacompat'
lbajardsilogic@0 76 to your gcc command line. Note that the '-I' directive will cause
lbajardsilogic@0 77 code like to following:
lbajardsilogic@0 78
lbajardsilogic@0 79 #include <alsa/asoundlib.h>
lbajardsilogic@0 80 #include <alsa/seq_event.h>
lbajardsilogic@0 81
lbajardsilogic@0 82 to find the libdssialsacompat header files, even though they are not
lbajardsilogic@0 83 installed in the usual location for ALSA headers.
lbajardsilogic@0 84
lbajardsilogic@0 85 libdssialsacompat is easiest to use with autoconf/automake/pkgconfig-
lbajardsilogic@0 86 enabled code. In which case, editing the configure.in or configure.ac
lbajardsilogic@0 87 file and changing:
lbajardsilogic@0 88
lbajardsilogic@0 89 PKG_CHECK_MODULES(ALSA, alsa)
lbajardsilogic@0 90
lbajardsilogic@0 91 to:
lbajardsilogic@0 92
lbajardsilogic@0 93 PKG_CHECK_MODULES(ALSA, alsa, , [PKG_CHECK_MODULES(ALSA, libdssialsacompat)])
lbajardsilogic@0 94
lbajardsilogic@0 95 then doing 'autoreconf', may be all that is needed to get the
lbajardsilogic@0 96 snd_seq_event_t-using code to compile cleanly. Of course, if the
lbajardsilogic@0 97 code uses other ALSA features, libdssialsacompat won't help with
lbajardsilogic@0 98 them....
lbajardsilogic@0 99
lbajardsilogic@0 100 DSSI Installation
lbajardsilogic@0 101 =================
lbajardsilogic@0 102 Installation of DSSI itself (at least as recently as 2005/4/6 CVS)
lbajardsilogic@0 103 must be done by hand, which goes something like this (assuming
lbajardsilogic@0 104 you're running OS X 10.3 and want to install to /usr/local):
lbajardsilogic@0 105
lbajardsilogic@0 106 $ tar xpzf dssi-0.9.tar.gz
lbajardsilogic@0 107 $ cd dssi-0.9
lbajardsilogic@0 108 $ sudo mkdir -p /usr/local/include
lbajardsilogic@0 109 $ sudo cp dssi/dssi.h /usr/local/include/
lbajardsilogic@0 110 $ sed s:.PREFIX.:/usr/local: dssi.pc >dssi.pc.new
lbajardsilogic@0 111 $ sudo mkdir -p /usr/local/lib/pkgconfig
lbajardsilogic@0 112 $ sudo mv dssi.pc.new /usr/local/lib/pkgconfig/dssi.pc
lbajardsilogic@0 113
lbajardsilogic@0 114 (You may stop here if you're not interested in the example plugins.)
lbajardsilogic@0 115
lbajardsilogic@0 116 $ cd examples
lbajardsilogic@0 117 $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
lbajardsilogic@0 118 $ export PKG_CONFIG_PATH
lbajardsilogic@0 119 $ make dssi_osc_send
lbajardsilogic@0 120 $ sudo cp -p dssi_osc_send /usr/local/bin
lbajardsilogic@0 121 $ gcc -Wall -fno-common -O2 `pkg-config libdssialsacompat dssi --cflags` \
lbajardsilogic@0 122 trivial_synth.c -c -o trivial_synth.o
lbajardsilogic@0 123 $ gcc -Wall -fno-common -O2 -c -o message_buffer.o \
lbajardsilogic@0 124 ../message_buffer/message_buffer.c
lbajardsilogic@0 125 $ gcc -bundle -flat_namespace -undefined suppress -o trivial_synth.so \
lbajardsilogic@0 126 trivial_synth.o message_buffer.o \
lbajardsilogic@0 127 `pkg-config libdssialsacompat dssi --libs`
lbajardsilogic@0 128 $ sudo mkdir -p /usr/local/lib/dssi
lbajardsilogic@0 129 $ sudo cp -p trivial_synth.so /usr/local/lib/dssi
lbajardsilogic@0 130
lbajardsilogic@0 131 Building the rest of the DSSI distribution's plugins is left as an
lbajardsilogic@0 132 exercise to the reader. Note that (as of 2005/4/6) jack-dssi-host
lbajardsilogic@0 133 will not build without patching since it uses the ALSA sequencer.
lbajardsilogic@0 134
lbajardsilogic@0 135 What Works (Or Doesn't)
lbajardsilogic@0 136 =======================
lbajardsilogic@0 137 libdssialsacompat 1.0.8a was tested on Mac OS X 10.3.8, using the
lbajardsilogic@0 138 Apple Developer Tools, Gentoo-installed versions of pkgconfig and
lbajardsilogic@0 139 liblo 0.18, hand-installed GTK+ 1.2 and LADSPA SDK, and JackOSX
lbajardsilogic@0 140 0.6.1. Under this configuration, the following are known to work:
lbajardsilogic@0 141
lbajardsilogic@0 142 - ghostess (from the 20050411 release, which includes a clumsy but
lbajardsilogic@0 143 working CoreMIDI driver.) ghostess can be found at:
lbajardsilogic@0 144
lbajardsilogic@0 145 http://home.jps.net/~musound/
lbajardsilogic@0 146
lbajardsilogic@0 147 - trivial_synth.so (DSSI 0.9 release)
lbajardsilogic@0 148
lbajardsilogic@0 149 - fluidsynth-dssi.so and FluidSynth-DSSI_gtk (DSSI 0.9 release,
lbajardsilogic@0 150 using a statically compiled libfluidsynth 1.0.3)
lbajardsilogic@0 151
lbajardsilogic@0 152 - Xsynth-DSSI (CVS as of 2005/4/11)
lbajardsilogic@0 153
lbajardsilogic@0 154 - hexter (CVS as of 2005/4/11, note that sys-ex patch editing isn't
lbajardsilogic@0 155 supported on non-ALSA systems)
lbajardsilogic@0 156
lbajardsilogic@0 157 The following problems are known to exist:
lbajardsilogic@0 158
lbajardsilogic@0 159 - less_trivial_synth.so (DSSI 0.9) plays at the wrong pitch on
lbajardsilogic@0 160 big-endian systems due the little-endian assumption of the
lbajardsilogic@0 161 typedef union fixp in less_trivial_synth.c (line 69). Otherwise
lbajardsilogic@0 162 works fine.
lbajardsilogic@0 163
lbajardsilogic@0 164 - I have not tested any of the DSSI 0.9 Qt GUIs, or
lbajardsilogic@0 165 trivial_sampler.so.
lbajardsilogic@0 166
lbajardsilogic@0 167 - jack-dssi-host (DSSI 0.9) works as an OSC-driven host if you
lbajardsilogic@0 168 comment out all the ALSA seqeuncer code.
lbajardsilogic@0 169