Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh solo button on OSC Message #7438

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions scripts/osc-tests/OSC_test_solo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from osc4py3.as_eventloop import *
from osc4py3 import oscbuildparse as obp
from osc4py3.oscmethod import *
import time

def set_solo(val):
print("Setting solo to ", val)
msg = obp.OSCMessage("/param/a/mixer/osc1/solo", ",f", [val])
osc_send(msg, "oscout")
osc_process()

### config
ip = "127.0.0.1"
surgeOSCInPort = 53280 #Surge XT default OSC in port

osc_startup()
osc_udp_client(ip, surgeOSCInPort, "oscout")

for i in range(40):
set_solo(False)
time.sleep(2)
set_solo(True)
time.sleep(2)

set_solo(False)


osc_terminate()
9 changes: 9 additions & 0 deletions src/surge-xt/SurgeSynthProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,15 @@ void SurgeSynthProcessor::processBlockOSC()
pval = Parameter::intScaledToFloat(pval, om.param->val_max.i, om.param->val_min.i);
surge->setParameter01(surge->idForParameter(om.param), pval, true);
surge->storage.getPatch().isDirty = true;

// Special cases: A few control types require a rebuild and
// SGE Value Callbacks would do it as would the VST3 param handler
// so put them here for now. Bit of a hack...
auto ct = om.param->ctrltype;
if (ct == ct_bool_solo || ct == ct_bool_mute || ct == ct_scenesel)
{
surge->refresh_editor = true;
}
}
break;

Expand Down