Skip to content

Commit

Permalink
add missing outBus setter
Browse files Browse the repository at this point in the history
This setter was removed erroneously. This patch also gets rid of
tracing the state of the server synth, we just try to release it, and
ignore errors.
  • Loading branch information
telephon committed Mar 1, 2016
1 parent 194b405 commit 7047938
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions classes/SuperDirt.sc
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ DirtOrbit {
this.value((latency: server.latency).putPairs(pairs));
}

outBus_ { |bus|
outBus = bus;
this.initNodeTree;
}

set { |...pairs|
pairs.pairsDo { |key, val|
defaultParentEvent.put(key, val)
Expand Down Expand Up @@ -374,14 +379,21 @@ GlobalDirtEffect {
}

play { |group, outBus, dryBus, effectBus|
if(synth.isPlaying) { synth.release };
this.release;
synth = Synth.after(group, name.asString ++ numChannels,
[\outBus, outBus, \dryBus, dryBus, \effectBus, effectBus] ++ state.asPairs
).register
)
}

release { |releaseTime|
synth.release(releaseTime)
release { |releaseTime = 0.2|
if(synth.notNil) {
// surpress error, because we don't keep track of server state
synth.server.sendBundle(nil,
['/error', -1],
[15, synth.nodeID, \gate, -1.0 - releaseTime],
['/error', -2]
);
};
}

set { |event|
Expand Down

0 comments on commit 7047938

Please sign in to comment.