Solo/mute patch
Unfortunately, it's not so easy...
The best way to create a solo switch is to make a small script!
Any candidate?
The best way to create a solo switch is to make a small script!
Any candidate?
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Funny you mention, one reason I'm learning scripting right now was to make something like this. I'm a silent candidate cause it might take me time
if someone more experienced is up for it, go right ahead!
antwan
antwan
cool!
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Ok !
I don't understand scripting ..so pleaseeeeee a candidate !
I don't understand scripting ..so pleaseeeeee a candidate !
Here's a script you can try out:
I think it could have been a bit more compact and efficient, but I'm tired tonight...
Code: Select all
VAR pIn : ARRAY OF TParameter;
VAR pOut : ARRAY OF TParameter;
VAR i : integer;
VAR bOn : BOOLEAN;
VAR tmp : ARRAY OF integer;
CONST NUM_CH = 8;
PROCEDURE init;
BEGIN
SetArrayLength(pIn, NUM_CH);
SetArrayLength(pOut, NUM_CH);
SetArrayLength(tmp, NUM_CH);
FOR i := 0 TO (NUM_CH - 1) DO BEGIN
pIn[i] := CreateParam('solo in'+IntToStr(i+1), ptSwitch);
SetIsOutput(pIn[i], FALSE);
END;
FOR i := 0 TO (NUM_CH - 1) DO BEGIN
pOut[i] := CreateParam('mute out'+IntToStr(i+1), ptSwitch);
SetIsInput(pOut[i], FALSE);
END;
END;
BEGIN
bOn := FALSE;
FOR i := 0 TO (NUM_CH - 1) DO BEGIN
tmp[i] := trunc(GetValue(pIn[i]));
IF (tmp[i] = 1) THEN
bOn := TRUE;
END;
IF (bOn) THEN BEGIN
FOR i := 0 TO (NUM_CH - 1) DO BEGIN
IF (tmp[i] = 1) THEN BEGIN
SetValue(pOut[i], 0);
END
ELSE BEGIN
SetValue(pOut[i], 1);
END;
END;
END
ELSE BEGIN
FOR i := 0 TO (NUM_CH - 1) DO
SetValue(pOut[i], 0);
END;
END.Bjørn S
thanks bsork,
looks good.
i'm looking into improving this script further so that:
- if some channel was muted before solo is activated, it will return to be muted after the solo is disactivated
- also so that several solos can be active at the same time (as moody33 mentioned)
i'll have to see how the solo/mute engines work generally in DAW-softwares but im pretty sure at least the functionalities mentioned above are valid...
i hope i'll have time today or tomorrow.
antwan
looks good.
i'm looking into improving this script further so that:
- if some channel was muted before solo is activated, it will return to be muted after the solo is disactivated
- also so that several solos can be active at the same time (as moody33 mentioned)
i'll have to see how the solo/mute engines work generally in DAW-softwares but im pretty sure at least the functionalities mentioned above are valid...
i hope i'll have time today or tomorrow.
antwan
The script does allow for several solos to active at the same time; if 1 and 2 is soloed, 3 to 8 is muted, etc.
However, the script is a bit heavy on the CPU, so I've made the same functionality with modules:
First create a solo Switch, a mute Switch and a MultipleVar. Connect the solo Switch to MultipleVar.affect3, and the mute Switch to MultipleVar.out. Set MultipleVar.in2 = 1.
Select all three modules and copy them so that you have as many channels as you want.
Then create a A=B and a Not module. Connect all solo switches to A=B.A, and A=B.out to Not.in. Then connect A=B.out to affect1 and Not.out to affect2 on all MultipleVars. Voila - it wasn't so hard after all!
On my system the script uses around 5 times the CPU as this patch when running 8 channels.
However, the script is a bit heavy on the CPU, so I've made the same functionality with modules:
First create a solo Switch, a mute Switch and a MultipleVar. Connect the solo Switch to MultipleVar.affect3, and the mute Switch to MultipleVar.out. Set MultipleVar.in2 = 1.
Select all three modules and copy them so that you have as many channels as you want.
Then create a A=B and a Not module. Connect all solo switches to A=B.A, and A=B.out to Not.in. Then connect A=B.out to affect1 and Not.out to affect2 on all MultipleVars. Voila - it wasn't so hard after all!
On my system the script uses around 5 times the CPU as this patch when running 8 channels.
Bjørn S
fascinating.
it's still hard sometimes to figure out when to go for scripting and when to stick to module-building.

antwan
it's still hard sometimes to figure out when to go for scripting and when to stick to module-building.
antwan
It's exactly what I want. Propellerhead Reason Mixer work like this if I remember.antwan wrote:i'm looking into improving this script further so that:
- if some channel was muted before solo is activated, it will return to be muted after the solo is disactivated
- also so that several solos can be active at the same time (as moody33 mentioned)
Thanks everybody , I will try Bsork last suggestion.
If you want Mutes button, add Mute switches connected to MultipleVar.in 1 for each one.
I think it works.
I think it works.
In this case, I was "lucky" since the logic here can be expressed in 3 steps which fit the MultipleVar module perfect:antwan wrote:fascinating.
it's still hard sometimes to figure out when to go for scripting and when to stick to module-building.
antwan
1) No solo? Don't mute
2) Solo? Mute, unless...
3) ...the corresponding solo button is on.
...and adding mute switches to MultipleVar.in1 works very well! Actually, I don't think all DAWs has that functionality - on some a muted channel will be unmuted after a solo.
Bjørn S
Hi,
Strange, i opened this patch (made with the Multiple Vars) with the new version of Usine, hadn't used it for a while. And it seems it doesn't work now. When a Solo is pressed, it also Mutes the channel that was soloed. i.e. it mutes all channels regardless.
Any thoughts on what has changed?
antwan
Strange, i opened this patch (made with the Multiple Vars) with the new version of Usine, hadn't used it for a while. And it seems it doesn't work now. When a Solo is pressed, it also Mutes the channel that was soloed. i.e. it mutes all channels regardless.
Any thoughts on what has changed?
antwan
I recreated the patch using my own "recipe" above creating 3 "channels", and experienced the same as you. However, if I deleted and recreated the connections between the Solo switches and MultipleVar.affect3 it worked ok.
Any comments, Olivier? Something wrong with copying several modules in one go, maybe?
Any comments, Olivier? Something wrong with copying several modules in one go, maybe?
Bjørn S
can you send me the patch by mail?
I'll take a look
contact @ sensomusic.com
I'll take a look
contact @ sensomusic.com
Olivier Sens
www.brainmodular.com
www.brainmodular.com
ok I understand
If the previous patch was working it was only by "chance". I mean that the order of calculation was made for the patch to work but wasn't valid in the general case.
the problem is more complex than appears!
[mute1] is on when:
[solo2]=on OR [solo3]=on but only when [solo1]=off
in math domain it looks like:
mute1 = (solo2 OR solo3) and (not solo1)
mute2 = (solo1 OR solo3) and (not solo2)
mute3 = (solo1 OR solo2) and (not solo3)
so on the patch you only need OR, AND, NOT modules.
I've just posted an example in the add-ons section.
You see that the complexity grow with the number of buttons, and can be rapidly a nightmare.
So the script is a good candidate, with a constant to define the number of solo buttons (3,5 or 1764 !)
If the previous patch was working it was only by "chance". I mean that the order of calculation was made for the patch to work but wasn't valid in the general case.
the problem is more complex than appears!
[mute1] is on when:
[solo2]=on OR [solo3]=on but only when [solo1]=off
in math domain it looks like:
mute1 = (solo2 OR solo3) and (not solo1)
mute2 = (solo1 OR solo3) and (not solo2)
mute3 = (solo1 OR solo2) and (not solo3)
so on the patch you only need OR, AND, NOT modules.
I've just posted an example in the add-ons section.
You see that the complexity grow with the number of buttons, and can be rapidly a nightmare.
So the script is a good candidate, with a constant to define the number of solo buttons (3,5 or 1764 !)
Olivier Sens
www.brainmodular.com
www.brainmodular.com
thanks.
i'll give it a look - and possibly return to using a script
antwan
i'll give it a look - and possibly return to using a script
antwan
I agree to some extent, but I also think the MultipleVar variety is just as valid logically, and I can't really understand why it wouldn't work. Well, never mind...
However, I couldn't resist to rethink a way of using modules without creating an over-complex patch when the number of involved channels increases. I also have put an example up in the add-ons; it uses Pass/Stop Event Flow modules and a single A>B. Within a reasonable amount of channels (up to 20? 30?), I guess this is better than using a script, at least CPU-wise.
However, I couldn't resist to rethink a way of using modules without creating an over-complex patch when the number of involved channels increases. I also have put an example up in the add-ons; it uses Pass/Stop Event Flow modules and a single A>B. Within a reasonable amount of channels (up to 20? 30?), I guess this is better than using a script, at least CPU-wise.
Bjørn S
I understand it can be surprising!
In the new version of usine, the multiple var module is calculated only if it's input as changed. That why your patch doesn't work any more.
In the new version of usine, the multiple var module is calculated only if it's input as changed. That why your patch doesn't work any more.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Ok. What inputs? Only the ins, the affects, or both?
Bjørn S
all input!
thats why Usine is 20-30% faster
thats why Usine is 20-30% faster
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Who is online
Users browsing this forum: No registered users and 71 guests
