Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/Clooper
diff options
context:
space:
mode:
authorOli <olpc@localhost.localdomain>2007-02-28 01:47:09 (GMT)
committer Oli <olpc@localhost.localdomain>2007-02-28 01:47:09 (GMT)
commitad0a0e5f5cb7584dc6e3295883a6e4a060d763b4 (patch)
tree41ea0605675eb1fb75819c8e8c8a7cd1753bad2b /Util/Clooper
parentefde4e823dc4418763514e0634fc3c1393ba36d8 (diff)
synthLabParametersWindow and track volumes
Diffstat (limited to 'Util/Clooper')
-rw-r--r--Util/Clooper/aclient.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/Util/Clooper/aclient.cpp b/Util/Clooper/aclient.cpp
index 6b830c1..31b9c67 100644
--- a/Util/Clooper/aclient.cpp
+++ b/Util/Clooper/aclient.cpp
@@ -591,6 +591,24 @@ thread_fn_cleanup:
}
}
+ void setTrackVolume(MYFLT vol, int Id)
+ {
+ if (!csound) {
+ fprintf(stderr, "skipping %s, csound==NULL\n", __FUNCTION__);
+ return ;
+ }
+ MYFLT *p;
+ char buf[128];
+ sprintf( buf, "trackVolume%i", Id);
+ fprintf(stderr, "DEBUG: setTrackvolume string [%s]\n", buf);
+ if (!(csoundGetChannelPtr(csound, &p, buf, CSOUND_CONTROL_CHANNEL | CSOUND_INPUT_CHANNEL)))
+ *p = (MYFLT) vol;
+ else
+ {
+ if (_debug) fprintf(_debug, "ERROR: failed to set track volume\n");
+ }
+ }
+
void setTrackpadX(MYFLT value)
{
if (!csound) {
@@ -738,6 +756,18 @@ DECL(sc_setMasterVolume) //(float v)
Py_INCREF(Py_None);
return Py_None;
}
+DECL(sc_setTrackVolume) //(float v)
+{
+ float v;
+ int i;
+ if (!PyArg_ParseTuple(args, "fi", &v, &i))
+ {
+ return NULL;
+ }
+ sc_tt->setTrackVolume(v,i);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
DECL(sc_setTrackpadX) //(float v)
{
float v;
@@ -893,6 +923,7 @@ static PyMethodDef SpamMethods[] = {
{"sc_stop", sc_stop, METH_VARARGS,""},
{"sc_scoreEvent", sc_scoreEvent, METH_VARARGS, ""},
{"sc_setMasterVolume", sc_setMasterVolume, METH_VARARGS, ""},
+ {"sc_setTrackVolume", sc_setTrackVolume, METH_VARARGS, ""},
{"sc_setTrackpadX", sc_setTrackpadX, METH_VARARGS, ""},
{"sc_setTrackpadY", sc_setTrackpadY, METH_VARARGS, ""},
MDECL(sc_loop_getTick)