hello,
I have read I could disable subpatches with [switch~], but I dont really understand how it works
and what are the differences between [switch~] and [block~] objects
thanks
enable disable subpatches
hello,
I have read I could disable subpatches with [switch~], but I dont really understand how it works
and what are the differences between [switch~] and [block~] objects
thanks
The only difference between the two is that [switch~] enables you to turn the DSP of a subpatch on/off, apart from the other features that are common with [block~].
To turn the DSP on or off send a 1 or a 0 to [switch~]. By default the DSP is off when a [switch~] is present, so make sure you send a 1 to it to turn it on.
thanks
When you switch a patch off, all the control objects work normally, but the audio objects will emit only zeros, and they still do that at the sample rate. The things I wonder are:
Hmm...
@Monetus Yes, theory of operation 2.4.4 suggests that [throw~] does not throw the zeros, but it does....... quote........... "When a subpatch is switched off its audio outputs generate zeros; this costs a fairly small overhead; a cheaper way to get outputs is to use throw~ inside the switched module and catch~ outside it. "
But inside the patch there are no zeros..... nothing when the switch is "off".... you can check it with "magic glass"............
However.......... outside the patch, the [outlet~] and a [catch~] both produce zeros........
David.
I also wonder about this, and everywhere I look there are always explanations of how to turn the DSP on/off on subpatches, but if I say have a bunch of keycommands (key+sel) inside different subpatches and would like to switch which ones are active, how would I go about this?
You can use [key] or [iemguts/receivecanvas] to identify the key, then route the messages.
Yeah thanks, but i mean is there a way to activate/deactivate the "key" object? For example if i want to use multiple sets of keycommands and switch between them.
you can use [spigot]s with a global receiver.
[key 32]
|
| [r set1]
| |
[spigot]
i made this little helper so that the key only works when capslock is pressed.
cap_key.pd
instanciate as:
[cap_key A]
Here is a patch that lets you use key input for only one instance of an abstraction. It uses a couple of externals from iemguts, cyclone and moocow. Should be possible to work around them if need be, but it would be difficult.
Things will also get more complicated if you want more than 10 instances of the abstraction; you'll have to find some way of collecting the keys.
Hope this is what you wanted!
hey thanks! that's just what I was looking for!
Oops! Looks like something went wrong!