pull/146/merge
Filipe Coelho 2021-01-04 11:37:15 +01:00 committed by GitHub
commit 92ee1db45c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 3528 additions and 113 deletions

View File

@ -1,51 +1,61 @@
# -*- mode: org -*-
# NON
* Non-things build instructions
## Non-things build instructions
This repository contains all of the non-* software.
** Getting NTK
### Getting NTK
If you just cloned the non repository or just executed git pull, then
you should also run
git submodule update --init
```
git submodule update --init
```
to pull down the latest NTK code required by Non. Git does *not* do
this automatically.
** Building NTK
### Building NTK
If you don't have NTK installed system-wide (which isn't very likely
yet) you *MUST* begin the build process by typing:
cd lib/ntk
./waf configure
./waf
```
cd lib/ntk
./waf configure
./waf
```
Once NTK has been built you must install it system-wide before
attempting to build the non-* programs.
To install NTK type:
su -c './waf install'
```
su -c './waf install'
```
** Build all projects
### Build all projects
Typing:
./waf configure
./waf
su -c './waf install'
```
./waf configure
./waf
su -c './waf install'
```
from the base of the checkout of the Non git repository will build and
install all of the non-* programs together.
** Build a single project
### Build a single project
Typing:
./waf configure --project=[timline|sequencer|mixer|session-manager]
./waf
su -c './waf install'
```
./waf configure --project=[timline|sequencer|mixer|session-manager]
./waf
su -c './waf install'
```

View File

@ -927,6 +927,7 @@ Chain::buffer_size ( nframes_t nframes )
configure_ports();
Module::set_buffer_size ( nframes );
for ( int i = 0; i < modules(); ++i )
{
Module *m = module(i);

642
mixer/src/LV2_RDF.hpp Normal file
View File

@ -0,0 +1,642 @@
/*
* Custom types to store LV2 information
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/
#ifndef LV2_RDF_HPP_INCLUDED
#define LV2_RDF_HPP_INCLUDED
#include <stdint.h>
#include <stdlib.h>
// Base Types
typedef const char* LV2_URI;
typedef uint32_t LV2_Property;
// Port Midi Map Types
#define LV2_PORT_MIDI_MAP_CC 1
#define LV2_PORT_MIDI_MAP_NRPN 2
#define LV2_IS_PORT_MIDI_MAP_CC(x) ((x) == LV2_PORT_MIDI_MAP_CC)
#define LV2_IS_PORT_MIDI_MAP_NRPN(x) ((x) == LV2_PORT_MIDI_MAP_NRPN)
// Port Point Hints
#define LV2_PORT_POINT_DEFAULT 0x1
#define LV2_PORT_POINT_MINIMUM 0x2
#define LV2_PORT_POINT_MAXIMUM 0x4
#define LV2_HAVE_DEFAULT_PORT_POINT(x) ((x) & LV2_PORT_POINT_DEFAULT)
#define LV2_HAVE_MINIMUM_PORT_POINT(x) ((x) & LV2_PORT_POINT_MINIMUM)
#define LV2_HAVE_MAXIMUM_PORT_POINT(x) ((x) & LV2_PORT_POINT_MAXIMUM)
// Port Unit Hints
#define LV2_PORT_UNIT_NAME 0x1
#define LV2_PORT_UNIT_RENDER 0x2
#define LV2_PORT_UNIT_SYMBOL 0x4
#define LV2_PORT_UNIT_UNIT 0x8
#define LV2_HAVE_PORT_UNIT_NAME(x) ((x) & LV2_PORT_UNIT_NAME)
#define LV2_HAVE_PORT_UNIT_RENDER(x) ((x) & LV2_PORT_UNIT_RENDER)
#define LV2_HAVE_PORT_UNIT_SYMBOL(x) ((x) & LV2_PORT_UNIT_SYMBOL)
#define LV2_HAVE_PORT_UNIT_UNIT(x) ((x) & LV2_PORT_UNIT_UNIT)
// Port Unit Unit
#define LV2_PORT_UNIT_BAR 1
#define LV2_PORT_UNIT_BEAT 2
#define LV2_PORT_UNIT_BPM 3
#define LV2_PORT_UNIT_CENT 4
#define LV2_PORT_UNIT_CM 5
#define LV2_PORT_UNIT_COEF 6
#define LV2_PORT_UNIT_DB 7
#define LV2_PORT_UNIT_DEGREE 8
#define LV2_PORT_UNIT_FRAME 9
#define LV2_PORT_UNIT_HZ 10
#define LV2_PORT_UNIT_INCH 11
#define LV2_PORT_UNIT_KHZ 12
#define LV2_PORT_UNIT_KM 13
#define LV2_PORT_UNIT_M 14
#define LV2_PORT_UNIT_MHZ 15
#define LV2_PORT_UNIT_MIDINOTE 16
#define LV2_PORT_UNIT_MILE 17
#define LV2_PORT_UNIT_MIN 18
#define LV2_PORT_UNIT_MM 19
#define LV2_PORT_UNIT_MS 20
#define LV2_PORT_UNIT_OCT 21
#define LV2_PORT_UNIT_PC 22
#define LV2_PORT_UNIT_S 23
#define LV2_PORT_UNIT_SEMITONE 24
#define LV2_IS_PORT_UNIT_BAR(x) ((x) == LV2_PORT_UNIT_BAR)
#define LV2_IS_PORT_UNIT_BEAT(x) ((x) == LV2_PORT_UNIT_BEAT)
#define LV2_IS_PORT_UNIT_BPM(x) ((x) == LV2_PORT_UNIT_BPM)
#define LV2_IS_PORT_UNIT_CENT(x) ((x) == LV2_PORT_UNIT_CENT)
#define LV2_IS_PORT_UNIT_CM(x) ((x) == LV2_PORT_UNIT_CM)
#define LV2_IS_PORT_UNIT_COEF(x) ((x) == LV2_PORT_UNIT_COEF)
#define LV2_IS_PORT_UNIT_DB(x) ((x) == LV2_PORT_UNIT_DB)
#define LV2_IS_PORT_UNIT_DEGREE(x) ((x) == LV2_PORT_UNIT_DEGREE)
#define LV2_IS_PORT_UNIT_FRAME(x) ((x) == LV2_PORT_UNIT_FRAME)
#define LV2_IS_PORT_UNIT_HZ(x) ((x) == LV2_PORT_UNIT_HZ)
#define LV2_IS_PORT_UNIT_INCH(x) ((x) == LV2_PORT_UNIT_INCH)
#define LV2_IS_PORT_UNIT_KHZ(x) ((x) == LV2_PORT_UNIT_KHZ)
#define LV2_IS_PORT_UNIT_KM(x) ((x) == LV2_PORT_UNIT_KM)
#define LV2_IS_PORT_UNIT_M(x) ((x) == LV2_PORT_UNIT_M)
#define LV2_IS_PORT_UNIT_MHZ(x) ((x) == LV2_PORT_UNIT_MHZ)
#define LV2_IS_PORT_UNIT_MIDINOTE(x) ((x) == LV2_PORT_UNIT_MIDINOTE)
#define LV2_IS_PORT_UNIT_MILE(x) ((x) == LV2_PORT_UNIT_MILE)
#define LV2_IS_PORT_UNIT_MIN(x) ((x) == LV2_PORT_UNIT_MIN)
#define LV2_IS_PORT_UNIT_MM(x) ((x) == LV2_PORT_UNIT_MM)
#define LV2_IS_PORT_UNIT_MS(x) ((x) == LV2_PORT_UNIT_MS)
#define LV2_IS_PORT_UNIT_OCT(x) ((x) == LV2_PORT_UNIT_OCT)
#define LV2_IS_PORT_UNIT_PC(x) ((x) == LV2_PORT_UNIT_PC)
#define LV2_IS_PORT_UNIT_S(x) ((x) == LV2_PORT_UNIT_S)
#define LV2_IS_PORT_UNIT_SEMITONE(x) ((x) == LV2_PORT_UNIT_SEMITONE)
// Port Types
#define LV2_PORT_INPUT 0x001
#define LV2_PORT_OUTPUT 0x002
#define LV2_PORT_CONTROL 0x004
#define LV2_PORT_AUDIO 0x008
#define LV2_PORT_CV 0x010
#define LV2_PORT_ATOM 0x020
#define LV2_PORT_ATOM_SEQUENCE (0x040 | LV2_PORT_ATOM)
#define LV2_PORT_EVENT 0x080
#define LV2_PORT_MIDI_LL 0x100
// Port Data Types
#define LV2_PORT_DATA_MIDI_EVENT 0x1000
#define LV2_PORT_DATA_OSC_EVENT 0x2000
#define LV2_PORT_DATA_PATCH_MESSAGE 0x4000
#define LV2_PORT_DATA_TIME_POSITION 0x8000
#define LV2_IS_PORT_INPUT(x) ((x) & LV2_PORT_INPUT)
#define LV2_IS_PORT_OUTPUT(x) ((x) & LV2_PORT_OUTPUT)
#define LV2_IS_PORT_CONTROL(x) ((x) & LV2_PORT_CONTROL)
#define LV2_IS_PORT_AUDIO(x) ((x) & LV2_PORT_AUDIO)
#define LV2_IS_PORT_CV(x) ((x) & LV2_PORT_CV)
#define LV2_IS_PORT_ATOM_SEQUENCE(x) ((x) & LV2_PORT_ATOM_SEQUENCE)
#define LV2_IS_PORT_EVENT(x) ((x) & LV2_PORT_EVENT)
#define LV2_IS_PORT_MIDI_LL(x) ((x) & LV2_PORT_MIDI_LL)
#define LV2_PORT_SUPPORTS_MIDI_EVENT(x) ((x) & LV2_PORT_DATA_MIDI_EVENT)
#define LV2_PORT_SUPPORTS_OSC_EVENT(x) ((x) & LV2_PORT_DATA_OSC_EVENT)
#define LV2_PORT_SUPPORTS_PATCH_MESSAGE(x) ((x) & LV2_PORT_DATA_PATCH_MESSAGE)
#define LV2_PORT_SUPPORTS_TIME_POSITION(x) ((x) & LV2_PORT_DATA_TIME_POSITION)
// Port Properties
#define LV2_PORT_OPTIONAL 0x0001
#define LV2_PORT_ENUMERATION 0x0002
#define LV2_PORT_INTEGER 0x0004
#define LV2_PORT_SAMPLE_RATE 0x0008
#define LV2_PORT_TOGGLED 0x0010
#define LV2_PORT_CAUSES_ARTIFACTS 0x0020
#define LV2_PORT_CONTINUOUS_CV 0x0040
#define LV2_PORT_DISCRETE_CV 0x0080
#define LV2_PORT_EXPENSIVE 0x0100
#define LV2_PORT_STRICT_BOUNDS 0x0200
#define LV2_PORT_LOGARITHMIC 0x0400
#define LV2_PORT_NOT_AUTOMATIC 0x0800
#define LV2_PORT_NOT_ON_GUI 0x1000
#define LV2_PORT_TRIGGER 0x2000
#define LV2_PORT_NON_AUTOMABLE 0x4000
#define LV2_IS_PORT_OPTIONAL(x) ((x) & LV2_PORT_OPTIONAL)
#define LV2_IS_PORT_ENUMERATION(x) ((x) & LV2_PORT_ENUMERATION)
#define LV2_IS_PORT_INTEGER(x) ((x) & LV2_PORT_INTEGER)
#define LV2_IS_PORT_SAMPLE_RATE(x) ((x) & LV2_PORT_SAMPLE_RATE)
#define LV2_IS_PORT_TOGGLED(x) ((x) & LV2_PORT_TOGGLED)
#define LV2_IS_PORT_CAUSES_ARTIFACTS(x) ((x) & LV2_PORT_CAUSES_ARTIFACTS)
#define LV2_IS_PORT_CONTINUOUS_CV(x) ((x) & LV2_PORT_CONTINUOUS_CV)
#define LV2_IS_PORT_DISCRETE_CV(x) ((x) & LV2_PORT_DISCRETE_CV)
#define LV2_IS_PORT_EXPENSIVE(x) ((x) & LV2_PORT_EXPENSIVE)
#define LV2_IS_PORT_STRICT_BOUNDS(x) ((x) & LV2_PORT_STRICT_BOUNDS)
#define LV2_IS_PORT_LOGARITHMIC(x) ((x) & LV2_PORT_LOGARITHMIC)
#define LV2_IS_PORT_NOT_AUTOMATIC(x) ((x) & LV2_PORT_NOT_AUTOMATIC)
#define LV2_IS_PORT_NOT_ON_GUI(x) ((x) & LV2_PORT_NOT_ON_GUI)
#define LV2_IS_PORT_TRIGGER(x) ((x) & LV2_PORT_TRIGGER)
#define LV2_IS_PORT_NON_AUTOMABLE(x) ((x) & LV2_PORT_NON_AUTOMABLE)
// Port Designation
#define LV2_PORT_DESIGNATION_CONTROL 1
#define LV2_PORT_DESIGNATION_FREEWHEELING 2
#define LV2_PORT_DESIGNATION_LATENCY 3
#define LV2_PORT_DESIGNATION_SAMPLE_RATE 4
#define LV2_PORT_DESIGNATION_TIME_BAR 5
#define LV2_PORT_DESIGNATION_TIME_BAR_BEAT 6
#define LV2_PORT_DESIGNATION_TIME_BEAT 7
#define LV2_PORT_DESIGNATION_TIME_BEAT_UNIT 8
#define LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR 9
#define LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE 10
#define LV2_PORT_DESIGNATION_TIME_FRAME 11
#define LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND 12
#define LV2_PORT_DESIGNATION_TIME_SPEED 13
#define LV2_PORT_DESIGNATION_TIME_TICKS_PER_BEAT 14
#define LV2_IS_PORT_DESIGNATION_CONTROL(x) ((x) == LV2_PORT_DESIGNATION_CONTROL)
#define LV2_IS_PORT_DESIGNATION_FREEWHEELING(x) ((x) == LV2_PORT_DESIGNATION_FREEWHEELING)
#define LV2_IS_PORT_DESIGNATION_LATENCY(x) ((x) == LV2_PORT_DESIGNATION_LATENCY)
#define LV2_IS_PORT_DESIGNATION_SAMPLE_RATE(x) ((x) == LV2_PORT_DESIGNATION_SAMPLE_RATE)
#define LV2_IS_PORT_DESIGNATION_TIME_BAR(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR)
#define LV2_IS_PORT_DESIGNATION_TIME_BAR_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR_BEAT)
#define LV2_IS_PORT_DESIGNATION_TIME_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT)
#define LV2_IS_PORT_DESIGNATION_TIME_BEAT_UNIT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT_UNIT)
#define LV2_IS_PORT_DESIGNATION_TIME_BEATS_PER_BAR(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR)
#define LV2_IS_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE)
#define LV2_IS_PORT_DESIGNATION_TIME_FRAME(x) ((x) == LV2_PORT_DESIGNATION_TIME_FRAME)
#define LV2_IS_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND(x) ((x) == LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND)
#define LV2_IS_PORT_DESIGNATION_TIME_SPEED(x) ((x) == LV2_PORT_DESIGNATION_TIME_SPEED)
#define LV2_IS_PORT_DESIGNATION_TIME_TICKS_PER_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_TICKS_PER_BEAT)
#define LV2_IS_PORT_DESIGNATION_TIME(x) ((x) >= LV2_PORT_DESIGNATION_TIME_BAR && (x) <= LV2_PORT_DESIGNATION_TIME_TICKS_PER_BEAT)
// Feature Types
#define LV2_FEATURE_OPTIONAL 1
#define LV2_FEATURE_REQUIRED 2
#define LV2_IS_FEATURE_OPTIONAL(x) ((x) == LV2_FEATURE_OPTIONAL)
#define LV2_IS_FEATURE_REQUIRED(x) ((x) == LV2_FEATURE_REQUIRED)
// UI Types
#define LV2_UI_GTK2 1
#define LV2_UI_GTK3 2
#define LV2_UI_QT4 3
#define LV2_UI_QT5 4
#define LV2_UI_COCOA 5
#define LV2_UI_WINDOWS 6
#define LV2_UI_X11 7
#define LV2_UI_EXTERNAL 8
#define LV2_UI_OLD_EXTERNAL 9
#define LV2_IS_UI_GTK2(x) ((x) == LV2_UI_GTK2)
#define LV2_IS_UI_GTK3(x) ((x) == LV2_UI_GTK3)
#define LV2_IS_UI_QT4(x) ((x) == LV2_UI_QT4)
#define LV2_IS_UI_QT5(x) ((x) == LV2_UI_QT5)
#define LV2_IS_UI_COCOA(x) ((x) == LV2_UI_COCOA)
#define LV2_IS_UI_WINDOWS(x) ((x) == LV2_UI_WINDOWS)
#define LV2_IS_UI_X11(x) ((x) == LV2_UI_X11)
#define LV2_IS_UI_EXTERNAL(x) ((x) == LV2_UI_EXTERNAL)
#define LV2_IS_UI_OLD_EXTERNAL(x) ((x) == LV2_UI_OLD_EXTERNAL)
// Plugin Types
#define LV2_PLUGIN_DELAY 0x000001
#define LV2_PLUGIN_REVERB 0x000002
#define LV2_PLUGIN_SIMULATOR 0x000004
#define LV2_PLUGIN_DISTORTION 0x000008
#define LV2_PLUGIN_WAVESHAPER 0x000010
#define LV2_PLUGIN_DYNAMICS 0x000020
#define LV2_PLUGIN_AMPLIFIER 0x000040
#define LV2_PLUGIN_COMPRESSOR 0x000080
#define LV2_PLUGIN_ENVELOPE 0x000100
#define LV2_PLUGIN_EXPANDER 0x000200
#define LV2_PLUGIN_GATE 0x000400
#define LV2_PLUGIN_LIMITER 0x000800
#define LV2_PLUGIN_EQ 0x001000
#define LV2_PLUGIN_MULTI_EQ 0x002000
#define LV2_PLUGIN_PARA_EQ 0x004000
#define LV2_PLUGIN_FILTER 0x008000
#define LV2_PLUGIN_ALLPASS 0x010000
#define LV2_PLUGIN_BANDPASS 0x020000
#define LV2_PLUGIN_COMB 0x040000
#define LV2_PLUGIN_HIGHPASS 0x080000
#define LV2_PLUGIN_LOWPASS 0x100000
#define LV2_PLUGIN_GENERATOR 0x000001
#define LV2_PLUGIN_CONSTANT 0x000002
#define LV2_PLUGIN_INSTRUMENT 0x000004
#define LV2_PLUGIN_OSCILLATOR 0x000008
#define LV2_PLUGIN_MODULATOR 0x000010
#define LV2_PLUGIN_CHORUS 0x000020
#define LV2_PLUGIN_FLANGER 0x000040
#define LV2_PLUGIN_PHASER 0x000080
#define LV2_PLUGIN_SPATIAL 0x000100
#define LV2_PLUGIN_SPECTRAL 0x000200
#define LV2_PLUGIN_PITCH 0x000400
#define LV2_PLUGIN_UTILITY 0x000800
#define LV2_PLUGIN_ANALYSER 0x001000
#define LV2_PLUGIN_CONVERTER 0x002000
#define LV2_PLUGIN_FUNCTION 0x008000
#define LV2_PLUGIN_MIXER 0x010000
#define LV2_GROUP_DELAY (LV2_PLUGIN_DELAY|LV2_PLUGIN_REVERB)
#define LV2_GROUP_DISTORTION (LV2_PLUGIN_DISTORTION|LV2_PLUGIN_WAVESHAPER)
#define LV2_GROUP_DYNAMICS (LV2_PLUGIN_DYNAMICS|LV2_PLUGIN_AMPLIFIER|LV2_PLUGIN_COMPRESSOR|LV2_PLUGIN_ENVELOPE|LV2_PLUGIN_EXPANDER|LV2_PLUGIN_GATE|LV2_PLUGIN_LIMITER)
#define LV2_GROUP_EQ (LV2_PLUGIN_EQ|LV2_PLUGIN_MULTI_EQ|LV2_PLUGIN_PARA_EQ)
#define LV2_GROUP_FILTER (LV2_PLUGIN_FILTER|LV2_PLUGIN_ALLPASS|LV2_PLUGIN_BANDPASS|LV2_PLUGIN_COMB|LV2_GROUP_EQ|LV2_PLUGIN_HIGHPASS|LV2_PLUGIN_LOWPASS)
#define LV2_GROUP_GENERATOR (LV2_PLUGIN_GENERATOR|LV2_PLUGIN_CONSTANT|LV2_PLUGIN_INSTRUMENT|LV2_PLUGIN_OSCILLATOR)
#define LV2_GROUP_MODULATOR (LV2_PLUGIN_MODULATOR|LV2_PLUGIN_CHORUS|LV2_PLUGIN_FLANGER|LV2_PLUGIN_PHASER)
#define LV2_GROUP_REVERB (LV2_PLUGIN_REVERB)
#define LV2_GROUP_SIMULATOR (LV2_PLUGIN_SIMULATOR|LV2_PLUGIN_REVERB)
#define LV2_GROUP_SPATIAL (LV2_PLUGIN_SPATIAL)
#define LV2_GROUP_SPECTRAL (LV2_PLUGIN_SPECTRAL|LV2_PLUGIN_PITCH)
#define LV2_GROUP_UTILITY (LV2_PLUGIN_UTILITY|LV2_PLUGIN_ANALYSER|LV2_PLUGIN_CONVERTER|LV2_PLUGIN_FUNCTION|LV2_PLUGIN_MIXER)
#define LV2_IS_DELAY(x, y) ((x) & LV2_GROUP_DELAY)
#define LV2_IS_DISTORTION(x, y) ((x) & LV2_GROUP_DISTORTION)
#define LV2_IS_DYNAMICS(x, y) ((x) & LV2_GROUP_DYNAMICS)
#define LV2_IS_EQ(x, y) ((x) & LV2_GROUP_EQ)
#define LV2_IS_FILTER(x, y) ((x) & LV2_GROUP_FILTER)
#define LV2_IS_GENERATOR(x, y) ((y) & LV2_GROUP_GENERATOR)
#define LV2_IS_INSTRUMENT(x, y) ((y) & LV2_PLUGIN_INSTRUMENT)
#define LV2_IS_MODULATOR(x, y) ((y) & LV2_GROUP_MODULATOR)
#define LV2_IS_REVERB(x, y) ((x) & LV2_GROUP_REVERB)
#define LV2_IS_SIMULATOR(x, y) ((x) & LV2_GROUP_SIMULATOR)
#define LV2_IS_SPATIAL(x, y) ((y) & LV2_GROUP_SPATIAL)
#define LV2_IS_SPECTRAL(x, y) ((y) & LV2_GROUP_SPECTRAL)
#define LV2_IS_UTILITY(x, y) ((y) & LV2_GROUP_UTILITY)
// Port Midi Map
struct LV2_RDF_PortMidiMap {
LV2_Property Type;
uint32_t Number;
LV2_RDF_PortMidiMap()
: Type(0),
Number(0) {}
};
// Port Points
struct LV2_RDF_PortPoints {
LV2_Property Hints;
float Default;
float Minimum;
float Maximum;
LV2_RDF_PortPoints()
: Hints(0x0),
Default(0.0f),
Minimum(0.0f),
Maximum(1.0f) {}
};
// Port Unit
struct LV2_RDF_PortUnit {
LV2_Property Hints;
const char* Name;
const char* Render;
const char* Symbol;
LV2_Property Unit;
LV2_RDF_PortUnit()
: Hints(0x0),
Name(NULL),
Render(NULL),
Symbol(NULL),
Unit(0) {}
~LV2_RDF_PortUnit()
{
if (Name != NULL)
{
::free((void*)Name);
Name = NULL;
}
if (Render != NULL)
{
::free((void*)Render);
Render = NULL;
}
if (Symbol != NULL)
{
::free((void*)Symbol);
Symbol = NULL;
}
}
};
// Port Scale Point
struct LV2_RDF_PortScalePoint {
const char* Label;
float Value;
LV2_RDF_PortScalePoint()
: Label(NULL),
Value(0.0f) {}
~LV2_RDF_PortScalePoint()
{
if (Label != NULL)
{
::free((void*)Label);
Label = NULL;
}
}
};
// Port
struct LV2_RDF_Port {
LV2_Property Types;
LV2_Property Properties;
LV2_Property Designation;
const char* Name;
const char* Symbol;
LV2_RDF_PortMidiMap MidiMap;
LV2_RDF_PortPoints Points;
LV2_RDF_PortUnit Unit;
uint32_t MinimumSize;
uint32_t ScalePointCount;
LV2_RDF_PortScalePoint* ScalePoints;
LV2_RDF_Port()
: Types(0x0),
Properties(0x0),
Designation(0),
Name(NULL),
Symbol(NULL),
MinimumSize(0),
ScalePointCount(0),
ScalePoints(NULL) {}
~LV2_RDF_Port()
{
if (Name != NULL)
{
::free((void*)Name);
Name = NULL;
}
if (Symbol != NULL)
{
::free((void*)Symbol);
Symbol = NULL;
}
if (ScalePoints != NULL)
{
delete[] ScalePoints;
ScalePoints = NULL;
}
}
};
// Preset
struct LV2_RDF_Preset {
LV2_URI URI;
const char* Label;
LV2_RDF_Preset()
: URI(NULL),
Label(NULL) {}
~LV2_RDF_Preset()
{
if (URI != NULL)
{
::free((void*)URI);
URI = NULL;
}
if (Label != NULL)
{
::free((void*)Label);
Label = NULL;
}
}
};
// Feature
struct LV2_RDF_Feature {
LV2_Property Type;
LV2_URI URI;
LV2_RDF_Feature()
: Type(0),
URI(NULL) {}
~LV2_RDF_Feature()
{
if (URI != NULL)
{
::free((void*)URI);
URI = NULL;
}
}
};
// UI
struct LV2_RDF_UI {
LV2_Property Type;
LV2_URI URI;
const char* Binary;
const char* Bundle;
uint32_t FeatureCount;
LV2_RDF_Feature* Features;
uint32_t ExtensionCount;
LV2_URI* Extensions;
LV2_RDF_UI()
: Type(0),
URI(NULL),
Binary(NULL),
Bundle(NULL),
FeatureCount(0),
Features(NULL),
ExtensionCount(0),
Extensions(NULL) {}
~LV2_RDF_UI()
{
if (URI != NULL)
{
::free((void*)URI);
URI = NULL;
}
if (Binary != NULL)
{
::free((void*)Binary);
Binary = NULL;
}
if (Bundle != NULL)
{
::free((void*)Bundle);
Bundle = NULL;
}
if (Features != NULL)
{
delete[] Features;
Features = NULL;
}
if (Extensions != NULL)
{
for (uint32_t i=0; i<ExtensionCount; ++i)
{
if (Extensions[i] != NULL)
{
::free((void*)Extensions[i]);
Extensions[i] = NULL;
}
}
delete[] Extensions;
Extensions = NULL;
}
}
};
// Plugin Descriptor
struct LV2_RDF_Descriptor {
LV2_Property Type[2];
LV2_URI URI;
const char* Name;
const char* Author;
const char* License;
const char* Binary;
const char* Bundle;
ulong UniqueID;
uint32_t PortCount;
LV2_RDF_Port* Ports;
uint32_t PresetCount;
LV2_RDF_Preset* Presets;
uint32_t FeatureCount;
LV2_RDF_Feature* Features;
uint32_t ExtensionCount;
LV2_URI* Extensions;
uint32_t UICount;
LV2_RDF_UI* UIs;
LV2_RDF_Descriptor()
: URI(NULL),
Name(NULL),
Author(NULL),
License(NULL),
Binary(NULL),
Bundle(NULL),
UniqueID(0),
PortCount(0),
Ports(NULL),
PresetCount(0),
Presets(NULL),
FeatureCount(0),
Features(NULL),
ExtensionCount(0),
Extensions(NULL),
UICount(0),
UIs(NULL)
{
Type[0] = Type[1] = 0x0;
}
~LV2_RDF_Descriptor()
{
if (URI != NULL)
{
::free((void*)URI);
URI = NULL;
}
if (Name != NULL)
{
::free((void*)Name);
Name = NULL;
}
if (Author != NULL)
{
::free((void*)Author);
Author = NULL;
}
if (License != NULL)
{
::free((void*)License);
License = NULL;
}
if (Binary != NULL)
{
::free((void*)Binary);
Binary = NULL;
}
if (Bundle != NULL)
{
::free((void*)Bundle);
Bundle = NULL;
}
if (Ports != NULL)
{
::free((void*)Ports);
Ports = NULL;
}
if (Presets != NULL)
{
delete[] Presets;
Presets = NULL;
}
if (Features != NULL)
{
delete[] Features;
Features = NULL;
}
if (Extensions != NULL)
{
for (uint32_t i=0; i<ExtensionCount; ++i)
{
if (Extensions[i] != NULL)
{
::free((void*)Extensions[i]);
Extensions[i] = NULL;
}
}
delete[] Extensions;
Extensions = NULL;
}
if (UIs != NULL)
{
delete[] UIs;
UIs = NULL;
}
}
};
#endif // LV2_RDF_HPP_INCLUDED

1380
mixer/src/LV2_RDF_Utils.hpp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -49,6 +49,7 @@
nframes_t Module::_buffer_size = 0;
nframes_t Module::_sample_rate = 0;
Module *Module::_copied_module_empty = 0;
char *Module::_copied_module_settings = 0;
@ -903,14 +904,14 @@ Module::insert_menu_cb ( const Fl_Menu_ *m )
mod = new Mono_Pan_Module();
else if ( !strcmp(picked, "Plugin" ))
{
unsigned long id = Plugin_Chooser::plugin_chooser( this->ninputs() );
Picked picked = Plugin_Chooser::plugin_chooser( this->ninputs() );
if ( id == 0 )
if ( picked.unique_id == 0 )
return;
Plugin_Module *m = new Plugin_Module();
m->load( id );
m->load( picked );
mod = m;
}

View File

@ -50,6 +50,7 @@ class Module : public Fl_Group, public Loggable {
Chain *_chain;
bool _is_default;
static nframes_t _buffer_size;
static nframes_t _sample_rate;
static Module *_copied_module_empty;
static char *_copied_module_settings;
@ -87,6 +88,14 @@ public:
virtual void update_tooltip ( void );
struct Picked {
bool is_lv2;
union {
const char* uri;
unsigned long unique_id;
};
};
class Port
{
@ -548,6 +557,7 @@ protected:
bool add_aux_port ( bool input, const char *prefix, int n , JACK::Port::type_e type );
public:
nframes_t buffer_size ( void ) const { return Module::_buffer_size; }
nframes_t sample_rate ( void ) const { return Module::_sample_rate; }
@ -561,6 +571,7 @@ public:
bool add_aux_audio_input ( const char *prefix, int n );
bool add_aux_cv_input ( const char *prefix, int n );
static void set_buffer_size ( nframes_t bsize ) { _buffer_size = bsize; }
static void set_sample_rate ( nframes_t srate ) { _sample_rate = srate; }
void command_open_parameter_editor();

View File

@ -32,9 +32,11 @@
static std::vector <Plugin_Module::Plugin_Info*> _plugin_rows;
unsigned long
Module::Picked
Plugin_Chooser::plugin_chooser ( int ninputs )
{
Module::Picked picked = { false, 0 };
Plugin_Chooser *o = new Plugin_Chooser( 0,0,735,500,"Plugin Chooser");
o->ui->inputs_input->value( ninputs );
@ -46,7 +48,16 @@ Plugin_Chooser::plugin_chooser ( int ninputs )
while ( o->shown() )
Fl::wait();
unsigned long picked = o->value();
if (const char* const uri = o->uri())
{
picked.is_lv2 = true;
picked.uri = uri;
}
else
{
picked.is_lv2 = false;
picked.unique_id = o->value();
}
delete o;
@ -250,7 +261,10 @@ Plugin_Chooser::cb_table ( Fl_Widget *w )
}
else
{
_value = _plugin_rows[R]->id;
if (::strcmp(_plugin_rows[R]->type, "LV2") == 0)
_uri = _plugin_rows[R]->path;
else
_value = _plugin_rows[R]->id;
hide();
}
}
@ -363,6 +377,7 @@ Plugin_Chooser::Plugin_Chooser ( int X,int Y,int W,int H, const char *L )
: Fl_Double_Window ( X,Y,W,H,L )
{
set_modal();
_uri = NULL;
_value = 0;
_plugins = Plugin_Module::get_all_plugins();

View File

@ -37,6 +37,7 @@ class Plugin_Chooser : public Fl_Double_Window
void search ( const char *name, const char *author, const char *category, int ninputs, int noutputs, bool favorites );
const char* _uri;
unsigned long _value;
int load_favorites ( void );
@ -46,13 +47,14 @@ class Plugin_Chooser : public Fl_Double_Window
void load_categories ( void );
public:
const char* uri ( void ) const { return _uri; }
unsigned long value ( void ) const { return _value; }
Plugin_Chooser ( int X,int Y,int W,int H, const char *L=0 );
virtual ~Plugin_Chooser( );
static unsigned long plugin_chooser ( int ninputs );
static Module::Picked plugin_chooser ( int ninputs );
};

File diff suppressed because it is too large Load Diff

View File

@ -44,14 +44,14 @@ public:
const char *type;
bool favorite;
Plugin_Info ( )
Plugin_Info ( bool is_lv2 )
{
path = 0;
id = 0;
audio_inputs = 0;
audio_outputs = 0;
type = "LADSPA";
type = is_lv2 ? "LV2" : "LADSPA";
favorite = 0;
}
@ -61,10 +61,13 @@ public:
}
};
bool load ( unsigned long id );
bool load ( Picked picked );
private:
bool load_ladspa ( unsigned long id );
bool load_lv2 ( const char* uri );
volatile nframes_t _latency;
nframes_t _last_latency;
@ -90,6 +93,7 @@ private:
int _plugin_ins;
int _plugin_outs;
bool _crosswire;
bool _is_lv2;
static void *discover_thread ( void * );
@ -141,6 +145,8 @@ public:
virtual void process ( nframes_t );
void handle_port_connection_change ( void );
void handle_sample_rate_change ( nframes_t sample_rate );
void resize_buffers ( nframes_t buffer_size );
LOG_CREATE_FUNC( Plugin_Module );

363
mixer/src/lilv/lilvmm.hpp Normal file
View File

@ -0,0 +1,363 @@
/*
Copyright 2007-2014 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef LILV_LILVMM_HPP
#define LILV_LILVMM_HPP
#include "lilv/lilv.h"
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define LILV_DEPRECATED __attribute__((__deprecated__))
#else
# define LILV_DEPRECATED
#endif
namespace Lilv {
static inline const char*
uri_to_path(const char* uri) {
return lilv_uri_to_path(uri);
}
#define LILV_WRAP0(RT, prefix, name) \
inline RT name() { return lilv_ ## prefix ## _ ## name (me); }
#define LILV_WRAP0_CONST(RT, prefix, name) \
inline RT name() const { return lilv_ ## prefix ## _ ## name (me); }
#define LILV_WRAP0_VOID(prefix, name) \
inline void name() { lilv_ ## prefix ## _ ## name(me); }
#define LILV_WRAP1(RT, prefix, name, T1, a1) \
inline RT name(T1 a1) { return lilv_ ## prefix ## _ ## name (me, a1); }
#define LILV_WRAP1_VOID(prefix, name, T1, a1) \
inline void name(T1 a1) { lilv_ ## prefix ## _ ## name(me, a1); }
#define LILV_WRAP2(RT, prefix, name, T1, a1, T2, a2) \
inline RT name(T1 a1, T2 a2) { \
return lilv_ ## prefix ## _ ## name(me, a1, a2); \
}
#define LILV_WRAP3(RT, prefix, name, T1, a1, T2, a2, T3, a3) \
inline RT name(T1 a1, T2 a2, T3 a3) { \
return lilv_ ## prefix ## _ ## name(me, a1, a2, a3); \
}
#define LILV_WRAP2_VOID(prefix, name, T1, a1, T2, a2) \
inline void name(T1 a1, T2 a2) { lilv_ ## prefix ## _ ## name(me, a1, a2); }
#ifndef SWIG
#define LILV_WRAP_CONVERSION(CT) \
inline operator CT*() const { return me; }
#else
#define LILV_WRAP_CONVERSION(CT)
#endif
struct Node {
inline Node(LilvNode* node) : me(node) {}
inline Node(const LilvNode* node) : me(lilv_node_duplicate(node)) {}
inline Node(const Node& copy) : me(lilv_node_duplicate(copy.me)) {}
inline ~Node() { lilv_node_free(me); }
inline bool equals(const Node& other) const {
return lilv_node_equals(me, other.me);
}
inline bool operator==(const Node& other) const { return equals(other); }
LILV_WRAP_CONVERSION(LilvNode);
LILV_WRAP0_CONST(char*, node, get_turtle_token);
LILV_WRAP0_CONST(bool, node, is_uri);
LILV_WRAP0_CONST(const char*, node, as_uri);
LILV_WRAP0_CONST(bool, node, is_blank);
LILV_WRAP0_CONST(const char*, node, as_blank);
LILV_WRAP0_CONST(bool, node, is_literal);
LILV_WRAP0_CONST(bool, node, is_string);
LILV_WRAP0_CONST(const char*, node, as_string);
LILV_WRAP0_CONST(bool, node, is_float);
LILV_WRAP0_CONST(float, node, as_float);
LILV_WRAP0_CONST(bool, node, is_int);
LILV_WRAP0_CONST(int, node, as_int);
LILV_WRAP0_CONST(bool, node, is_bool);
LILV_WRAP0_CONST(bool, node, as_bool);
Node& operator=(const Node& copy) {
lilv_node_free(me);
me = lilv_node_duplicate(copy.me);
return *this;
}
LilvNode* me;
};
struct ScalePoint {
inline ScalePoint(const LilvScalePoint* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvScalePoint);
LILV_WRAP0(const LilvNode*, scale_point, get_label);
LILV_WRAP0(const LilvNode*, scale_point, get_value);
const LilvScalePoint* me;
};
struct PluginClass {
inline PluginClass(const LilvPluginClass* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvPluginClass);
LILV_WRAP0(Node, plugin_class, get_parent_uri);
LILV_WRAP0(Node, plugin_class, get_uri);
LILV_WRAP0(Node, plugin_class, get_label);
LILV_WRAP0(LilvPluginClasses*, plugin_class, get_children);
const LilvPluginClass* me;
};
#define LILV_WRAP_COLL(CT, ET, prefix) \
inline CT(const Lilv ## CT* c_obj) : me(c_obj) {} \
LILV_WRAP_CONVERSION(const Lilv ## CT); \
LILV_WRAP0(unsigned, prefix, size); \
LILV_WRAP1(const ET, prefix, get, LilvIter*, i); \
LILV_WRAP0(LilvIter*, prefix, begin); \
LILV_WRAP1(LilvIter*, prefix, next, LilvIter*, i); \
LILV_WRAP1(bool, prefix, is_end, LilvIter*, i); \
const Lilv ## CT* me
struct PluginClasses {
LILV_WRAP_COLL(PluginClasses, PluginClass, plugin_classes);
LILV_WRAP1(const PluginClass, plugin_classes,
get_by_uri, const LilvNode*, uri);
};
struct ScalePoints {
LILV_WRAP_COLL(ScalePoints, ScalePoint, scale_points);
};
struct Nodes {
LILV_WRAP_COLL(Nodes, Node, nodes);
LILV_WRAP1(bool, nodes, contains, const Node, node);
inline Node get_first() const {
return Node((const LilvNode*)lilv_nodes_get_first(me));
}
};
struct UI {
inline UI(const LilvUI* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvUI);
LILV_WRAP0(Node, ui, get_uri);
LILV_WRAP1(bool, ui, is_a, LilvNode*, ui_class);
LILV_WRAP0(Node, ui, get_bundle_uri);
LILV_WRAP0(Node, ui, get_binary_uri);
#if 0 /* needs custom lilv */
LILV_WRAP0(Nodes, ui, get_supported_features);
LILV_WRAP0(Nodes, ui, get_required_features);
LILV_WRAP0(Nodes, ui, get_optional_features);
LILV_WRAP0(Nodes, ui, get_extension_data);
#endif
const LilvUI* me;
};
struct UIs {
LILV_WRAP_COLL(UIs, UI, uis);
};
struct Port {
inline Port(const LilvPlugin* p, const LilvPort* c_obj)
: parent(p), me(c_obj)
{}
LILV_WRAP_CONVERSION(const LilvPort);
#define LILV_PORT_WRAP0(RT, name) \
inline RT name () { return lilv_port_ ## name (parent, me); }
#define LILV_PORT_WRAP1(RT, name, T1, a1) \
inline RT name (T1 a1) { return lilv_port_ ## name (parent, me, a1); }
LILV_PORT_WRAP1(LilvNodes*, get_value, LilvNode*, predicate);
LILV_PORT_WRAP0(LilvNodes*, get_properties)
LILV_PORT_WRAP1(bool, has_property, LilvNode*, property_uri);
LILV_PORT_WRAP1(bool, supports_event, LilvNode*, event_uri);
LILV_PORT_WRAP0(const LilvNode*, get_symbol);
LILV_PORT_WRAP0(LilvNode*, get_name);
LILV_PORT_WRAP0(const LilvNodes*, get_classes);
LILV_PORT_WRAP1(bool, is_a, LilvNode*, port_class);
LILV_PORT_WRAP0(LilvScalePoints*, get_scale_points);
// TODO: get_range (output parameters)
const LilvPlugin* parent;
const LilvPort* me;
};
struct Plugin {
inline Plugin(const LilvPlugin* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvPlugin);
LILV_WRAP0(bool, plugin, verify);
LILV_WRAP0(Node, plugin, get_uri);
LILV_WRAP0(Node, plugin, get_bundle_uri);
LILV_WRAP0(Nodes, plugin, get_data_uris);
LILV_WRAP0(Node, plugin, get_library_uri);
LILV_WRAP0(Node, plugin, get_name);
LILV_WRAP0(PluginClass, plugin, get_class);
LILV_WRAP1(Nodes, plugin, get_value, Node, pred);
LILV_WRAP1(bool, plugin, has_feature, Node, feature_uri);
LILV_WRAP0(Nodes, plugin, get_supported_features);
LILV_WRAP0(Nodes, plugin, get_required_features);
LILV_WRAP0(Nodes, plugin, get_optional_features);
LILV_WRAP0(unsigned, plugin, get_num_ports);
LILV_WRAP0(bool, plugin, has_latency);
LILV_WRAP0(unsigned, plugin, get_latency_port_index);
LILV_WRAP0(Node, plugin, get_author_name);
LILV_WRAP0(Node, plugin, get_author_email);
LILV_WRAP0(Node, plugin, get_author_homepage);
LILV_WRAP0(bool, plugin, is_replaced);
LILV_WRAP0(Nodes, plugin, get_extension_data);
LILV_WRAP0(UIs, plugin, get_uis);
LILV_WRAP1(Nodes, plugin, get_related, Node, type);
inline Port get_port_by_index(unsigned index) {
return Port(me, lilv_plugin_get_port_by_index(me, index));
}
inline Port get_port_by_symbol(LilvNode* symbol) {
return Port(me, lilv_plugin_get_port_by_symbol(me, symbol));
}
inline void get_port_ranges_float(float* min_values,
float* max_values,
float* def_values) {
return lilv_plugin_get_port_ranges_float(
me, min_values, max_values, def_values);
}
inline unsigned get_num_ports_of_class(LilvNode* class_1, ...) {
va_list args;
va_start(args, class_1);
const uint32_t count = lilv_plugin_get_num_ports_of_class_va(
me, class_1, args);
va_end(args);
return count;
}
const LilvPlugin* me;
};
struct Plugins {
LILV_WRAP_COLL(Plugins, Plugin, plugins);
LILV_WRAP1(const Plugin, plugins, get_by_uri, const LilvNode*, uri);
};
struct Instance {
inline Instance(LilvInstance* instance) : me(instance) {}
LILV_DEPRECATED
inline Instance(Plugin plugin, double sample_rate)
: me(lilv_plugin_instantiate(plugin, sample_rate, NULL)) {}
LILV_DEPRECATED inline Instance(Plugin plugin,
double sample_rate,
LV2_Feature* const* features)
: me(lilv_plugin_instantiate(plugin, sample_rate, features)) {}
static inline Instance* create(Plugin plugin,
double sample_rate,
LV2_Feature* const* features) {
LilvInstance* me = lilv_plugin_instantiate(
plugin, sample_rate, features);
return me ? new Instance(me) : NULL;
}
LILV_WRAP_CONVERSION(LilvInstance);
LILV_WRAP2_VOID(instance, connect_port,
unsigned, port_index,
void*, data_location);
LILV_WRAP0_VOID(instance, activate);
LILV_WRAP1_VOID(instance, run, unsigned, sample_count);
LILV_WRAP0_VOID(instance, deactivate);
inline const void* get_extension_data(const char* uri) {
return lilv_instance_get_extension_data(me, uri);
}
inline const LV2_Descriptor* get_descriptor() {
return lilv_instance_get_descriptor(me);
}
inline LV2_Handle get_handle() {
return lilv_instance_get_handle(me);
}
LilvInstance* me;
};
struct World {
inline World() : me(lilv_world_new()) {}
inline virtual ~World() { lilv_world_free(me); }
inline LilvNode* new_uri(const char* uri) const {
return lilv_new_uri(me, uri);
}
inline LilvNode* new_file_uri(const char* host, const char* path) const {
return lilv_new_file_uri(me, host, path);
}
inline LilvNode* new_string(const char* str) const {
return lilv_new_string(me, str);
}
inline LilvNode* new_int(int val) const {
return lilv_new_int(me, val);
}
inline LilvNode* new_float(float val) const {
return lilv_new_float(me, val);
}
inline LilvNode* new_bool(bool val) const {
return lilv_new_bool(me, val);
}
inline Nodes find_nodes(const LilvNode* subject,
const LilvNode* predicate,
const LilvNode* object) {
return lilv_world_find_nodes(me, subject, predicate, object);
}
LILV_WRAP2_VOID(world, set_option, const char*, uri, LilvNode*, value);
#if 0 /* needs custom lilv */
LILV_WRAP1_VOID(world, load_all, const char*, lv2_path);
#else
LILV_WRAP0_VOID(world, load_all);
#endif
LILV_WRAP1_VOID(world, load_bundle, LilvNode*, bundle_uri);
LILV_WRAP0(const LilvPluginClass*, world, get_plugin_class);
LILV_WRAP0(const LilvPluginClasses*, world, get_plugin_classes);
LILV_WRAP0(const Plugins, world, get_all_plugins);
LILV_WRAP1(int, world, load_resource, const LilvNode*, resource);
LilvWorld* me;
};
} /* namespace Lilv */
#endif /* LILV_LILVMM_HPP */

View File

@ -0,0 +1,109 @@
/*
LV2 External UI extension
This work is in public domain.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you have questions, contact Filipe Coelho (aka falkTX) <falktx@falktx.com>
or ask in #lad channel, FreeNode IRC network.
*/
/**
@file lv2_external_ui.h
C header for the LV2 External UI extension <http://kxstudio.sf.net/ns/lv2ext/external-ui>.
*/
#ifndef LV2_EXTERNAL_UI_H
#define LV2_EXTERNAL_UI_H
#include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
#define LV2_EXTERNAL_UI_URI "http://kxstudio.sf.net/ns/lv2ext/external-ui"
#define LV2_EXTERNAL_UI_PREFIX LV2_EXTERNAL_UI_URI "#"
#define LV2_EXTERNAL_UI__Host LV2_EXTERNAL_UI_PREFIX "Host"
#define LV2_EXTERNAL_UI__Widget LV2_EXTERNAL_UI_PREFIX "Widget"
/** This extension used to be defined by a lv2plug.in URI */
#define LV2_EXTERNAL_UI_DEPRECATED_URI "http://lv2plug.in/ns/extensions/ui#external"
#ifdef __cplusplus
extern "C" {
#endif
/**
* When LV2_EXTERNAL_UI__Widget UI is instantiated, the returned
* LV2UI_Widget handle must be cast to pointer to LV2_External_UI_Widget.
* UI is created in invisible state.
*/
typedef struct _LV2_External_UI_Widget {
/**
* Host calls this function regulary. UI library implementing the
* callback may do IPC or redraw the UI.
*
* @param _this_ the UI context
*/
void (*run)(struct _LV2_External_UI_Widget * _this_);
/**
* Host calls this function to make the plugin UI visible.
*
* @param _this_ the UI context
*/
void (*show)(struct _LV2_External_UI_Widget * _this_);
/**
* Host calls this function to make the plugin UI invisible again.
*
* @param _this_ the UI context
*/
void (*hide)(struct _LV2_External_UI_Widget * _this_);
} LV2_External_UI_Widget;
#define LV2_EXTERNAL_UI_RUN(ptr) (ptr)->run(ptr)
#define LV2_EXTERNAL_UI_SHOW(ptr) (ptr)->show(ptr)
#define LV2_EXTERNAL_UI_HIDE(ptr) (ptr)->hide(ptr)
/**
* On UI instantiation, host must supply LV2_EXTERNAL_UI__Host feature.
* LV2_Feature::data must be pointer to LV2_External_UI_Host.
*/
typedef struct _LV2_External_UI_Host {
/**
* Callback that plugin UI will call when UI (GUI window) is closed by user.
* This callback will be called during execution of LV2_External_UI_Widget::run()
* (i.e. not from background thread).
*
* After this callback is called, UI is defunct. Host must call LV2UI_Descriptor::cleanup().
* If host wants to make the UI visible again, the UI must be reinstantiated.
*
* @note When using the depreated URI LV2_EXTERNAL_UI_DEPRECATED_URI,
* some hosts will not call LV2UI_Descriptor::cleanup() as they should,
* and may call show() again without re-initialization.
*
* @param controller Host context associated with plugin UI, as
* supplied to LV2UI_Descriptor::instantiate().
*/
void (*ui_closed)(LV2UI_Controller controller);
/**
* Optional (may be NULL) "user friendly" identifier which the UI
* may display to allow a user to easily associate this particular
* UI instance with the correct plugin instance as it is represented
* by the host (e.g. "track 1" or "channel 4").
*
* If supplied by host, the string will be referenced only during
* LV2UI_Descriptor::instantiate()
*/
const char * plugin_human_id;
} LV2_External_UI_Host;
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV2_EXTERNAL_UI_H */

View File

@ -0,0 +1,33 @@
/*
LV2 KXStudio Properties Extension
Copyright 2014 Filipe Coelho <falktx@falktx.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
@file lv2_kxstudio_properties.h
C header for the LV2 KXStudio Properties extension <http://kxstudio.sf.net/ns/lv2ext/props>.
*/
#ifndef LV2_KXSTUDIO_PROPERTIES_H
#define LV2_KXSTUDIO_PROPERTIES_H
#define LV2_KXSTUDIO_PROPERTIES_URI "http://kxstudio.sf.net/ns/lv2ext/props"
#define LV2_KXSTUDIO_PROPERTIES_PREFIX LV2_KXSTUDIO_PROPERTIES_URI "#"
#define LV2_KXSTUDIO_PROPERTIES__NonAutomable LV2_KXSTUDIO_PROPERTIES_PREFIX "NonAutomable"
#define LV2_KXSTUDIO_PROPERTIES__TimePositionTicksPerBeat LV2_KXSTUDIO_PROPERTIES_PREFIX "TimePositionTicksPerBeat"
#define LV2_KXSTUDIO_PROPERTIES__TransientWindowId LV2_KXSTUDIO_PROPERTIES_PREFIX "TransientWindowId"
#endif /* LV2_KXSTUDIO_PROPERTIES_H */

View File

@ -29,6 +29,11 @@ def configure(conf):
conf.check_cfg(package='lrdf', uselib_store='LRDF',args="--cflags --libs",
atleast_version='0.4.0', mandatory=True)
conf.check_cfg(package='lv2', uselib_store='LV2',args="--cflags --libs",
atleast_version='1.10.0', mandatory=True)
conf.check_cfg(package='lilv-0', uselib_store='LILV',args="--cflags --libs",
atleast_version='0.20.0', mandatory=True)
conf.define('VERSION', PACKAGE_VERSION)
conf.define('SYSTEM_PATH', '/'.join( [ conf.env.DATADIR, APPNAME ] ) )
conf.define('DOCUMENT_PATH', '/'.join( [ conf.env.DATADIR, 'doc' ] ) )
@ -72,7 +77,7 @@ src/Spatialization_Console.C
target = 'non-mixer',
includes = ['.', 'src', '..', '../nonlib'],
use = ['nonlib', 'fl_widgets'],
uselib = [ 'JACK', 'LIBLO', 'LRDF', 'NTK', 'NTK_IMAGES', 'PTHREAD', 'DL', 'M' ],
uselib = [ 'JACK', 'LIBLO', 'LRDF', 'LILV', 'NTK', 'NTK_IMAGES', 'PTHREAD', 'DL', 'M' ],
install_path = '${BINDIR}')
bld.program( source = 'src/midi-mapper.C',