-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
carla-vst: expose first plugin params for host automation; cleanup
Signed-off-by: falkTX <[email protected]>
- Loading branch information
Showing
24 changed files
with
942 additions
and
641 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugin API | ||
* Copyright (C) 2012-2014 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -199,7 +199,8 @@ typedef struct { | |
const char* (*ui_open_file)(NativeHostHandle handle, bool isDir, const char* title, const char* filter); | ||
const char* (*ui_save_file)(NativeHostHandle handle, bool isDir, const char* title, const char* filter); | ||
|
||
intptr_t (*dispatcher)(NativeHostHandle handle, NativeHostDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | ||
intptr_t (*dispatcher)(NativeHostHandle handle, | ||
NativeHostDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | ||
|
||
} NativeHostDescriptor; | ||
|
||
|
@@ -244,12 +245,15 @@ typedef struct _NativePluginDescriptor { | |
|
||
void (*activate)(NativePluginHandle handle); | ||
void (*deactivate)(NativePluginHandle handle); | ||
void (*process)(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount); | ||
void (*process)(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount); | ||
|
||
char* (*get_state)(NativePluginHandle handle); | ||
void (*set_state)(NativePluginHandle handle, const char* data); | ||
|
||
intptr_t (*dispatcher)(NativePluginHandle handle, NativePluginDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | ||
intptr_t (*dispatcher)(NativePluginHandle handle, | ||
NativePluginDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | ||
|
||
} NativePluginDescriptor; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2013-2018 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2013-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -118,7 +118,8 @@ class AudioFilePlugin : public NativePluginClass, | |
// ------------------------------------------------------------------- | ||
// Plugin process calls | ||
|
||
void process(float**, float** const outBuffer, const uint32_t frames, const NativeMidiEvent*, uint32_t) override | ||
void process(const float**, float** const outBuffer, const uint32_t frames, | ||
const NativeMidiEvent*, uint32_t) override | ||
{ | ||
const NativeTimeInfo* const timePos(getTimeInfo()); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2017 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -154,7 +154,8 @@ class BigMeterPlugin : public NativePluginAndUiClass | |
fOutRight = 0.0f; | ||
} | ||
|
||
void process(float** inputs, float**, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override | ||
void process(const float** inputs, float**, const uint32_t frames, | ||
const NativeMidiEvent* const, const uint32_t) override | ||
{ | ||
fOutLeft = carla_findMaxNormalizedFloat(inputs[0], frames); | ||
fOutRight = carla_findMaxNormalizedFloat(inputs[1], frames); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2014 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -30,9 +30,12 @@ static NativePluginHandle bypass_instantiate(const NativeHostDescriptor* host) | |
(void)host; | ||
} | ||
|
||
static void bypass_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
static void bypass_process(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
{ | ||
memcpy(outBuffer[0], inBuffer[0], sizeof(float)*frames); | ||
if (outBuffer[0] != inBuffer[0]) | ||
memcpy(outBuffer[0], inBuffer[0], sizeof(float)*frames); | ||
return; | ||
|
||
// unused | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2015 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -106,7 +106,9 @@ static void midichanfilter_set_parameter_value(NativePluginHandle handle, uint32 | |
handlePtr->channels[index] = (value >= 0.5f); | ||
} | ||
|
||
static void midichanfilter_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
static void midichanfilter_process(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
{ | ||
const NativeHostDescriptor* const host = handlePtr->host; | ||
const bool* const channels = handlePtr->channels; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2014 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -168,7 +168,9 @@ static void midigain_set_parameter_value(NativePluginHandle handle, uint32_t ind | |
} | ||
} | ||
|
||
static void midigain_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
static void midigain_process(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
{ | ||
const NativeHostDescriptor* const host = handlePtr->host; | ||
const float gain = handlePtr->gain; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2018 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -47,7 +47,9 @@ static void midijoin_cleanup(NativePluginHandle handle) | |
free(handlePtr); | ||
} | ||
|
||
static void midijoin_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
static void midijoin_process(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
{ | ||
const NativeHostDescriptor* const host = handlePtr->host; | ||
NativeMidiEvent tmpEvent; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2014 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -46,7 +46,9 @@ static void midisplit_cleanup(NativePluginHandle handle) | |
free(handlePtr); | ||
} | ||
|
||
static void midisplit_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
static void midisplit_process(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
{ | ||
const NativeHostDescriptor* const host = handlePtr->host; | ||
NativeMidiEvent tmpEvent; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2014 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -46,7 +46,9 @@ static void midithrough_cleanup(NativePluginHandle handle) | |
free(handlePtr); | ||
} | ||
|
||
static void midithrough_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
static void midithrough_process(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
{ | ||
const NativeHostDescriptor* const host = handlePtr->host; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2018 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -130,7 +130,9 @@ static void miditranspose_set_parameter_value(NativePluginHandle handle, uint32_ | |
} | ||
} | ||
|
||
static void miditranspose_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
static void miditranspose_process(NativePluginHandle handle, | ||
const float** inBuffer, float** outBuffer, uint32_t frames, | ||
const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | ||
{ | ||
const NativeHostDescriptor* const host = handlePtr->host; | ||
const int octaves = handlePtr->octaves; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Carla Native Plugins | ||
* Copyright (C) 2012-2014 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -83,7 +83,7 @@ class NotesPlugin : public NativePluginAndUiClass | |
// ------------------------------------------------------------------- | ||
// Plugin process calls | ||
|
||
void process(float**, float**, const uint32_t, const NativeMidiEvent* const, const uint32_t) override | ||
void process(const float**, float**, const uint32_t, const NativeMidiEvent* const, const uint32_t) override | ||
{ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.