scztt / connection.quark Goto Github PK
View Code? Open in Web Editor NEWA library for creating and managing connections and synchronization between SC objects.
A library for creating and managing connections and synchronization between SC objects.
I modified the example in the "Control values" section of the overview to include initial values.
The number boxes show the correct initial value but the sliders are not updated and remain at "zero".
MacOS: 10.15.7
Supercollider: 3.12.0
(
~controls = [
~amp = NumericControlValue(0.5, spec:ControlSpec(0, 1, default:1)),
~freq = NumericControlValue(10, spec:ControlSpec(1, 20, default:1)),
~delay = NumericControlValue(1, spec:ControlSpec(0.05, 2, default:0.3)),
~decay = NumericControlValue(5, spec:ControlSpec(1, 8, default:5)),
~filterFreq = NumericControlValue(5000, spec:ControlSpec(2000, 10000, default:8000)),
];
~view = View(bounds:600@200).layout_(GridLayout.rows(
~sliders = 5.collect { Slider() },
~numbers = 5.collect { NumberBox() }
)).front;
~view.onClose = { ~synth.free; ~connections.disconnect };
~connections = ConnectionList.makeWith {
~controls.connectEach(\input, ~sliders, _.valueSlot);
~controls.connectEach(\value, ~numbers, _.valueSlot);
~sliders.connectEach(\value, ~controls, _.inputSlot);
~numbers.connectEach(\value, ~controls, _.valueSlot);
};
)
Hello,
I'm getting a recompile error when attempting to install this quark.
The setFrom method already exists in the SCClassLibrary.
I checked the source code, seems both are the same. Is it possible to remove this class file from your quark?
Boris
in the Connection overview helpfile, under "Connecting multiple objects":
The Connection: -connectTo method can take multiple objects, and will connect all of them. This makes it easy to create a one-to-many connection. For example: slider.connectAll(a, b, c).
I think this should be slider.connectTo(a, b, c)
... and in Connection helpfile,
Creating a connection using:

Connection(obj, dependantm, autoConnect:true)
is roughly equivalent to calling

obj.addDependant(dependant);
I think depandantm
should be dependant
There are a number of inline warnings (try switching on inline warnings to see them):
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Connection/Connection.sc'
line 62 char 30:
^object.dependants !? { |d| d.includes(dependant) } ?? false;
}
-----------------------------------
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Connection/Connection.sc'
line 141 char 36:
var tempTrace = traceConnection;
traceConnection = nil;
-----------------------------------
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Singleton/Singleton.sc'
line 75 char 40:
var key = dict.findKeyForValue(sing);
if (key.notNil) {
-----------------------------------
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Connection/UpdateDispatcher.sc'
line 19 char 0:
|d|
d.free;
-----------------------------------
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Connection/UpdateDispatcher.sc'
line 76 char 0:
|item|
item.update(obj, changed, *args);
-----------------------------------
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Connection/UpdateDispatcher.sc'
line 83 char 33:
^dispatchTable[obj] !? { |conn| conn.dependant.connectionTraceString(obj, what) } ?? { "%(%) - no target".format(this.class, this.identityHash) }
}
-----------------------------------
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Connection/UpdateForwarder.sc'
line 196 char 44:
var tmpdeferredUpdate = deferredUpdate;
deferredUpdate = nil;
-----------------------------------
WARNING: FunctionDef contains variable declarations and so will not be inlined.
in file '~/Library/Application Support/SuperCollider/downloaded-quarks/Connection/extDictionary.sc'
line 8 char 36:
var newVal = defaultFunc.value();
this.put(key, newVal);
-----------------------------------
Using the current development branch, after Quarks.install("Connection")
and recompiling the class library, I get:
ERROR: duplicate Class found: 'UnitTest'
/home/dlm/share/supercollider/SCClassLibrary/Common/UnitTesting/UnitTest.sc
/home/dlm/.local/share/SuperCollider/downloaded-quarks/UnitTesting/UnitTest.sc
ERROR: duplicate Class found: 'UnitTestResult'
/home/dlm/share/supercollider/SCClassLibrary/Common/UnitTesting/UnitTest.sc
/home/dlm/.local/share/SuperCollider/downloaded-quarks/UnitTesting/UnitTest.sc
ERROR: duplicate Class found: 'UnitTestScript'
/home/dlm/share/supercollider/SCClassLibrary/Common/UnitTesting/UnitTest.sc
/home/dlm/.local/share/SuperCollider/downloaded-quarks/UnitTesting/UnitTest.sc
ERROR: duplicate Class found: 'MixedBundleTester'
/home/dlm/share/supercollider/SCClassLibrary/Common/UnitTesting/MixedBundleTester.sc
/home/dlm/.local/share/SuperCollider/downloaded-quarks/UnitTesting/MixedBundleTester.sc
Compiling directory '/home/dlm/.local/share/SuperCollider/downloaded-quarks/Singleton'
Compiling directory '/home/dlm/.local/share/SuperCollider/downloaded-quarks/FreeAfter'
Compiling directory '/home/dlm/.local/share/SuperCollider/downloaded-quarks/Connection'
ERROR: Parse error
in file '/home/dlm/.local/share/SuperCollider/downloaded-quarks/Connection/ControlValue.sc'
line 260 char 3:
}
^
}
-----------------------------------
unmatched '}'
in file '/home/dlm/.local/share/SuperCollider/downloaded-quarks/Connection/ControlValue.sc' line 260 char 3
Expected class name. got token: '}' 280
in file '/home/dlm/.local/share/SuperCollider/downloaded-quarks/Connection/ControlValue.sc'
line 260 char 3:
}
^
}
-----------------------------------
The duplicate class problem is known (cross-version compatibility nightmares, again). But, adding UnitTesting as a dependent should be conditional, based on the SC version. (Admittedly that's a bit kludgey, but I don't anticipate a proper solution in Quarks anytime soon. I know what to do about this but new users will not.)
The syntax error, I don't know. I guess a typo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.