@@ -104,3 +104,6 @@ c++/carla-native/zynaddsubfx/UI/SUBnoteUI.cc | |||
c++/carla-native/zynaddsubfx/UI/SUBnoteUI.h | |||
c++/carla-native/zynaddsubfx/UI/VirKeyboard.cc | |||
c++/carla-native/zynaddsubfx/UI/VirKeyboard.h | |||
# Other | |||
libs/jackbridge/jack/ |
@@ -7,5 +7,5 @@ else | |||
fi | |||
INSTALL_PREFIX="X-PREFIX-X" | |||
export PATH="$INSTALL_PREFIX"/lib/cadence:$PATH | |||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/carla.py --with-libprefix="$INSTALL_PREFIX" "$@" | |||
export PATH="$INSTALL_PREFIX"/lib/carla:$PATH | |||
exec $PYTHON $INSTALL_PREFIX/share/carla/carla.py --with-libprefix="$INSTALL_PREFIX" "$@" |
@@ -7,4 +7,4 @@ else | |||
fi | |||
INSTALL_PREFIX="X-PREFIX-X" | |||
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/carla_control.py "$@" | |||
exec $PYTHON $INSTALL_PREFIX/share/carla/carla_control.py "$@" |
@@ -2,7 +2,7 @@ | |||
# Script to start Carla bridges | |||
INSTALL_PREFIX="X-PREFIX-X" | |||
CADENCE_PREFIX="$INSTALL_PREFIX"/lib/cadence | |||
CARLA_PREFIX="$INSTALL_PREFIX"/lib/carla | |||
# ---------------------------------------------------------------------- | |||
# Check for enough arguments | |||
@@ -58,17 +58,17 @@ if [ $RUN_ARCH == "win64" ]; then | |||
fi | |||
# ---------------------------------------------------------------------- | |||
# Check for existing cadence folder | |||
# Check for existing carla folder | |||
if [ ! -d $CADENCE_PREFIX ]; then | |||
echo "$0: Cadence folder non-existing, is it installed?" | |||
if [ ! -d $CARLA_PREFIX ]; then | |||
echo "$0: Carla folder does not exist, is it installed?" | |||
exit | |||
fi | |||
# ---------------------------------------------------------------------- | |||
# Check for existing arch binary | |||
CARLA_EXEC="$CADENCE_PREFIX/carla-bridge-$RUN_ARCH" | |||
CARLA_EXEC="$CARLA_PREFIX/carla-bridge-$RUN_ARCH" | |||
if [ ! -f $CARLA_EXEC ]; then | |||
echo "$0: Invalid arch (may not be installed)" | |||
@@ -0,0 +1,62 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for carla libs # | |||
# ----------------------------------------- # | |||
# Created by falkTX | |||
# | |||
all: | |||
# -------------------------------------------------------------- | |||
jackbridge-win32.dll: | |||
$(MAKE) -C jackbridge win32 | |||
jackbridge-win64.dll: | |||
$(MAKE) -C jackbridge win64 | |||
jackbridge-win32.dll.so: | |||
$(MAKE) -C jackbridge wine32 | |||
jackbridge-win64.dll.so: | |||
$(MAKE) -C jackbridge wine64 | |||
# -------------------------------------------------------------- | |||
lilv.a: | |||
$(MAKE) -C lilv | |||
lilv_posix32.a: | |||
$(MAKE) -C lilv posix32 | |||
lilv_posix64.a: | |||
$(MAKE) -C lilv posix64 | |||
lilv_win32.a: | |||
$(MAKE) -C lilv win32 | |||
lilv_win64.a: | |||
$(MAKE) -C lilv win64 | |||
# -------------------------------------------------------------- | |||
rtmempool.a: | |||
$(MAKE) -C rtmempool | |||
rtmempool_posix32.a: | |||
$(MAKE) -C rtmempool posix32 | |||
rtmempool_posix64.a: | |||
$(MAKE) -C rtmempool posix64 | |||
rtmempool_win32.a: | |||
$(MAKE) -C rtmempool win32 | |||
rtmempool_win64.a: | |||
$(MAKE) -C rtmempool win64 | |||
# -------------------------------------------------------------- | |||
clean: | |||
rm -f *.a *.def *.dll *.so | |||
$(MAKE) clean -C lilv | |||
$(MAKE) clean -C rtmempool |
@@ -0,0 +1,51 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for jackbridge # | |||
# ------------------------------------- # | |||
# Created by falkTX | |||
# | |||
include ../../Makefile.mk | |||
# -------------------------------------------------------------- | |||
WINECC ?= winegcc | |||
BUILD_C_FLAGS += -DJACKBRIDGE_EXPORT -I. | |||
LINK_FLAGS += -shared | |||
WIN_BUILD_FLAGS = $(BUILD_C_FLAGS) -DJACKBRIDGE_DUMMY -w | |||
WIN_32BIT_FLAGS = $(32BIT_FLAGS) | |||
WIN_64BIT_FLAGS = $(64BIT_FLAGS) | |||
WIN_LINK_FLAGS = $(LINK_FLAGS) | |||
WINE_BUILD_FLAGS = $(BUILD_C_FLAGS) -fPIC | |||
WINE_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32/wine -L/usr/lib/i386-linux-gnu/wine | |||
WINE_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64/wine -L/usr/lib/x86_64-linux-gnu/wine | |||
WINE_LINK_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs jack) -ldl | |||
OBJS = jackbridge.c | |||
# -------------------------------------------------------------- | |||
all: | |||
win32: ../jackbridge-win32.dll | |||
win64: ../jackbridge-win64.dll | |||
wine32: ../jackbridge-win32.dll.so | |||
wine64: ../jackbridge-win64.dll.so | |||
# -------------------------------------------------------------- | |||
../jackbridge-win32.dll: $(OBJS) | |||
$(CC) $^ $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -Wl,--output-def,$@.def,--out-implib,$@.a -o $@ && $(STRIP) $@ | |||
../jackbridge-win64.dll: $(OBJS) | |||
$(CC) $^ $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -Wl,--output-def,$@.def,--out-implib,$@.a -o $@ && $(STRIP) $@ | |||
../jackbridge-win32.dll.so: $(OBJS) ../jackbridge-win32.dll.def | |||
$(WINECC) $^ $(WINE_BUILD_FLAGS) $(WINE_32BIT_FLAGS) $(WINE_LINK_FLAGS) -mno-cygwin -o $@ && $(STRIP) $@ | |||
../jackbridge-win64.dll.so: $(OBJS) ../jackbridge-win64.dll.def | |||
$(WINECC) $^ $(WINE_BUILD_FLAGS) $(WINE_64BIT_FLAGS) $(WINE_LINK_FLAGS) -mno-cygwin -o $@ && $(STRIP) $@ | |||
# -------------------------------------------------------------- |
@@ -0,0 +1,259 @@ | |||
/* | |||
* JackBridge | |||
* Copyright (C) 2013 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 COPYING file | |||
*/ | |||
#include "jackbridge.h" | |||
// ----------------------------------------------------------------------------- | |||
jack_client_t* jackbridge_client_open(const char* client_name, jack_options_t options, jack_status_t* status, ...) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_client_open(client_name, options, status); | |||
#else | |||
return NULL; | |||
#endif | |||
} | |||
int jackbridge_client_close(jack_client_t* client) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_client_close(client); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_client_name_size() | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_client_name_size(); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
char* jackbridge_get_client_name(jack_client_t* client) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_get_client_name(client); | |||
#else | |||
return NULL; | |||
#endif | |||
} | |||
int jackbridge_port_name_size() | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_port_name_size(); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_recompute_total_latencies(jack_client_t* client) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_recompute_total_latencies(client); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
void jackbridge_port_get_latency_range(jack_port_t* port, jack_latency_callback_mode_t mode, jack_latency_range_t* range) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
jack_port_get_latency_range(port, mode, range); | |||
#endif | |||
} | |||
void jackbridge_port_set_latency_range(jack_port_t* port, jack_latency_callback_mode_t mode, jack_latency_range_t* range) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
jack_port_set_latency_range(port, mode, range); | |||
#endif | |||
} | |||
int jackbridge_activate(jack_client_t* client) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_activate(client); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_deactivate(jack_client_t* client) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_deactivate(client); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
void jackbridge_on_shutdown(jack_client_t* client, JackShutdownCallback shutdown_callback, void* arg) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
jack_on_shutdown(client, shutdown_callback, arg); | |||
#endif | |||
} | |||
int jackbridge_set_latency_callback(jack_client_t* client, JackLatencyCallback latency_callback, void* arg) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_set_latency_callback(client, latency_callback, arg); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_set_process_callback(jack_client_t* client, JackProcessCallback process_callback, void* arg) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_set_process_callback(client, process_callback, arg); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_set_freewheel_callback(jack_client_t* client, JackFreewheelCallback freewheel_callback, void* arg) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_set_freewheel_callback(client, freewheel_callback, arg); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_set_buffer_size_callback(jack_client_t* client, JackBufferSizeCallback bufsize_callback, void* arg) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_set_buffer_size_callback(client, bufsize_callback, arg); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_set_sample_rate_callback(jack_client_t* client, JackSampleRateCallback srate_callback, void* arg) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_set_sample_rate_callback(client, srate_callback, arg); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
jack_nframes_t jackbridge_get_sample_rate(jack_client_t* client) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_get_sample_rate(client); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
jack_nframes_t jackbridge_get_buffer_size(jack_client_t* client) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_get_buffer_size(client); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
jack_port_t* jackbridge_port_register(jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_port_register(client, port_name, port_type, flags, buffer_size); | |||
#else | |||
return NULL; | |||
#endif | |||
} | |||
int jackbridge_port_unregister(jack_client_t* client, jack_port_t* port) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_port_unregister(client, port); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
void* jackbridge_port_get_buffer(jack_port_t* port, jack_nframes_t nframes) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_port_get_buffer(port, nframes); | |||
#else | |||
return NULL; | |||
#endif | |||
} | |||
// ----------------------------------------------------------------------------- | |||
uint32_t jackbridge_midi_get_event_count(void* port_buffer) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_midi_get_event_count(port_buffer); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
int jackbridge_midi_event_get(jack_midi_event_t* event, void* port_buffer, uint32_t event_index) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_midi_event_get(event, port_buffer, event_index); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
void jackbridge_midi_clear_buffer(void* port_buffer) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
jack_midi_clear_buffer(port_buffer); | |||
#endif | |||
} | |||
jack_midi_data_t* jackbridge_midi_event_reserve(void* port_buffer, jack_nframes_t time, size_t data_size) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_midi_event_reserve(port_buffer, time, data_size); | |||
#else | |||
return NULL; | |||
#endif | |||
} | |||
int jackbridge_midi_event_write(void* port_buffer, jack_nframes_t time, const jack_midi_data_t* data, size_t data_size) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_midi_event_write(port_buffer, time, data, data_size); | |||
#else | |||
return 0; | |||
#endif | |||
} | |||
// ----------------------------------------------------------------------------- | |||
jack_transport_state_t jackbridge_transport_query(const jack_client_t* client, jack_position_t* pos) | |||
{ | |||
#ifndef JACKBRIDGE_DUMMY | |||
return jack_transport_query(client, pos); | |||
#else | |||
return JackTransportStopped; | |||
#endif | |||
} |
@@ -0,0 +1,111 @@ | |||
/* | |||
* JackBridge | |||
* Copyright (C) 2013 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 COPYING file | |||
*/ | |||
#ifndef __JACKBRIDGE_H__ | |||
#define __JACKBRIDGE_H__ | |||
#if defined(_WIN32) && ! defined(__WINE__) | |||
# include <stdint.h> | |||
# include <windows.h> | |||
# define BRIDGE_EXPORT __declspec (dllexport) | |||
#else | |||
# define BRIDGE_EXPORT __attribute__ ((visibility("default"))) | |||
#endif | |||
#ifdef __WINE__ | |||
# define GNU_WIN32 // fix jack_native_thread_t | |||
#endif | |||
#include <jack/jack.h> | |||
#include <jack/midiport.h> | |||
#include <jack/transport.h> | |||
#ifdef JACKBRIDGE_EXPORT | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif | |||
BRIDGE_EXPORT jack_client_t* jackbridge_client_open(const char* client_name, jack_options_t options, jack_status_t* status, ...); | |||
BRIDGE_EXPORT int jackbridge_client_close(jack_client_t* client); | |||
BRIDGE_EXPORT int jackbridge_client_name_size(); | |||
BRIDGE_EXPORT char* jackbridge_get_client_name(jack_client_t* client); | |||
BRIDGE_EXPORT int jackbridge_port_name_size(); | |||
BRIDGE_EXPORT int jackbridge_recompute_total_latencies(jack_client_t* client); | |||
BRIDGE_EXPORT void jackbridge_port_get_latency_range(jack_port_t* port, jack_latency_callback_mode_t mode, jack_latency_range_t* range); | |||
BRIDGE_EXPORT void jackbridge_port_set_latency_range(jack_port_t* port, jack_latency_callback_mode_t mode, jack_latency_range_t* range); | |||
BRIDGE_EXPORT int jackbridge_activate(jack_client_t* client); | |||
BRIDGE_EXPORT int jackbridge_deactivate(jack_client_t* client); | |||
BRIDGE_EXPORT void jackbridge_on_shutdown(jack_client_t* client, JackShutdownCallback shutdown_callback, void* arg); | |||
BRIDGE_EXPORT int jackbridge_set_latency_callback(jack_client_t* client, JackLatencyCallback latency_callback, void* arg); | |||
BRIDGE_EXPORT int jackbridge_set_process_callback(jack_client_t* client, JackProcessCallback process_callback, void* arg); | |||
BRIDGE_EXPORT int jackbridge_set_freewheel_callback(jack_client_t* client, JackFreewheelCallback freewheel_callback, void* arg); | |||
BRIDGE_EXPORT int jackbridge_set_buffer_size_callback(jack_client_t* client, JackBufferSizeCallback bufsize_callback, void* arg); | |||
BRIDGE_EXPORT int jackbridge_set_sample_rate_callback(jack_client_t* client, JackSampleRateCallback srate_callback, void* arg); | |||
BRIDGE_EXPORT jack_nframes_t jackbridge_get_sample_rate(jack_client_t* client); | |||
BRIDGE_EXPORT jack_nframes_t jackbridge_get_buffer_size(jack_client_t* client); | |||
BRIDGE_EXPORT jack_port_t* jackbridge_port_register(jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size); | |||
BRIDGE_EXPORT int jackbridge_port_unregister(jack_client_t* client, jack_port_t* port); | |||
BRIDGE_EXPORT void* jackbridge_port_get_buffer(jack_port_t* port, jack_nframes_t nframes); | |||
BRIDGE_EXPORT uint32_t jackbridge_midi_get_event_count(void* port_buffer); | |||
BRIDGE_EXPORT int jackbridge_midi_event_get(jack_midi_event_t* event, void* port_buffer, uint32_t event_index); | |||
BRIDGE_EXPORT void jackbridge_midi_clear_buffer(void* port_buffer); | |||
BRIDGE_EXPORT jack_midi_data_t* jackbridge_midi_event_reserve(void* port_buffer, jack_nframes_t time, size_t data_size); | |||
BRIDGE_EXPORT int jackbridge_midi_event_write(void* port_buffer, jack_nframes_t time, const jack_midi_data_t* data, size_t data_size); | |||
BRIDGE_EXPORT jack_transport_state_t jackbridge_transport_query(const jack_client_t* client, jack_position_t* pos); | |||
#ifdef __cplusplus | |||
} | |||
#endif | |||
#else // JACKBRIDGE_EXPORT | |||
#define jackbridge_client_open jack_client_open | |||
#define jackbridge_client_close jack_client_close | |||
#define jackbridge_client_name_size jack_client_name_size | |||
#define jackbridge_get_client_name jack_get_client_name | |||
#define jackbridge_port_name_size jack_port_name_size | |||
#define jackbridge_recompute_total_latencies jack_recompute_total_latencies | |||
#define jackbridge_port_get_latency_range jack_port_get_latency_range | |||
#define jackbridge_port_set_latency_range jack_port_set_latency_range | |||
#define jackbridge_activate jack_activate | |||
#define jackbridge_deactivate jack_deactivate | |||
#define jackbridge_on_shutdown jack_on_shutdown | |||
#define jackbridge_set_latency_callback jack_set_latency_callback | |||
#define jackbridge_set_process_callback jack_set_process_callback | |||
#define jackbridge_set_freewheel_callback jack_set_freewheel_callback | |||
#define jackbridge_set_buffer_size_callback jack_set_buffer_size_callback | |||
#define jackbridge_set_sample_rate_callback jack_set_sample_rate_callback | |||
#define jackbridge_get_sample_rate jack_get_sample_rate | |||
#define jackbridge_get_buffer_size jack_get_buffer_size | |||
#define jackbridge_port_register jack_port_register | |||
#define jackbridge_port_unregister jack_port_unregister | |||
#define jackbridge_port_get_buffer jack_port_get_buffer | |||
#define jackbridge_midi_get_event_count jack_midi_get_event_count | |||
#define jackbridge_midi_event_get jack_midi_event_get | |||
#define jackbridge_midi_clear_buffer jack_midi_clear_buffer | |||
#define jackbridge_midi_event_reserve jack_midi_event_reserve | |||
#define jackbridge_midi_event_write jack_midi_event_write | |||
#define jackbridge_transport_query jack_transport_query | |||
#endif // JACKBRIDGE_EXPORT | |||
#endif // __JACKBRIDGE_H__ |
@@ -0,0 +1,96 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for lilv # | |||
# ----------------------- # | |||
# Created by falkTX | |||
# | |||
include ../../Makefile.mk | |||
# -------------------------------------------------------------- | |||
SERD_VERSION = 0.18.2 | |||
SORD_VERSION = 0.10.4 | |||
SRATOM_VERSION = 0.4.0 | |||
LILV_VERSION = 0.14.4 | |||
BUILD_C_FLAGS += -fvisibility=hidden -fPIC -w | |||
BUILD_C_FLAGS += -Iconfig -I../../includes | |||
OBJS = serd.o sord.o sratom.o lilv.o | |||
OBJS_posix32 = serd_posix32.o sord_posix32.o sratom_posix32.o lilv_posix32.o | |||
OBJS_posix64 = serd_posix64.o sord_posix64.o sratom_posix64.o lilv_posix64.o | |||
OBJS_win32 = serd_win32.o sord_win32.o sratom_win32.o lilv_win32.o | |||
OBJS_win64 = serd_win64.o sord_win64.o sratom_win64.o lilv_win64.o | |||
# -------------------------------------------------------------- | |||
all: ../lilv.a | |||
posix32: ../lilv_posix32.a | |||
posix64: ../lilv_posix64.a | |||
win32: ../lilv_win32.a | |||
win64: ../lilv_win64.a | |||
# -------------------------------------------------------------- | |||
../lilv.a: $(OBJS) | |||
$(AR) rs $@ $^ | |||
../lilv_posix32.a: $(OBJS_posix32) | |||
$(AR) rs $@ $^ | |||
../lilv_posix64.a: $(OBJS_posix64) | |||
$(AR) rs $@ $^ | |||
../lilv_win32.a: $(OBJS_win32) | |||
$(AR) rs $@ $^ | |||
../lilv_win64.a: $(OBJS_win64) | |||
$(AR) rs $@ $^ | |||
# -------------------------------------------------------------- | |||
serd.o: serd.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Iserd-$(SERD_VERSION) -c -o $@ | |||
sord.o: sord.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Isord-$(SORD_VERSION) -Isord-$(SORD_VERSION)/src -c -o $@ | |||
sratom.o: sratom.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Isratom-$(SRATOM_VERSION) -c -o $@ | |||
lilv.o: lilv.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Ililv-$(LILV_VERSION) -Ililv-$(LILV_VERSION)/src -c -o $@ | |||
# -------------------------------------------------------------- | |||
serd_%32.o: serd.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Iserd-$(SERD_VERSION) $(32BIT_FLAGS) -c -o $@ | |||
sord_%32.o: sord.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Isord-$(SORD_VERSION) -Isord-$(SORD_VERSION)/src $(32BIT_FLAGS) -c -o $@ | |||
sratom_%32.o: sratom.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Isratom-$(SRATOM_VERSION) $(32BIT_FLAGS) -c -o $@ | |||
lilv_%32.o: lilv.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Ililv-$(LILV_VERSION) -Ililv-$(LILV_VERSION)/src $(32BIT_FLAGS) -c -o $@ | |||
# -------------------------------------------------------------- | |||
serd_%64.o: serd.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Iserd-$(SERD_VERSION) $(64BIT_FLAGS) -c -o $@ | |||
sord_%64.o: sord.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Isord-$(SORD_VERSION) -Isord-$(SORD_VERSION)/src $(64BIT_FLAGS) -c -o $@ | |||
sratom_%64.o: sratom.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Isratom-$(SRATOM_VERSION) $(64BIT_FLAGS) -c -o $@ | |||
lilv_%64.o: lilv.c | |||
$(CC) $< $(BUILD_C_FLAGS) -Ililv-$(LILV_VERSION) -Ililv-$(LILV_VERSION)/src $(64BIT_FLAGS) -c -o $@ | |||
# -------------------------------------------------------------- | |||
clean: | |||
rm -f *.o |
@@ -0,0 +1,35 @@ | |||
#ifndef _LILV_CONFIG_H_ | |||
#define _LILV_CONFIG_H_ | |||
#define LILV_VERSION "0.14.4" | |||
#define LILV_NEW_LV2 1 | |||
#define HAVE_LV2 1 | |||
#define HAVE_SERD 1 | |||
#define HAVE_SORD 1 | |||
#define HAVE_SRATOM 1 | |||
#define HAVE_FILENO 1 | |||
#define HAVE_CLOCK_GETTIME 1 | |||
#ifdef __WIN32__ | |||
#define LILV_PATH_SEP ";" | |||
#define LILV_DIR_SEP "\\" | |||
#else | |||
#define LILV_PATH_SEP ":" | |||
#define LILV_DIR_SEP "/" | |||
#define HAVE_FLOCK 1 | |||
#endif | |||
#if defined(__APPLE__) | |||
#define LILV_DEFAULT_LV2_PATH "~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2:/Library/Audio/Plug-Ins/LV2" | |||
#elif defined(__HAIKU__) | |||
#define LILV_DEFAULT_LV2_PATH "~/.lv2:/boot/common/add-ons/lv2" | |||
#elif defined(__WIN32__) | |||
#define LILV_DEFAULT_LV2_PATH "%APPDATA%\\LV2;%COMMONPROGRAMFILES%\\LV2" | |||
#else | |||
#define LILV_DEFAULT_LV2_PATH "~/.lv2:/usr/lib/lv2:/usr/local/lib/lv2" | |||
#endif | |||
#endif /* _LILV_CONFIG_H_ */ |
@@ -0,0 +1,21 @@ | |||
#ifndef _SERD_CONFIG_H_ | |||
#define _SERD_CONFIG_H_ | |||
#define SERD_VERSION "0.18.2" | |||
#if defined(__APPLE__) || defined(__HAIKU__) | |||
#define HAVE_FMAX 1 | |||
#define HAVE_FILENO 1 | |||
#define HAVE_POSIX_MEMALIGN 1 | |||
#elif defined(__WIN32__) | |||
#define HAVE_FMAX 1 | |||
#define HAVE_FILENO 1 | |||
#else | |||
#define HAVE_FMAX 1 | |||
#define HAVE_FILENO 1 | |||
#define HAVE_POSIX_MEMALIGN 1 | |||
#define HAVE_POSIX_FADVISE 1 | |||
#endif | |||
#endif /* _SERD_CONFIG_H_ */ |
@@ -0,0 +1,10 @@ | |||
#ifndef _SORD_CONFIG_H_ | |||
#define _SORD_CONFIG_H_ | |||
#define SORD_VERSION "0.10.4" | |||
#define HAVE_SERD 1 | |||
#define HAVE_PCRE 1 | |||
#endif /* _SORD_CONFIG_H_ */ |
@@ -0,0 +1,11 @@ | |||
#ifndef _SRATOM_CONFIG_H_ | |||
#define _SRATOM_CONFIG_H_ | |||
#define SRATOM_VERSION "0.4.0" | |||
#define HAVE_LV2 1 | |||
#define HAVE_SERD 1 | |||
#define HAVE_SORD 1 | |||
#endif /* _SRATOM_CONFIG_H_ */ |
@@ -0,0 +1,20 @@ | |||
diff -U 3 -H -b -B -d -r -N -- lilv-0.14.4.old/src/util.c lilv-0.14.4/src/util.c | |||
--- lilv-0.14.4.old/src/util.c 2012-08-09 21:51:00.000000000 +0100 | |||
+++ lilv-0.14.4/src/util.c 2012-09-15 01:20:07.908701939 +0100 | |||
@@ -29,7 +29,6 @@ | |||
#include <string.h> | |||
#ifdef _WIN32 | |||
-# define _WIN32_WINNT 0x0600 /* for CreateSymbolicLink */ | |||
# include <windows.h> | |||
# include <direct.h> | |||
# include <io.h> | |||
@@ -426,7 +425,7 @@ | |||
int ret = 0; | |||
if (strcmp(oldpath, newpath)) { | |||
#ifdef _WIN32 | |||
- ret = !CreateSymbolicLink(newpath, oldpath, 0); | |||
+ ret = 0; | |||
#else | |||
ret = symlink(oldpath, newpath); | |||
#endif |
@@ -0,0 +1,137 @@ | |||
diff -U 3 -H -d -r -N -- lilv-0.14.4.old/lilv/lilv.h lilv-0.14.4/lilv/lilv.h | |||
--- lilv-0.14.4.old/lilv/lilv.h 2012-09-07 19:00:48.464571333 +0100 | |||
+++ lilv-0.14.4/lilv/lilv.h 2012-09-07 18:54:00.626548936 +0100 | |||
@@ -1693,6 +1693,25 @@ | |||
lilv_ui_get_binary_uri(const LilvUI* ui); | |||
/** | |||
+ Custom calls | |||
+*/ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_supported_features(const LilvUI* ui); | |||
+ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_required_features(const LilvUI* ui); | |||
+ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_optional_features(const LilvUI* ui); | |||
+ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_extension_data(const LilvUI* ui); | |||
+ | |||
+/** | |||
@} | |||
@} | |||
*/ | |||
diff -U 3 -H -d -r -N -- lilv-0.14.4.old/lilv/lilvmm.hpp lilv-0.14.4/lilv/lilvmm.hpp | |||
--- lilv-0.14.4.old/lilv/lilvmm.hpp 2012-07-18 02:42:43.000000000 +0100 | |||
+++ lilv-0.14.4/lilv/lilvmm.hpp 2012-09-07 18:53:14.134318379 +0100 | |||
@@ -136,6 +136,7 @@ | |||
struct Nodes { | |||
LILV_WRAP_COLL(Nodes, Node, nodes); | |||
LILV_WRAP1(bool, nodes, contains, const Node, node); | |||
+ LILV_WRAP0(Node, nodes, get_first); | |||
}; | |||
struct Port { | |||
@@ -167,6 +168,26 @@ | |||
const LilvPort* 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); | |||
+ 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); | |||
+ | |||
+ const LilvUI* me; | |||
+}; | |||
+ | |||
+struct UIs { | |||
+ LILV_WRAP_COLL(UIs, UI, uis); | |||
+}; | |||
+ | |||
struct Plugin { | |||
inline Plugin(const LilvPlugin* c_obj) : me(c_obj) {} | |||
LILV_WRAP_CONVERSION(const LilvPlugin); | |||
@@ -190,6 +211,8 @@ | |||
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); | |||
inline Port get_port_by_index(unsigned index) { | |||
return Port(me, lilv_plugin_get_port_by_index(me, index)); | |||
diff -U 3 -H -d -r -N -- lilv-0.14.4.old/src/ui.c lilv-0.14.4/src/ui.c | |||
--- lilv-0.14.4.old/src/ui.c 2012-09-07 19:00:48.464571333 +0100 | |||
+++ lilv-0.14.4/src/ui.c 2012-09-07 18:59:51.652289664 +0100 | |||
@@ -128,3 +128,57 @@ | |||
assert(ui->binary_uri); | |||
return ui->binary_uri; | |||
} | |||
+ | |||
+static LilvNodes* | |||
+lilv_ui_get_value_internal(const LilvUI* ui, | |||
+ const SordNode* predicate) | |||
+{ | |||
+ return lilv_world_query_values_internal( | |||
+ ui->world, ui->uri->node, predicate, NULL); | |||
+} | |||
+ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_supported_features(const LilvUI* ui) | |||
+{ | |||
+ LilvNodes* optional = lilv_ui_get_optional_features(ui); | |||
+ LilvNodes* required = lilv_ui_get_required_features(ui); | |||
+ LilvNodes* result = lilv_nodes_new(); | |||
+ | |||
+ LILV_FOREACH(nodes, i, optional) | |||
+ zix_tree_insert((ZixTree*)result, | |||
+ lilv_node_duplicate(lilv_nodes_get(optional, i)), | |||
+ NULL); | |||
+ LILV_FOREACH(nodes, i, required) | |||
+ zix_tree_insert((ZixTree*)result, | |||
+ lilv_node_duplicate(lilv_nodes_get(required, i)), | |||
+ NULL); | |||
+ | |||
+ lilv_nodes_free(optional); | |||
+ lilv_nodes_free(required); | |||
+ | |||
+ return result; | |||
+} | |||
+ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_required_features(const LilvUI* ui) | |||
+{ | |||
+ return lilv_ui_get_value_internal( | |||
+ ui, ui->world->uris.lv2_requiredFeature); | |||
+} | |||
+ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_optional_features(const LilvUI* ui) | |||
+{ | |||
+ return lilv_ui_get_value_internal( | |||
+ ui, ui->world->uris.lv2_optionalFeature); | |||
+} | |||
+ | |||
+LILV_API | |||
+LilvNodes* | |||
+lilv_ui_get_extension_data(const LilvUI* ui) | |||
+{ | |||
+ return lilv_ui_get_value_internal(ui, ui->world->uris.lv2_extensionData); | |||
+} |
@@ -0,0 +1,11 @@ | |||
diff -U 3 -H -b -B -d -r -N -- lilv-0.14.4.old/lilv/lilvmm.hpp lilv-0.14.4/lilv/lilvmm.hpp | |||
--- lilv-0.14.4.old/lilv/lilvmm.hpp 2012-09-13 12:47:55.000000000 +0100 | |||
+++ lilv-0.14.4/lilv/lilvmm.hpp 2012-09-13 12:48:10.950555311 +0100 | |||
@@ -60,6 +60,7 @@ | |||
#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)) {} | |||
@@ -0,0 +1,8 @@ | |||
Author: | |||
David Robillard <d@drobilla.net> | |||
GTK2 GUI and I18N support: | |||
Lars Luthman <lars.luthman@gmail.com> | |||
Dynamic manifest support: | |||
Stefano D'Angelo |
@@ -0,0 +1,13 @@ | |||
Copyright 2011-2012 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. |
@@ -0,0 +1,59 @@ | |||
Installation Instructions | |||
========================= | |||
Basic Installation | |||
------------------ | |||
Building this software requires only Python. To install with default options: | |||
./waf configure | |||
./waf | |||
./waf install | |||
You may need to become root for the install stage, for example: | |||
sudo ./waf install | |||
Configuration Options | |||
--------------------- | |||
All supported options can be viewed using the command: | |||
./waf --help | |||
Most options only need to be passed during the configure stage, for example: | |||
./waf configure --prefix=/usr | |||
./waf | |||
./waf install | |||
Compiler Configuration | |||
---------------------- | |||
Several standard environment variables can be used to control how compilers are | |||
invoked: | |||
* CC: Path to C compiler | |||
* CFLAGS: C compiler options | |||
* CXX: Path to C++ compiler | |||
* CXXFLAGS: C++ compiler options | |||
* CPPFLAGS: C preprocessor options | |||
* LINKFLAGS: Linker options | |||
Installation Directories | |||
------------------------ | |||
The --prefix option (or the PREFIX environment variable) can be used to change | |||
the prefix which all files are installed under. There are also several options | |||
allowing for more fine-tuned control, see the --help output for details. | |||
Packaging | |||
--------- | |||
Everything can be installed to a specific root directory by passing a --destdir | |||
option to the install stage (or setting the DESTDIR environment variable), | |||
which adds a prefix to all install paths. For example: | |||
./waf configure --prefix=/usr | |||
./waf | |||
./waf install --destdir=/tmp/package |
@@ -0,0 +1,90 @@ | |||
lilv (0.14.4) stable; | |||
* Deprecate old flawed Lilv::Instance constructors | |||
* Fix documentation for ui_type parameter of lilv_ui_is_supported() | |||
* Fix crash when lv2info is run with an invalid URI argument | |||
* Gracefully handle failure to save plugin state and print error message | |||
* Reduce memory usage (per node) | |||
* Simpler node implementation always backed by a SordNode | |||
* Make all 'zix' symbols private to avoid symbol clashes in static builds | |||
* Add lv2bench utility | |||
* Fix various hyper-strict warnings | |||
* Do not require a C++ compiler to build | |||
* Add option to build utilities as static binaries | |||
* Upgrade to waf 1.7.2 | |||
* lilvmm.hpp: Make Lilv::Instance handle features and failed instantiations | |||
* lilvmm.hpp: Add Lilv::Instance::get_handle() | |||
* lilvmm.hpp: Add Lilv::Instance::get_extension_data() | |||
-- David Robillard <d@drobilla.net> Thu, 23 Aug 2012 01:38:29 -0400 | |||
lilv (0.14.2) stable; | |||
* Fix dynmanifest support | |||
-- David Robillard <d@drobilla.net> Thu, 19 Apr 2012 16:11:31 -0400 | |||
lilv (0.14.0) stable; | |||
* Add lilv_plugin_get_extension_data | |||
* Use path variables in pkgconfig files | |||
* Install man page to DATADIR (e.g. PREFIX/share/man, not PREFIX/man) | |||
* Make Lilv::uri_to_path static inline (fix linking errors) | |||
* Use correct URI for dcterms:replaces (for hiding old plugins): | |||
"http://purl.org/dc/terms/replaces" | |||
* Fix compilation on BSD | |||
* Only load dynmanifest libraries once per bundle, not once per plugin | |||
* Fix lilv_world_find_nodes to work with wildcard subjects | |||
* Add lilv_plugin_get_related to get resources related to plugins that | |||
are not directly rdfs:seeAlso linked (e.g. presets) | |||
* Add lilv_world_load_resource for related resources (e.g. presets) | |||
* Print presets in lv2info | |||
* Remove locale smashing kludges and use new serd functions for converting | |||
nodes to/from numbers. | |||
* Add LilvState API for handling plugin state. This makes it simple to | |||
save and restore plugin state both in memory and on disk, as well as | |||
save presets in a host-sharable way since the disk format is identical | |||
to the LV2 presets format. | |||
* Update old references to lv2_list (now lv2ls) | |||
* Support compilation as C++ under MSVC++. | |||
* Remove use of wordexp. | |||
* Add lilv_plugin_get_port_by_designation() and lilv_port_get_index() as an | |||
improved generic alternative to lilv_plugin_get_latency_port_index(). | |||
* Add lilv_plugin_get_project() and get author information from project if | |||
it is not given directly on the plugin. | |||
-- David Robillard <d@drobilla.net> Wed, 18 Apr 2012 20:06:28 -0400 | |||
lilv (0.5.0) stable; | |||
* Remove glib dependency | |||
* Add lv2core as a pkg-config dependency (for lv2.h header include) | |||
* Obey prefix when installing bash completion script | |||
* Support integer minimum, maximum, and default port values in | |||
lilv_plugin_get_port_ranges_float | |||
* Add ability to build static library | |||
-- David Robillard <d@drobilla.net> Thu, 29 Sep 2011 00:00:00 -0400 | |||
lilv (0.4.4) stable; | |||
* Fix building python bindings | |||
* Make free methods tolerate being called on NULL | |||
* Remove lv2jack (replaced by jalv) | |||
* Fix parsing extra plugin data files in other bundles | |||
* Fix lilv_ui_is_supported when Lilv is built independently | |||
-- David Robillard <d@drobilla.net> Sat, 11 Jun 2011 11:20:11 -0400 | |||
lilv (0.4.2) stable; | |||
* Fix compilation issues on some systems | |||
* Fix build system Python 3 compatibility | |||
-- David Robillard <d@drobilla.net> Wed, 25 May 2011 19:00:00 -0400 | |||
lilv (0.4.0) stable; | |||
* Initial version (forked from SLV2) | |||
-- David Robillard <d@drobilla.net> Tue, 24 May 2011 23:00:00 -0400 |
@@ -0,0 +1,29 @@ | |||
This library is designed to allow parallel installation of different major | |||
versions. To facilitate this, the shared library name, include directory, and | |||
pkg-config file are suffixed with the major version number of the library. | |||
For example, if this library was named "foo" and at version 1.x.y: | |||
/usr/include/foo-1/foo/foo.h | |||
/usr/lib/foo-1.so.1.x.y | |||
/usr/lib/pkgconfig/foo-1.pc | |||
Dependencies check for pkg-config name "foo-1" and will build | |||
against a compatible version 1, regardless any other installed versions. | |||
*** IMPORTANT GUIDELINES FOR PACKAGERS *** | |||
Packages should follow the same conventions as above, i.e. include the major | |||
version (and only the major version) in the name of the package. Continuing the | |||
example above, the package(s) would be named foo-1 and foo-1-dev. This way, | |||
if/when version 2 comes out, it may be installed at the same time as version 1 | |||
without breaking anything. | |||
Please do not create packages of this library that do not follow these | |||
guidelines, you will break things and cause unnecessary headaches. Please do | |||
not use any number as a suffix other than the actual major version number of the | |||
upstream source package. | |||
Because program and documentation names are not versioned, these should be | |||
included in separate packages which may replace previous versions, since | |||
there is little use in having parallel installations of them. |
@@ -0,0 +1,11 @@ | |||
Lilv | |||
---- | |||
Lilv is a library for LV2 hosts intended to make using LV2 Plugins as simple | |||
as possible (without sacrificing capabilities). | |||
More information about LV2 plugins can be found at <http://lv2plug.in>. | |||
More information about Lilv can be found at <http://drobilla.net/software/lilv>. | |||
-- David Robillard <d@drobilla.net> |
@@ -0,0 +1,38 @@ | |||
%module lilv | |||
%{ | |||
#include "lilv/lilv.h" | |||
#include "lilv/lilvmm.hpp" | |||
%} | |||
%include "lilv/lilv.h" | |||
%include "lilv/lilvmm.hpp" | |||
namespace Lilv { | |||
%extend Plugins { | |||
%pythoncode %{ | |||
def __iter__(self): | |||
class Iterator(object): | |||
def __init__(self, plugins): | |||
self.plugins = plugins | |||
self.iter = plugins.begin() | |||
def next(self): | |||
self.iter = self.plugins.next(self.iter) | |||
if not self.plugins.is_end(self.iter): | |||
return self.plugins.get(self.iter) | |||
else: | |||
raise StopIteration | |||
return Iterator(self) | |||
%} | |||
}; | |||
%extend Node { | |||
%pythoncode %{ | |||
def __str__(self): | |||
return self.get_turtle_token() | |||
%} | |||
}; | |||
} /* namespace Lilv */ |
@@ -0,0 +1,96 @@ | |||
#!/usr/bin/env python | |||
# -*- coding: utf-8 -*- | |||
import math | |||
import lilv | |||
import sys | |||
import wave | |||
import numpy | |||
# Read command line arguments | |||
if len(sys.argv) != 4: | |||
print 'USAGE: lv2_apply.py PLUGIN_URI INPUT_WAV OUTPUT_WAV' | |||
sys.exit(1) | |||
# Initialise Lilv | |||
world = lilv.World() | |||
world.load_all() | |||
plugin_uri = world.new_uri(sys.argv[1]) | |||
wav_in_path = sys.argv[2] | |||
wav_out_path = sys.argv[3] | |||
# Find plugin | |||
plugin = world.get_all_plugins().get_by_uri(plugin_uri) | |||
if not plugin: | |||
print "Unknown plugin `%s'\n" % plugin_uri | |||
sys.exit(1) | |||
lv2_InputPort = world.new_uri(lilv.LILV_URI_INPUT_PORT) | |||
lv2_OutputPort = world.new_uri(lilv.LILV_URI_OUTPUT_PORT) | |||
lv2_AudioPort = world.new_uri(lilv.LILV_URI_AUDIO_PORT) | |||
n_audio_in = plugin.get_num_ports_of_class(lv2_InputPort, lv2_AudioPort) | |||
n_audio_out = plugin.get_num_ports_of_class(lv2_OutputPort, lv2_AudioPort) | |||
if n_audio_out == 0: | |||
print "Plugin has no audio outputs\n" | |||
sys.exit(1) | |||
# Open input file | |||
wav_in = wave.open(wav_in_path, 'r') | |||
if not wav_in: | |||
print "Failed to open input `%s'\n" % wav_in_path | |||
sys.exit(1) | |||
if wav_in.getnchannels() != n_audio_in: | |||
print "Input has %d channels, but plugin has %d audio inputs\n" % ( | |||
wav_in.getnchannels(), n_audio_in) | |||
sys.exit(1) | |||
# Open output file | |||
wav_out = wave.open(wav_out_path, 'w') | |||
if not wav_out: | |||
print "Failed to open output `%s'\n" % wav_out_path | |||
sys.exit(1) | |||
# Set output file to same format as input (except possibly nchannels) | |||
wav_out.setparams(wav_in.getparams()) | |||
wav_out.setnchannels(n_audio_out) | |||
rate = wav_in.getframerate() | |||
nframes = wav_in.getnframes() | |||
# Instantiate plugin | |||
instance = lilv.Instance(plugin, rate) | |||
def read_float(wf, nframes): | |||
wav = wf.readframes(nframes) | |||
if wf.getsampwidth() == 4: | |||
wav = wave.struct.unpack("<%ul" % (len(wav) / 4), wav) | |||
wav = [ i / float(math.pow(2, 32)) for i in wav ] | |||
elif wf.getsampwidth() == 2: | |||
wav = wave.struct.unpack("<%uh" % (len(wav) / 2), wav) | |||
wav = [ i / float(math.pow(2, 16)) for i in wav ] | |||
else: | |||
wav = wave.struct.unpack("%uB" % (len(wav)), wav) | |||
wav = [ s - 128 for s in wav ] | |||
wav = [ i / float(math.pow(2, 8)) for i in wav ] | |||
n_channels = wf.getnchannels() | |||
wavs = [] | |||
if n_channels > 1: | |||
for i in xrange(n_channels): | |||
wavs.append([ wav[j] for j in xrange(0, len(wav), n_channels) ]) | |||
else: | |||
wavs = [ wav ] | |||
return wavs | |||
in_buf = read_float(wav_in, nframes) | |||
# TODO: buffer marshaling | |||
#instance.connect_port(3, in_buf) | |||
print '%s => %s => %s @ %d Hz' % (wav_in_path, plugin.get_name(), wav_out_path, rate) | |||
instance.connect_port(3, in_buf) |
@@ -0,0 +1,9 @@ | |||
#!/usr/bin/env python | |||
import lilv | |||
world = lilv.World() | |||
world.load_all() | |||
for i in world.get_all_plugins(): | |||
print(i.get_uri()) |
@@ -0,0 +1,33 @@ | |||
.TH LV2INFO 1 "8 Jan 2012" | |||
.SH NAME | |||
.B lv2info \- print information about an installed LV2 plugin. | |||
.SH SYNOPSIS | |||
.B lv2info PLUGIN_URI | |||
.SH OPTIONS | |||
.TP | |||
\fB\-p FILE | |||
Write Turtle description of plugin to FILE | |||
.TP | |||
\fB\-m FILE | |||
Add record of plugin to manifest FILE | |||
.TP | |||
\fB\-\-help\fR | |||
Display help and exit | |||
.TP | |||
\fB\-\-version\fR | |||
Display version information and exit | |||
.SH SEE ALSO | |||
.BR lilv(3), | |||
.BR lv2ls(1) | |||
.SH AUTHOR | |||
lv2info was written by David Robillard <d@drobilla.net> | |||
.PP | |||
This manual page was written by Jaromรญr Mikes <mira.mikes@seznam.cz> | |||
and David Robillard <d@drobilla.net> |
@@ -0,0 +1,30 @@ | |||
.TH LV2LS 1 "17 Jan 2012" | |||
.SH NAME | |||
.B lv2ls \- List all installed LV2 plugins. | |||
.SH SYNOPSIS | |||
.B lv2ls [OPTION]... | |||
.SH OPTIONS | |||
.TP | |||
\fB\-n\fR, \fB\-\-names\fR | |||
Show names instead of URIs | |||
.TP | |||
\fB\-\-help\fR | |||
Display help and exit | |||
.TP | |||
\fB\-\-version\fR | |||
Display version information and exit | |||
.SH SEE ALSO | |||
.BR lilv(3), | |||
.BR lv2info(1) | |||
.SH AUTHOR | |||
lv2ls was written by David Robillard <d@drobilla.net> | |||
.PP | |||
This manual page was written by Jaromรญr Mikes <mira.mikes@seznam.cz> | |||
and David Robillard <d@drobilla.net> |
@@ -0,0 +1,563 @@ | |||
body { | |||
font-size: medium; | |||
font-family: sans-serif; | |||
} | |||
#top { | |||
background-color: #F3F3F3; | |||
margin: 0; | |||
padding: 0; | |||
border-bottom: 1px solid #DDD; | |||
margin-bottom: 1ex; | |||
font-size: xx-large; | |||
font-weight: bold; | |||
} | |||
div.header { | |||
display: none; | |||
} | |||
.tabs { | |||
display: none; | |||
} | |||
h1 h2 h3 h4 h5 h6 { | |||
font-weight: bold; | |||
} | |||
h1 { | |||
font-size: 164%; | |||
} | |||
h2 { | |||
font-size: 132%; | |||
} | |||
h3 { | |||
font-size: 124%; | |||
} | |||
h4 { | |||
font-size: 116%; | |||
} | |||
h5 { | |||
font-size: 108%; | |||
} | |||
h6 { | |||
font-size: 100%; | |||
} | |||
p { | |||
margin: 0 0 1ex 0; | |||
} | |||
br { | |||
display: none; | |||
} | |||
dt { | |||
font-weight: 700; | |||
} | |||
div.multicol { | |||
} | |||
p.startli,p.startdd,p.starttd { | |||
margin-top: 2px; | |||
} | |||
p.endli { | |||
margin-bottom: 0; | |||
} | |||
p.enddd { | |||
margin-bottom: 4px; | |||
} | |||
p.endtd { | |||
margin-bottom: 2px; | |||
} | |||
caption { | |||
font-weight: 700; | |||
} | |||
span.legend { | |||
font-size: 70%; | |||
text-align: center; | |||
} | |||
h3.version { | |||
font-size: 90%; | |||
text-align: center; | |||
} | |||
div.qindex,div.navtab { | |||
background-color: #EBEFF6; | |||
border: 1px solid #A3B4D7; | |||
text-align: center; | |||
margin: 2px; | |||
padding: 2px; | |||
} | |||
div.qindex,div.navpath { | |||
width: 100%; | |||
line-height: 140%; | |||
} | |||
div.navtab { | |||
margin-right: 15px; | |||
} | |||
/* @group Link Styling */ | |||
a { | |||
color: #3D8C57; | |||
text-decoration: none; | |||
} | |||
.contents a:visited { | |||
color: #50755E; | |||
} | |||
a:hover { | |||
text-decoration: underline; | |||
} | |||
a.qindexHL { | |||
background-color: #9CAFD4; | |||
color: #FFF; | |||
border: 1px double #869DCA; | |||
} | |||
a.code { | |||
color: #4665A2; | |||
} | |||
a.codeRef { | |||
color: #4665A2; | |||
} | |||
/* @end */ | |||
dl.el { | |||
margin-left: -1cm; | |||
} | |||
.fragment { | |||
font-family: monospace, fixed; | |||
font-size: 105%; | |||
} | |||
pre.fragment { | |||
border: 1px solid #C4C4C4; | |||
background-color: #F9F9F9; | |||
padding: 4px 6px; | |||
margin: 4px 8px 4px 2px; | |||
overflow: auto; | |||
font-size: 9pt; | |||
line-height: 125%; | |||
} | |||
div.ah { | |||
background-color: #000; | |||
font-weight: 700; | |||
color: #FFF; | |||
margin-bottom: 3px; | |||
margin-top: 3px; | |||
padding: .2em; | |||
border: thin solid #333; | |||
} | |||
div.groupHeader { | |||
margin-left: 16px; | |||
margin-top: 12px; | |||
margin-bottom: 6px; | |||
font-weight: 700; | |||
} | |||
div.groupText { | |||
margin-left: 16px; | |||
font-style: italic; | |||
} | |||
body { | |||
background: #FFF; | |||
color: #000; | |||
margin: 0; | |||
} | |||
div.contents { | |||
margin-top: 10px; | |||
margin-left: 10px; | |||
margin-right: 10px; | |||
} | |||
td.indexkey { | |||
background-color: #EBEFF6; | |||
font-weight: 700; | |||
border: 1px solid #C4CFE5; | |||
margin: 2px 0; | |||
padding: 2px 10px; | |||
} | |||
td.indexvalue { | |||
background-color: #EBEFF6; | |||
border: 1px solid #C4CFE5; | |||
padding: 2px 10px; | |||
margin: 2px 0; | |||
} | |||
tr.memlist { | |||
background-color: #EEF1F7; | |||
} | |||
p.formulaDsp { | |||
text-align: center; | |||
} | |||
img.formulaDsp { | |||
} | |||
img.formulaInl { | |||
vertical-align: middle; | |||
} | |||
div.center { | |||
text-align: center; | |||
margin-top: 0; | |||
margin-bottom: 0; | |||
padding: 0; | |||
} | |||
div.center img { | |||
border: 0; | |||
} | |||
address.footer { | |||
text-align: right; | |||
padding: 0 0.25em 0.25em 0; | |||
} | |||
img.footer { | |||
border: 0; | |||
vertical-align: middle; | |||
} | |||
/* @group Code Colorization */ | |||
span.keyword { | |||
color: green; | |||
} | |||
span.keywordtype { | |||
color: #604020; | |||
} | |||
span.keywordflow { | |||
color: #e08000; | |||
} | |||
span.comment { | |||
color: maroon; | |||
} | |||
span.preprocessor { | |||
color: #806020; | |||
} | |||
span.stringliteral { | |||
color: #002080; | |||
} | |||
span.charliteral { | |||
color: teal; | |||
} | |||
span.vhdldigit { | |||
color: #F0F; | |||
} | |||
span.vhdlkeyword { | |||
color: #700070; | |||
} | |||
span.vhdllogic { | |||
color: red; | |||
} | |||
/* @end */ | |||
td.tiny { | |||
font-size: 75%; | |||
} | |||
.dirtab { | |||
padding: 4px; | |||
border-collapse: collapse; | |||
border: 1px solid #A3B4D7; | |||
} | |||
th.dirtab { | |||
background: #EBEFF6; | |||
font-weight: 700; | |||
} | |||
hr { | |||
height: 0; | |||
border: none; | |||
border-top: 1px solid #DDD; | |||
margin: 2em 0 1em; | |||
} | |||
hr.footer { | |||
height: 1px; | |||
} | |||
/* @group Member Descriptions */ | |||
table.memberdecls { | |||
border-spacing: 0; | |||
font-size: small; | |||
} | |||
.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,.memTemplItemLeft,.memTemplItemRight,.memTemplParams { | |||
background-color: #FBFBFB; | |||
margin: 0; | |||
padding: 0.25ex; | |||
} | |||
.mdescLeft,.mdescRight { | |||
color: #555; | |||
} | |||
.memItemLeft,.memItemRight,.memTemplParams { | |||
border-top: 1px solid #DDD; | |||
} | |||
.memItemLeft,.memTemplItemLeft { | |||
white-space: nowrap; | |||
padding-left: 2em; | |||
} | |||
.memTemplParams { | |||
color: #464646; | |||
white-space: nowrap; | |||
} | |||
/* @end */ | |||
/* @group Member Details */ | |||
/* Styles for detailed member documentation */ | |||
.memtemplate { | |||
font-size: 80%; | |||
color: #4665A2; | |||
font-weight: bold; | |||
} | |||
.memnav { | |||
background-color: #EBEFF6; | |||
border: 1px solid #A3B4D7; | |||
text-align: center; | |||
margin: 2px; | |||
margin-right: 15px; | |||
padding: 2px; | |||
} | |||
.memitem { | |||
padding: 0; | |||
margin: 1ex 0 2ex 0; | |||
border: 1px solid #CCC; | |||
} | |||
.memname { | |||
white-space: nowrap; | |||
font-weight: bold; | |||
} | |||
.memproto { | |||
border-bottom: 1px solid #DDD; | |||
padding: 0.5ex; | |||
font-weight: bold; | |||
background-color: #F3F3F3; | |||
} | |||
.memdoc { | |||
padding: 1ex; | |||
background-color: #FBFBFB; | |||
border-top-width: 0; | |||
} | |||
.paramkey { | |||
text-align: right; | |||
} | |||
.paramtype { | |||
white-space: nowrap; | |||
} | |||
.paramname { | |||
color: #602020; | |||
white-space: nowrap; | |||
} | |||
.paramname em { | |||
font-style: normal; | |||
} | |||
/* @end */ | |||
/* @group Directory (tree) */ | |||
/* for the tree view */ | |||
.ftvtree { | |||
font-family: sans-serif; | |||
margin: 0; | |||
} | |||
/* these are for tree view when used as main index */ | |||
.directory { | |||
font-size: 9pt; | |||
font-weight: bold; | |||
margin: 5px; | |||
} | |||
.directory h3 { | |||
margin: 0; | |||
margin-top: 1em; | |||
font-size: 11pt; | |||
} | |||
.directory > h3 { | |||
margin-top: 0; | |||
} | |||
.directory p { | |||
margin: 0; | |||
white-space: nowrap; | |||
} | |||
.directory div { | |||
display: none; | |||
margin: 0; | |||
} | |||
.directory img { | |||
vertical-align: -30%; | |||
} | |||
/* these are for tree view when not used as main index */ | |||
.directory-alt { | |||
font-size: 100%; | |||
font-weight: bold; | |||
} | |||
.directory-alt h3 { | |||
margin: 0; | |||
margin-top: 1em; | |||
font-size: 11pt; | |||
} | |||
.directory-alt > h3 { | |||
margin-top: 0; | |||
} | |||
.directory-alt p { | |||
margin: 0; | |||
white-space: nowrap; | |||
} | |||
.directory-alt div { | |||
display: none; | |||
margin: 0; | |||
} | |||
.directory-alt img { | |||
vertical-align: -30%; | |||
} | |||
/* @end */ | |||
div.dynheader { | |||
margin-top: 8px; | |||
} | |||
address { | |||
font-style: normal; | |||
color: #2A3D61; | |||
} | |||
table.doxtable { | |||
border-collapse: collapse; | |||
margin: 0.5ex; | |||
} | |||
table.doxtable td,table.doxtable th { | |||
border: 1px solid #DDD; | |||
padding: 3px 7px 2px; | |||
} | |||
table.doxtable th { | |||
background-color: #F3F3F3; | |||
color: #000; | |||
padding-bottom: 4px; | |||
padding-top: 5px; | |||
text-align: left; | |||
font-weight: bold; | |||
} | |||
.tabsearch { | |||
top: 0; | |||
left: 10px; | |||
height: 36px; | |||
z-index: 101; | |||
overflow: hidden; | |||
font-size: 13px; | |||
} | |||
.navpath ul { | |||
font-size: 11px; | |||
height: 30px; | |||
line-height: 30px; | |||
color: #8AA0CC; | |||
border: 1px solid #C2CDE4; | |||
overflow: hidden; | |||
margin: 0; | |||
padding: 0; | |||
} | |||
.navpath li { | |||
list-style-type: none; | |||
float: left; | |||
padding-left: 10px; | |||
padding-right: 15px; | |||
color: #364D7C; | |||
} | |||
.navpath a { | |||
height: 32px; | |||
display: block; | |||
text-decoration: none; | |||
outline: none; | |||
} | |||
.navpath a:hover { | |||
color: #6884BD; | |||
} | |||
div.summary { | |||
float: right; | |||
font-size: 8pt; | |||
padding-right: 5px; | |||
width: 50%; | |||
text-align: right; | |||
} | |||
div.summary a { | |||
white-space: nowrap; | |||
} | |||
div.header { | |||
background-color: #F3F3F3; | |||
margin: 0; | |||
border-bottom: 1px solid #DDD; | |||
} | |||
div.headertitle { | |||
padding: 5px 5px 5px 10px; | |||
font-size: 180%; | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,11 @@ | |||
prefix=@PREFIX@ | |||
exec_prefix=@EXEC_PREFIX@ | |||
libdir=@LIBDIR@ | |||
includedir=@INCLUDEDIR@ | |||
Name: Lilv | |||
Version: @LILV_VERSION@ | |||
Description: Simple C library for hosting LV2 plugins | |||
Requires: lv2core @LILV_PKG_DEPS@ | |||
Libs: -L${libdir} -l@LIB_LILV@ -ldl | |||
Cflags: -I${includedir}/lilv-@LILV_MAJOR_VERSION@ |
@@ -0,0 +1,29 @@ | |||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |||
@prefix : <http://usefulinc.com/ns/doap#> . | |||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |||
<http://drobilla.net/software/lilv> | |||
a :Project ; | |||
:bug-database <http://dev.drobilla.net/query?status=new&status=assigned&status=reopened&component=LILV&order=priority> ; | |||
:developer [ | |||
a foaf:Person ; | |||
rdfs:seeAlso <http://drobilla.net/drobilla.rdf> ; | |||
foaf:homepage <http://drobilla.net> ; | |||
foaf:mbox_sha1sum "253b3c58086250260bac1232d744d150274ad308" ; | |||
foaf:name "David Robillard" | |||
] ; | |||
:download-page <http://download.drobilla.net> ; | |||
:homepage <http://drobilla.net/software/lilv> ; | |||
:license <http://usefulinc.com/doap/licenses/gpl> ; | |||
:name "LILV" ; | |||
:programming-language "C", "Turtle" ; | |||
:repository [ | |||
:browse <http://dev.drobilla.net/browser/trunk/lilv> ; | |||
:location <http://svn.drobilla.net/lad/trunk/lilv> ; | |||
a :SVNRepository | |||
] ; | |||
:shortdesc "Library for simple use of LV2 plugins" ; | |||
:shortname "LILV" . | |||
@@ -0,0 +1,332 @@ | |||
/* | |||
Copyright 2007-2011 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_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_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(char*, node, get_turtle_token); | |||
LILV_WRAP0(bool, node, is_uri); | |||
LILV_WRAP0(const char*, node, as_uri); | |||
LILV_WRAP0(bool, node, is_blank); | |||
LILV_WRAP0(const char*, node, as_blank); | |||
LILV_WRAP0(bool, node, is_literal); | |||
LILV_WRAP0(bool, node, is_string); | |||
LILV_WRAP0(const char*, node, as_string); | |||
LILV_WRAP0(bool, node, is_float); | |||
LILV_WRAP0(float, node, as_float); | |||
LILV_WRAP0(bool, node, is_int); | |||
LILV_WRAP0(int, node, as_int); | |||
LILV_WRAP0(bool, node, is_bool); | |||
LILV_WRAP0(bool, node, as_bool); | |||
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); \ | |||