Comments (4)
Hmm. There's a little bit in the ProxySpace docs here about it under 'nodeproxy with numbers as input', but it doesn't seem to do what the document suggests it does...
What will using an array of proxies give you, just so I have an idea? e.g. why not just this:
(
~s0 = Pbind(\instrument,\default,\dur,Pseq([0.5,Pseq([1],inf)],inf),\amp,1);
~s0.play;
~s1 = { Pulse.ar(130, Saw.kr(0.3)) * 0.1 };
~s1.play;
// Then be able to change:
~s0 = Pbind(\instrument,\default,\dur,Pseq([0.5,Pseq([0.25],inf)],inf),\amp,1);
)
from howto_co34pt_livecode.
Yes, nodeproxy with numbers as input isn't clear..
Array of proxies is more dynamically for control the volume with midi knobs, for example. Or iterate with a Task and changing randomly each node
// The initial solution is
p = ProxySpace.push(s.boot);
(
m = Dictionary.new;
m.add(\assign -> { |i, val| switch( i,
0, { ~s0 = val },
1, { ~s1 = val },
2, { ~s2 = val },
3, { ~s3 = val })
});
m.add(\play -> { |i| switch( i,
0, { ~s0.play },
1, { ~s1.play },
2, { ~s2.play },
3, { ~s3.play })
});
m.add(\set -> { |i, name, val| switch( i,
0, { ~s0.set(name, val) },
1, { ~s1.set(name, val) },
2, { ~s2.set(name, val) },
3, { ~s3.set(name, val) })
});
)
// Then..
m[\assign].value(0, { |freq=500, ffreq=120| SinOsc.ar(freq*[1,1.1], SinOsc.ar(ffreq, 0, pi), 0.2) });
m[\play].value(0);
m[\set].value(0, \freq, 400+100.rand2 );
from howto_co34pt_livecode.
Okay, finally getting back to this. The reason Proxies don't work in an array is because of this.
http://doc.sccode.org/Reference/NodeProxy_roles.html
You use the array indexes for performing various roles upon NodeProxies. Got tipped off about this recently by @datamads and @lvm
So, for example, if you wanted to add a effects to ~s
you would use \filterIn
~s[0] = Pbind(\instrument,\default,\amp,0.3);
~s.play;
//add reverb
~s[1] = \filterIn -> {|in| FreeVerb.ar(in,0.6,0.9,0.2)};
//add delay to that
~s[2] = \filterIn -> {|in| CombC.ar(in,0.3,0.2,10)};
//change the wet/dry of `~s[2]` as CombC doesn't pass the original signal
~s.set(\wet2,0.5)
I'll be adding a section about this because it really changes how i've been using effects.
from howto_co34pt_livecode.
It is a good feature anyway!! 😃
For my part, I solved it using a ProxySpace in a variable, then building the Symbol, for ejample:
var func;
p = ProxySpace.new(s);
func = { |index|
var node = ("s" ++ index).asSymbol; // basically
p[node] = { Pulse.ar(130, Saw.kr(0.3)) * 0.1 };
p[node].play;
};
func.value(1);
Thanks a lot!
from howto_co34pt_livecode.
Related Issues (9)
- There is a typo in readme.md
- Can't extract/clone files on windows HOT 2
- Single letter names for Proxies HOT 1
- 404: Missing links from ProxySpace page HOT 1
- PDF Version HOT 3
- thisProcess.nowExecutingPath returns nil in SC VIM HOT 3
- howto_co34pt_liveCode/samples/set1/k/2-by-adamskitek.wav is empty HOT 2
- Quarks.install("ddwSnippets") OSX issue HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from howto_co34pt_livecode.