"IF" arguments in macros please?

The Virtual Audio Mixer discussions and support...
Post Reply
I3ordo
Posts: 24
Joined: Fri Oct 19, 2018 1:35 pm

"IF" arguments in macros please?

Post by I3ordo »

I mute my "MUSİC" bus with a fade out first.
it goes to -60db and gets muted.
and i unmute it by:
mute=0, then "fadeto -10db".

This works but i also let my "MIC" and "chat" BUS is modifying the volume level of "MUSIC" BUS so when people talk, music goes down and back up.

In this problem, if the volume of "MUSİC" is altered by either "MIC" or "Chat" and if try to unmute music. Music unmutes instantly. Instead of unmuted from -60db, it unmutes from -15db as the trigger of either "MIC" or "Chat" altered the volume of "MUSIC" .


TL:DR

Code: Select all

example 1:
if (Strip(2).mute = 0; Strip(2).fadeto = (-25,50); --only lower the volume of strip.2 to "-25b" if the BUS is "not muted"
This would allow my triggers to work much more correctly, as they would require a specific threshold to activate.

Hope i made my self clear and wondering what Mr. VB think?
Vincent Burel
Site Admin
Posts: 2008
Joined: Sun Jan 17, 2010 12:01 pm

Re: "IF" arguments in macros please?

Post by Vincent Burel »

if i put a finger in this, i'm afraid i'm going to pass the rest of my life on language devlopment :-)

well , will think about...
zBeeble
Posts: 8
Joined: Sat May 30, 2020 10:42 pm

Re: "IF" arguments in macros please?

Post by zBeeble »

I haven't looked at your macro language (yet). Probably will. I do like such things..., but why reinvent the wheel.
Both python and lua are easy-to-embed languages for this sort-of-thing.
xcasxcursex
Posts: 173
Joined: Tue Feb 18, 2020 12:04 am

Re: "IF" arguments in macros please?

Post by xcasxcursex »

Sorry for the delay in my replies @I3ordo, IRL has been demanding lately.

The problem in your other thread is that you are trying to perform two mutually exclusive operations on a single buss. It simply can't be at two volume levels at once.

So, until macro buttons app supports conditionals and comparators (if statements that allow you to set the volume dependent on comparing other values), the solution is fairly simple: Split your audio into two busses. Programmatically alter volume on each one independently and mute the one that's not appropriate.

The problem with this is that each comparison you would perform programmatically, demands another pair of audio busses to route through, and you can very quickly find yourself out of channel strips. Now you know why pro mixing desks are huge.

In the meantime, a programmatic path that's available to you right now, is to use some external scripting language along with the VM APIs. For example, I know that AHK (AutoHotKey) can do this. It's not entirely simple, you need to have some programming knowledge, but it is possible.
I3ordo
Posts: 24
Joined: Fri Oct 19, 2018 1:35 pm

Re: "IF" arguments in macros please?

Post by I3ordo »

I appreciate the response and i don't mind the timings :) @xcasxcursex

@Vincent Burel "Conditional macros" will add great flexibility and will be worth it! i am 100% about that but until it exists (if ever) i dont want to open another thread but ask here.

Is it currently possible to enable/disable a "trigger" of a macro button via macro command? precisely three of this.
Image

This way i can disable the sidechain triggers with the "mute" command so that "triggers" stop working and modify the sound levels unintentionally.
Vincent Burel
Site Admin
Posts: 2008
Joined: Sun Jan 17, 2010 12:01 pm

Re: "IF" arguments in macros please?

Post by Vincent Burel »

yes, this can be done quickly, i ve noted your request.
I3ordo
Posts: 24
Joined: Fri Oct 19, 2018 1:35 pm

Re: "IF" arguments in macros please?

Post by I3ordo »

still wishing for this...can we outsource this task to someone?if Voicemeeter was open source maybe?
Vincent Burel
Site Admin
Posts: 2008
Joined: Sun Jan 17, 2010 12:01 pm

Re: "IF" arguments in macros please?

Post by Vincent Burel »

Button(5).Trigger = 1; //Enable Audio Trigger on button ID 5
Button(5).Trigger = 0; //Disable Audio Trigger on button ID 5
I3ordo
Posts: 24
Joined: Fri Oct 19, 2018 1:35 pm

Re: "IF" arguments in macros please?

Post by I3ordo »

thank you mr VB.
I downloaded the new VM setup and in 20 minutes i got it to work. There was abit of luck because it was hard to even understand why it work, but with luck i made it work much sooner.

Now i can automatically decrease the volume of "game sounds" when i or my friend on discrod speak OR play music on either in OBS or through browser.
Also have mics and chat decrease the volume of music that is fading down the game's sounds.
And with the new command, the game sounds dont fade themselves in as long as there is music coming through.

I combined both my voice and discords voice in "A4 output" which has VB-audio cable assigned to it.
Brought that Audio cable into strip 0, have it as a triger source. so both discord and my mikies send sound to "strip 0"
Have the "strip 0" fade down Game and Media inputs separately , so two macro buttons there, activate at the same time and fade down "game" and "media" strips
Also have that "strip 0"(which include my voice and discords's) Fade down "Media" separately while also disables the trigger that fades down both "Game".

note: If i did not disable the trigger that fades "game" down , it would allow the game sounds come back onto the existing "music" as soon as the the "strip 0" went silent.

Image
The trick occurs on the "Media Trigger" button which disables the game fader.

Hah! tested it for two hours, did everything i can to break it but it seems to be working quite well atm.

I wonder if will be able to explain is with pictures and stuff but i am not sure if anyone would something like this...

Thank you again Mr. VB! , your software is inspirational!
Post Reply