-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update/DrumKit
- Loading branch information
Showing
21 changed files
with
104 additions
and
90 deletions.
There are no files selected for viewing
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
Submodule carla
updated
68 files
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
Submodule Befaco
updated
16 files
+20 −0 | CHANGELOG.md | |
+28 −0 | docs/MIDIThingV2.md | |
+ − | docs/img/MidiThingV2.png | |
+ − | docs/img/UpdateRate.png | |
+ − | docs/img/UpdateRatesScope.png | |
+ − | docs/img/VoltageRange.png | |
+26 −2 | plugin.json | |
+5,595 −0 | res/panels/MidiThing.svg | |
+2,383 −0 | res/panels/Octaves.svg | |
+4 −4 | src/ADSR.cpp | |
+1 −1 | src/Burst.cpp | |
+823 −0 | src/MidiThing.cpp | |
+336 −0 | src/Octaves.cpp | |
+5 −14 | src/Voltio.cpp | |
+2 −0 | src/plugin.cpp | |
+7 −5 | src/plugin.hpp |
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
Submodule Sapphire
updated
59 files
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
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,18 +1,7 @@ | ||
/* | ||
* DISTRHO Cardinal Plugin | ||
* Copyright (C) 2021-2024 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 | ||
* published by the Free Software Foundation; either version 3 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 LICENSE file. | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
*/ | ||
|
||
#include <engine/Engine.hpp> | ||
|
@@ -40,6 +29,12 @@ | |
# include <lo/lo.h> | ||
#endif | ||
|
||
namespace rack { | ||
namespace engine { | ||
void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*); | ||
} | ||
} | ||
|
||
// ----------------------------------------------------------------------------------------------------------- | ||
|
||
namespace remoteUtils { | ||
|
@@ -53,8 +48,15 @@ static int osc_handler(const char* const path, const char* const types, lo_arg** | |
{ | ||
d_stdout("osc_handler(\"%s\", ...) - got resp | '%s' '%s'", path, &argv[0]->s, &argv[1]->s); | ||
|
||
if (std::strcmp(&argv[0]->s, "hello") == 0 && std::strcmp(&argv[1]->s, "ok") == 0) | ||
static_cast<RemoteDetails*>(self)->connected = true; | ||
if (std::strcmp(&argv[0]->s, "hello") == 0) | ||
{ | ||
if (std::strcmp(&argv[1]->s, "ok") == 0) | ||
static_cast<RemoteDetails*>(self)->connected = true; | ||
} | ||
else if (std::strcmp(&argv[0]->s, "features") == 0) | ||
{ | ||
static_cast<RemoteDetails*>(self)->screenshot = std::strstr(&argv[1]->s, ":screenshot:") != nullptr; | ||
} | ||
} | ||
return 0; | ||
} | ||
|
@@ -92,8 +94,10 @@ bool connectToRemote(const char* const url) | |
ui->remoteDetails = remoteDetails = new RemoteDetails; | ||
remoteDetails->handle = ui; | ||
remoteDetails->url = strdup(url); | ||
remoteDetails->connected = true; | ||
remoteDetails->autoDeploy = true; | ||
remoteDetails->connected = true; | ||
remoteDetails->first = false; | ||
remoteDetails->screenshot = false; | ||
} | ||
#elif defined(HAVE_LIBLO) | ||
const lo_address addr = lo_address_new_from_url(url); | ||
|
@@ -107,10 +111,16 @@ bool connectToRemote(const char* const url) | |
ui->remoteDetails = remoteDetails = new RemoteDetails; | ||
remoteDetails->handle = oscServer; | ||
remoteDetails->url = strdup(url); | ||
remoteDetails->autoDeploy = true; | ||
remoteDetails->first = true; | ||
remoteDetails->connected = false; | ||
remoteDetails->autoDeploy = false; | ||
remoteDetails->screenshot = false; | ||
|
||
lo_server_add_method(oscServer, "/resp", nullptr, osc_handler, remoteDetails); | ||
|
||
sendFullPatchToRemote(remoteDetails); | ||
|
||
Engine_setRemoteDetails(context->engine, remoteDetails); | ||
} | ||
else if (std::strcmp(remoteDetails->url, url) != 0) | ||
{ | ||
|
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,18 +1,7 @@ | ||
/* | ||
* DISTRHO Cardinal Plugin | ||
* Copyright (C) 2021-2023 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 | ||
* published by the Free Software Foundation; either version 3 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 LICENSE file. | ||
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]> | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
*/ | ||
|
||
#pragma once | ||
|
@@ -27,8 +16,10 @@ namespace remoteUtils { | |
struct RemoteDetails { | ||
void* handle; | ||
const char* url; | ||
bool connected; | ||
bool autoDeploy; | ||
bool first; | ||
bool connected; | ||
bool screenshot; | ||
}; | ||
|
||
RemoteDetails* getRemote(); | ||
|
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,18 +1,7 @@ | ||
/* | ||
* DISTRHO Cardinal Plugin | ||
* Copyright (C) 2021-2023 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 | ||
* published by the Free Software Foundation; either version 3 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 LICENSE file. | ||
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]> | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
*/ | ||
|
||
/** | ||
|
@@ -295,7 +284,7 @@ static void Engine_stepFrame(Engine* that) { | |
Param* smoothParam = &smoothModule->params[smoothParamId]; | ||
float value = smoothParam->value; | ||
float newValue; | ||
if (internal->remoteDetails != nullptr) { | ||
if (internal->remoteDetails != nullptr && internal->remoteDetails->connected) { | ||
newValue = value; | ||
sendParamChangeToRemote(internal->remoteDetails, smoothModule->id, smoothParamId, value); | ||
} else { | ||
|
@@ -1094,7 +1083,7 @@ void Engine::setParamValue(Module* module, int paramId, float value) { | |
internal->smoothModule = NULL; | ||
internal->smoothParamId = 0; | ||
} | ||
if (internal->remoteDetails != nullptr) { | ||
if (internal->remoteDetails != nullptr && internal->remoteDetails->connected) { | ||
sendParamChangeToRemote(internal->remoteDetails, module->id, paramId, value); | ||
} | ||
module->params[paramId].setValue(value); | ||
|
Oops, something went wrong.