Port of the LADSPA 1.1.1 API for Ada 2012.
- Mono amplifier.
- Stereo amplifier.
- Simple delay line.
I've only tested in Carla at this time.
Currently, this is quite hacky and uses a bunch of System.Address
types to get around some of the problems. I'm not sure how to go about creating a nicer API. The biggest issues are around the array types for the LADSPA.All_Port_Descriptors
whereby I use an enumeration and subtype this for the mono amplifier controls. In C, they just create an enum with all the values in, but then they don't need any type checking so can do whatever they like. In Ada, it's much more difficult. Generics wouldn't solve the problem in quite the right way, i.e. I wouldn't be able to have multiple descriptors working if I used generics as it would constrain the whole package a bit too much.
- Make the API nicer to work with.
- Port the other LADSPA examples.
- Work out why loading all the plugins into Carla crashes Carla, apart from being unstable.
Ada's pragma Restrictions
as implemented by GNAT are partition wide and so, the LADSPA run callbacks cannot be restricted by the compiler.
$ git clone [email protected]:Lucretia/aplug.git
$ cd aplug/build/gnat
$ gprbuild -P amp.gpr -p
You do not need ladspa.h
to use this library, this library implements this header in Ada.
$ cd ~/opt
$ git clone [email protected]:Lucretia/aplug.git
$ export GPR_PROJECT_PATH=$(pwd)/aplug/build/gnat:$GPR_PROJECT_PATH # or use ADA_PROJECT_PATH
$ mkdir ~/src/<my ladspa plugin>
$ cp ladspa/examples/<example>*.ad[sb] ~/src/<my ladspa plugin>
You probably have your own directory layout, copy over the corresponding gpr file and edit that as required.
Ada 2012 compiler.
FSF GNAT 9.2.0
Copyright (C) 2019-2020 by Luke A. Guest
New-style BSD, see LICENCE file in source root directory and at the start of all source files.