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

Topic/bounded controls: cleaned up branch ready. #1270

Merged
merged 3 commits into from
Feb 8, 2015

Conversation

telephon
Copy link
Member

This is a cleaned up version of the old branch bounded-controls. It fixes #1252.

Julian Rohrhuber added 2 commits November 30, 2014 11:45
Prevent multichannel control mapping from spilling over. This fixes #1252.
@telephon
Copy link
Member Author

Here are the tests from the discussion:

s.reboot

(
var target = Bus(\audio, 2, 4, s),
bus,
freq = 6,
synthTarget = s.defaultGroup;

c = s.controlBusAllocator.alloc(5);

bus = Bus.control(s, 4);

b = bus;

x = Synth.basicNew(\x, s, 1000);

SynthDef(\x, {
    arg bus, kbus, t_trig;  // t_trig lets client control timing/reset of Peak
    var sig;
    sig = Peak.ar(In.ar(bus, target.numChannels), T2A.ar(t_trig));
    Out.kr(kbus, sig);
}).send(target.server,
    x.newMsg(synthTarget, [\bus, target.index, \kbus, bus.index, \freq, freq],
        \addToTail).debug("the outgoing arg list is correct"));
)

// should return:
// the outgoing arg list is correct: 9, x, 1000, 1, 1, bus, 2, kbus, 10, freq, 6

s.queryAllNodes(true);


// shouldn't change frequency
x = {|mul = #[0.1, 0.2], freq = 440| SinOsc.ar(freq, 0, mul) }.play
x.set(\mul, [0.2, 0.1, 800])

// shouldn't change frequency
a = Bus.audio(s, 2);
x = { Out.ar(a, PinkNoise.ar(1 ! 2) * LFNoise1.kr(1)) }.play;
y = {  Ringz.ar(\in.ar, [700, 1400] * (\freq.ar + 1), 0.1) * 0.1 }.play;
y.map(\in, a);

@telephon
Copy link
Member Author

ping?


typedef struct IndexMap {
uint32 index;
uint32 mIndex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is index, what is mIndex? m is a common prefix for "member", though both are members. maybe there are more expressive names?

@telephon
Copy link
Member Author

better? For index I didn't see a much better name. Maybe index_in_synthDef, but that would make it harder to read even.

@timblechmann
Copy link
Contributor

great, thanks!

@telephon
Copy link
Member Author

if it is ok, could someone else be so kind and merge?

@telephon
Copy link
Member Author

telephon commented Feb 8, 2015

Ok, I'll take responsibility, before it gets stale.

telephon added a commit that referenced this pull request Feb 8, 2015
Topic/bounded controls: cleaned up branch ready.
@telephon telephon merged commit eeb64a2 into master Feb 8, 2015
@LFSaw
Copy link
Member

LFSaw commented Feb 14, 2015

thanks for all the effort to merge in topics, @telephon !

@telephon telephon deleted the topic/bounded-controls branch March 15, 2015 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants