2023-07-07 02:34:58 +01:00
|
|
|
module Voicemeeter
|
|
|
|
module Mixins
|
2023-07-09 19:43:26 +01:00
|
|
|
module Fades
|
|
|
|
def fadeto(target, time)
|
|
|
|
self.setter("FadeTo", "(#{target}, #{time})")
|
|
|
|
sleep(@remote.delay)
|
|
|
|
end
|
2023-07-09 05:50:06 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
def fadeby(change, time)
|
|
|
|
self.setter("FadeBy", "(#{change}, #{time})")
|
|
|
|
sleep(@remote.delay)
|
2023-07-09 05:50:06 +01:00
|
|
|
end
|
2023-07-09 19:43:26 +01:00
|
|
|
end
|
2023-07-09 05:50:06 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Return
|
|
|
|
include Meta_Functions
|
2023-07-07 02:34:58 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
def initialize(remote, i)
|
|
|
|
super
|
|
|
|
make_accessor_float :returnreverb, :returndelay, :returnfx1, :returnfx2
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
2023-07-09 19:43:26 +01:00
|
|
|
end
|
2023-07-07 02:34:58 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Apps
|
|
|
|
def appgain(name, gain)
|
|
|
|
self.setter("AppGain", "(\"#{name}\", #{gain})")
|
2023-07-09 05:50:06 +01:00
|
|
|
end
|
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
def appmute(name, mute)
|
|
|
|
self.setter("AppMute", "(\"#{name}\", #{mute ? 1 : 0})")
|
|
|
|
end
|
|
|
|
end
|
2023-07-07 02:34:58 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Outputs
|
|
|
|
def initialize(*args)
|
|
|
|
super
|
|
|
|
remote, *rem = args
|
|
|
|
num_A, num_B = remote.kind.outs
|
|
|
|
channels =
|
|
|
|
(1..(num_A + num_B)).map do |i|
|
|
|
|
i <= num_A ? "A#{i}" : "B#{i - num_A}"
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
2023-07-09 19:43:26 +01:00
|
|
|
make_accessor_bool *channels
|
|
|
|
end
|
|
|
|
end
|
2023-07-07 02:34:58 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Xy
|
|
|
|
include Meta_Functions
|
2023-07-07 02:34:58 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Pan
|
|
|
|
def initialize(remote, i)
|
|
|
|
super
|
|
|
|
make_accessor_float :pan_x, :pan_y
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Color
|
2023-07-07 02:34:58 +01:00
|
|
|
def initialize(remote, i)
|
|
|
|
super
|
2023-07-09 19:43:26 +01:00
|
|
|
make_accessor_float :color_x, :color_y
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Fx
|
2023-07-07 02:34:58 +01:00
|
|
|
def initialize(remote, i)
|
|
|
|
super
|
2023-07-09 19:43:26 +01:00
|
|
|
make_accessor_float :fx_x, :fx_y
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2023-07-09 19:43:26 +01:00
|
|
|
|
|
|
|
module Fx
|
|
|
|
include Meta_Functions
|
|
|
|
|
|
|
|
def initialize(remote, i)
|
|
|
|
super
|
|
|
|
make_accessor_float :reverb, :delay, :fx1, :fx2
|
|
|
|
make_accessor_bool :postreverb, :postdelay, :postfx1, :postfx2
|
|
|
|
end
|
|
|
|
end
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
end
|