Difference between revisions of "LADSPA"

From CBLFS
Jump to navigationJump to search
m (Initial creation. Currently contains the starting template only.)
 
(LADSPA added as a New Package)
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| URL
+
| http://www.ladspa.org/download/ladspa_sdk_1.13.tgz
|-
 
!Download Patch:
 
| URL - This should be a URL beginning with http://svn.cross-lfs.org/svn/repos/patches/. See http://patches.cross-lfs.org/patch-submitter for instructions on submitting patches for CBLFS.
 
 
|}
 
|}
  
 
----
 
----
  
{{Package-Introduction|Brief description of the package you are enlightening us with.  Try to provide a description in your own words. Add a link to the package's homepage for someone unfamiliar with the package to research further.|http://homepage/to/cool/package}}
+
{{Package-Introduction|LADSPA is the "Linux Audio Developer's Simple Programming API," whose goal is to provide a versatile audio plug-in capability similar to VST. It is deliberately designed to be extremely simple. As described on the project web site, "The 'S' in 'LADSPA' is meant seriously." The LADSPA development "framework" consists of just one C header file, plus the development tools you will build here. |http://www.ladspa.org}}
  
 
----
 
----
  
'''<font style="color: green">If there is some reason you are adding a package and are unable to provide a brief description of it's functionality, please do two things.  First, reconsider installing software that you have no idea what it does.  Second, please use this template.  It allows us to identify packages that need introductions without "hunting" through the wiki.</font>'''
+
== Common Build Instructions ==
  
{{Blank-Package-Introduction}}
+
The build system is not autotools based. However, the makefile is so simple that you will probably want to simply edit and run the makefile manually.
  
'''<font style="color: green">Use this template to add notes where ever a note is appropriate.</font>'''
+
Build the package
  
{{Note|ADD SOMETHING NOTEWORTHY}}
+
cd src
 +
edit makefile
 +
    INSTALL_PLUGINS_DIR = ...
 +
    INSTALL_INCLUDE_DIR = ...
 +
    INSTALL_BINARY_DIR = ...
 +
make
  
== Dependencies ==
+
Install the package
  
'''<font style="color: green">If there are no dependencies, omit this section.</font>'''
+
make install
 
+
create multiarch wrappers for all 3 binaries
=== Required ===
 
* [[Required Dependency #1]]
 
* [[Required Dependency #2]]
 
 
 
=== Recommended ===
 
* [[Recommended Dependency #1]]
 
* [[Recommended Dependency #2]]
 
 
 
=== Optional ===
 
* [[Optional Dependency #1]]
 
* [[Optional Dependency #2]]
 
 
 
=== Runtime ===
 
* [[Runtime Dependency #1]]
 
* [[Runtime Dependency #2]]
 
  
== Creating the <NAME> User & Group ==
+
Here is a script that automates this process, while also adding DESTDIR capability, which is missing in the original makefile:
  
'''<font style="color: green">This is an optional section. If your package requires a user/group add this section to the page then append the table on the [[System User and Groups]] page. Below is an example. If there is no need to create a user or group, omit this section.</font>'''
+
cat > build.sh << "EOF"
 +
: ${CLFS_LIB32:="lib"}
 +
: ${CLFS_LIBN32:="lib32"}
 +
: ${CLFS_LIB64:="lib64"}
 +
: ${CLFS_LIB:="lib"}
 +
 +
eval CLFS_LIB='$'CLFS_LIB${USE_ARCH} &&
 +
eval BUILD='$'BUILD${USE_ARCH} &&
 +
eval LD_BUILD='$'LD_BUILD${USE_ARCH} &&
 +
 +
pushd src &&
 +
 +
if [ -e makefile-original ]; then
 +
 +
    make clean
 +
    mv -f -v makefile-original makefile
 +
 +
fi
 +
 +
CLFS_LIB=${CLFS_LIB} \
 +
sed -i-original \
 +
    -e 's/$(INSTALL_PLUGINS_DIR)/$(DESTDIR)$(INSTALL_PLUGINS_DIR)/g' \
 +
    -e 's/$(INSTALL_INCLUDE_DIR)/$(DESTDIR)$(INSTALL_INCLUDE_DIR)/g' \
 +
    -e 's/$(INSTALL_BINARY_DIR)/$(DESTDIR)$(INSTALL_BINARY_DIR)/g' \
 +
    -e "s|/usr/local|/usr|g" \
 +
    -e "s|/lib/|/${CLFS_LIB}/|g" \
 +
    makefile &&
 +
 +
make \
 +
    DESTDIR=${DESTDIR} \
 +
    CC="gcc ${BUILD}" \
 +
    CPP="g++ ${BUILD}" \
 +
    LD="ld ${LD_BUILD}" &&
 +
 +
make install &&
 +
 +
if [ "$USE_ARCH" != "" ]; then
 +
 +
    mv -v ${DESTDIR}/usr/bin/analyseplugin ${DESTDIR}/usr/bin/analyseplugin-${USE_ARCH} &&
 +
    mv -v ${DESTDIR}/usr/bin/applyplugin ${DESTDIR}/usr/bin/applyplugin-${USE_ARCH} &&
 +
    mv -v ${DESTDIR}/usr/bin/listplugins ${DESTDIR}/usr/bin/listplugins-${USE_ARCH}
 +
 +
fi
 +
 +
if [ "${USE_ARCH}" == "64" ]; then
 +
 +
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/analyseplugin &&
 +
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/applyplugin &&
 +
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/listplugins
 +
 +
fi
 +
 +
popd
 +
EOF
 +
 +
  chmod +x build.sh
  
groupadd -g ''[id]'' ''[name]'' &&
 
useradd -c "''[desc]''" -d /dev/null \
 
        -u ''[id]'' -g ''[name]'' -s /bin/false ''[name]''
 
 
== Configuration Information ==
 
 
'''<font style="color: green">This section can contain options that you may want to include when configuring the package, but should be left as a choice.  However, don't just reproduce the output of ./configure --help; be judicious in your selection.  If there are no configuration options that warrant discussion, omit this section.</font>'''
 
 
{|
 
|-
 
|''--enable-someoption:'' brief description of the non-default functionality provided by someoption.
 
|-
 
|''--disable-someotheroption:'' brief description of the default functionality removed by disabling someotheroption.
 
|-
 
|''--with-somepackage=DIR:''
 
|}
 
 
'''<font style="color: green">Generally speaking, CBLFS packages are installed in the /usr hierarchy although there are some exceptions.  Even if you passed --prefix=/home/fubar/stuff/CBLFS/is/really/awesome/some/package/version/5.0/hope/this/works to the configure script, please use --prefix=/usr for the wiki.  Thanks.  Also, the instructions presume that the source package has been retrieved to the local machine, unpacked, and you have cd'd to the top of the source tree.  Generally, we don't need those instructions unless there is something very unique about the process for the package you are adding.</font>'''
 
  
 
== Non-Multilib ==
 
== Non-Multilib ==
  
Compile the package:
+
Compile and install the package:
  
  ./configure --prefix=/usr &&
+
  ./build.sh
make
 
 
 
Install the package:
 
 
 
make install
 
  
 
== Multilib ==
 
== Multilib ==
  
'''<font style="color: green">If appropriate, add this line and only include the 64-bit instructions:</font>'''
 
 
'''''This package does not provide any libraries or other ABI-specific information so only one installation is required.'''''
 
 
'''<font style="color: green">If package documentation is not installed by the 'make install' step, only include the commands to install the documentation in the 64-bit section.</font>'''
 
  
 
=== 32Bit ===
 
=== 32Bit ===
  
Compile the package:
+
Compile and install the package:
 
 
CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
 
make
 
  
Install the package:
+
  USE_ARCH=32 ./build.sh
 
 
  make install
 
  
 
=== N32 ===
 
=== N32 ===
  
Compile the package:
+
Compile and install the package:
  
CC="gcc ${BUILDN32}" ./configure --prefix=/usr \
+
To Do: (Please Contribute. It is intended that "USE_ARCH=N32 ./build.sh" should work.)
    --libdir=/usr/lib32 &&
 
make
 
 
 
Install the package:
 
 
 
make install
 
  
 
=== 64Bit ===
 
=== 64Bit ===
  
Compile the package:
+
Compile and install the package:
 
 
CC="gcc ${BUILD64}" ./configure --prefix=/usr \
 
    --libdir=/usr/lib64 &&
 
make
 
  
Install the package:
+
USE_ARCH=64 ./build.sh
  
make install
+
== Configuring ==
  
== Configuring ==
+
An environment variable, LADSPA_PATH, is required.
  
'''<font style="color: green">This section should contain information about the post-installation configuration of a package, bootscript(s), other files, creating directories. Omit this section if there is no post-installation configuration required.</font>'''
+
cat > /etc/profile.d/50-ladspa.sh << "EOF"
 +
export LADSPA_PATH=/usr/lib/ladspa:/usr/lib32/ladspa:/usr/lib64/ladspa
 +
EOF
  
 
== Contents ==
 
== Contents ==
 
'''<font style="color: green">You can find an application [[User:Weibullguy|here]] that can be used to make creating this table reasonably pain free.</font>'''
 
  
 
{| style="text-align: left;"
 
{| style="text-align: left;"
 
|-valign="top"
 
|-valign="top"
 
!Installed Directories:
 
!Installed Directories:
|/path/to/dir
+
|/usr/lib{,32,64}/ladspa
 
|-valign="top"
 
|-valign="top"
 
!Installed Programs:
 
!Installed Programs:
|Program 1, Program 2
+
|analyseplugin, applyplugin, listplugins
 
|-valign="top"
 
|-valign="top"
 
!Installed Libraries:
 
!Installed Libraries:
|library1.{a,so}, library2.{a,so}
+
|amp.so, delay.so, filter.so, noise.so, sine.so
 
|}
 
|}
  
Line 143: Line 142:
 
{| style="text-align: left;"
 
{| style="text-align: left;"
 
|-valign="top"
 
|-valign="top"
!Program 1
+
!analyseplugin, applyplugin, listplugins
|is a program that converts pennies to dollars.
+
|are tools for inspecting and testing ladspa plug-ins.
 
|-valign="top"
 
|-valign="top"
!Program 2
+
!amp.so, delay.so, filter.so, noise.so, sine.so
|is a program that converts dollars to pennies.
+
|are sample plug-ins
 
|-valign="top"
 
|-valign="top"
!library1.{so,a}
+
! /usr/include/ladspa.h
|is a library that contains functions necessary to convert from dollars to pennies and vice versa.
+
| is the API, in its entirety. The comments in this (well-commented) header file comprise the API documentation.
 
|}
 
|}
  
[[Category:<PUT APPROPRIATE CATEGORY HERE>]] '''<font style="color: green">See http://cblfs.cross-lfs.org/index.php/Special:Categories for a list of categories.  Likely your package will fit in one of the existing categories.  If not, and think long and hard about it, create a new category.'''
+
== Tools for Generating Plugins ==
 +
 
 +
* [[csLADSPA]]
 +
* [[Faust]]
 +
* [[GDAM]]
 +
 
 +
== Plugin Libraries ==
 +
 
 +
* [[swh-plugins]]
 +
* [[alienwah]]
 +
* [[delayorama-gui]]
 +
* [[harmonic-gui]]
 +
* [[jack-demolition]]
 +
* [[pulsor]]
 +
* [[Blop]]
 +
* [[CAPS]]
 +
* [[CMT]]
 +
* [[AMB]]
 +
* [[MCP]]
 +
* [[REV]]
 +
* [[VCO]]
 +
* [[FIL]]
 +
* [[VCF]]
 +
* [[TAP]]
 +
* [[Vocoder-ladspa]]
 +
* [[VLevel]]  
 +
 
 +
== Hosts ==
 +
 
 +
* [[AlsaModularSynth]]
 +
* [[Ardour]]
 +
* [[Audacity]]
 +
* [[Csound]]
 +
* [[Ecasound]]
 +
* [[GDAM]]
 +
* [[GLAME]]
 +
* [[GNU-Sound]]
 +
* [[GStreamer]]
 +
* [[MusE]]
 +
* [[Mustajuuri]]
 +
* [[Pd]]
 +
* [[ReZound]]
 +
* [[Rosegarden]]
 +
* [[Snd]]
 +
* [[SpiralSynthModular]]
 +
* [[Sweep]]
 +
* [[TerminatorX]]
 +
* [[Wired]]
 +
 
 +
[[Category:Programming]]

Latest revision as of 22:38, 20 July 2009

Download Source: http://www.ladspa.org/download/ladspa_sdk_1.13.tgz

Introduction to LADSPA

LADSPA is the "Linux Audio Developer's Simple Programming API," whose goal is to provide a versatile audio plug-in capability similar to VST. It is deliberately designed to be extremely simple. As described on the project web site, "The 'S' in 'LADSPA' is meant seriously." The LADSPA development "framework" consists of just one C header file, plus the development tools you will build here.

Project Homepage: http://www.ladspa.org


Common Build Instructions

The build system is not autotools based. However, the makefile is so simple that you will probably want to simply edit and run the makefile manually.

Build the package

cd src
edit makefile
    INSTALL_PLUGINS_DIR = ...
    INSTALL_INCLUDE_DIR = ...
    INSTALL_BINARY_DIR = ...
make

Install the package

make install
create multiarch wrappers for all 3 binaries

Here is a script that automates this process, while also adding DESTDIR capability, which is missing in the original makefile:

cat > build.sh << "EOF"
: ${CLFS_LIB32:="lib"}
: ${CLFS_LIBN32:="lib32"}
: ${CLFS_LIB64:="lib64"}
: ${CLFS_LIB:="lib"}

eval CLFS_LIB='$'CLFS_LIB${USE_ARCH} &&
eval BUILD='$'BUILD${USE_ARCH} &&
eval LD_BUILD='$'LD_BUILD${USE_ARCH} &&

pushd src &&

if [ -e makefile-original ]; then

    make clean
    mv -f -v makefile-original makefile

fi

CLFS_LIB=${CLFS_LIB} \
sed -i-original \
    -e 's/$(INSTALL_PLUGINS_DIR)/$(DESTDIR)$(INSTALL_PLUGINS_DIR)/g' \
    -e 's/$(INSTALL_INCLUDE_DIR)/$(DESTDIR)$(INSTALL_INCLUDE_DIR)/g' \
    -e 's/$(INSTALL_BINARY_DIR)/$(DESTDIR)$(INSTALL_BINARY_DIR)/g' \
    -e "s|/usr/local|/usr|g" \
    -e "s|/lib/|/${CLFS_LIB}/|g" \
    makefile &&

make \
    DESTDIR=${DESTDIR} \
    CC="gcc ${BUILD}" \
    CPP="g++ ${BUILD}" \
    LD="ld ${LD_BUILD}" &&

make install &&

if [ "$USE_ARCH" != "" ]; then

    mv -v ${DESTDIR}/usr/bin/analyseplugin ${DESTDIR}/usr/bin/analyseplugin-${USE_ARCH} &&
    mv -v ${DESTDIR}/usr/bin/applyplugin ${DESTDIR}/usr/bin/applyplugin-${USE_ARCH} &&
    mv -v ${DESTDIR}/usr/bin/listplugins ${DESTDIR}/usr/bin/listplugins-${USE_ARCH}

fi

if [ "${USE_ARCH}" == "64" ]; then

    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/analyseplugin &&
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/applyplugin &&
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/listplugins

fi

popd
EOF

chmod +x build.sh


Non-Multilib

Compile and install the package:

./build.sh

Multilib

32Bit

Compile and install the package:

USE_ARCH=32 ./build.sh

N32

Compile and install the package:

To Do: (Please Contribute. It is intended that "USE_ARCH=N32 ./build.sh" should work.)

64Bit

Compile and install the package:

USE_ARCH=64 ./build.sh

Configuring

An environment variable, LADSPA_PATH, is required.

cat > /etc/profile.d/50-ladspa.sh << "EOF"
export LADSPA_PATH=/usr/lib/ladspa:/usr/lib32/ladspa:/usr/lib64/ladspa
EOF

Contents

Installed Directories: /usr/lib{,32,64}/ladspa
Installed Programs: analyseplugin, applyplugin, listplugins
Installed Libraries: amp.so, delay.so, filter.so, noise.so, sine.so

Short Descriptions

analyseplugin, applyplugin, listplugins are tools for inspecting and testing ladspa plug-ins.
amp.so, delay.so, filter.so, noise.so, sine.so are sample plug-ins
/usr/include/ladspa.h is the API, in its entirety. The comments in this (well-commented) header file comprise the API documentation.

Tools for Generating Plugins

Plugin Libraries

Hosts