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)
|
2023-07-14 12:01:41 +01:00
|
|
|
setter("FadeTo", "(#{target}, #{time})")
|
2023-07-09 19:43:26 +01:00
|
|
|
sleep(@remote.delay)
|
|
|
|
end
|
2023-07-09 05:50:06 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
def fadeby(change, time)
|
2023-07-14 12:01:41 +01:00
|
|
|
setter("FadeBy", "(#{change}, #{time})")
|
2023-07-09 19:43:26 +01:00
|
|
|
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
|
2023-08-30 12:27:50 +01:00
|
|
|
extend MetaFunctions
|
|
|
|
attr_accessor_float :returnreverb, :returndelay, :returnfx1, :returnfx2
|
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)
|
2023-07-14 12:01:41 +01:00
|
|
|
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)
|
2023-07-14 12:01:41 +01:00
|
|
|
setter("AppMute", "(\"#{name}\", #{mute ? 1 : 0})")
|
2023-07-09 19:43:26 +01:00
|
|
|
end
|
|
|
|
end
|
2023-07-07 02:34:58 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Outputs
|
2023-08-30 12:27:50 +01:00
|
|
|
def make_attr_outputs(num_a, num_b)
|
|
|
|
(1..(num_a + num_b)).each do |i|
|
|
|
|
param = (i <= num_a) ? :"A#{i}" : :"B#{i - num_a}"
|
|
|
|
define_singleton_method(param) do
|
|
|
|
getter(param).to_i == 1
|
|
|
|
end
|
|
|
|
define_singleton_method("#{param}=") do |value|
|
|
|
|
setter(param, value && 1 || 0)
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
2023-08-30 12:27:50 +01:00
|
|
|
end
|
2023-07-09 19:43:26 +01:00
|
|
|
end
|
|
|
|
end
|
2023-07-07 02:34:58 +01:00
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Xy
|
|
|
|
module Pan
|
2023-08-30 12:27:50 +01:00
|
|
|
extend MetaFunctions
|
|
|
|
attr_accessor_float :pan_x, :pan_y
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Color
|
2023-08-30 12:27:50 +01:00
|
|
|
extend MetaFunctions
|
|
|
|
attr_accessor_float :color_x, :color_y
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
|
2023-07-09 19:43:26 +01:00
|
|
|
module Fx
|
2023-08-30 12:27:50 +01:00
|
|
|
extend MetaFunctions
|
|
|
|
attr_accessor_float :fx_x, :fx_y
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
end
|
2023-07-09 19:43:26 +01:00
|
|
|
|
|
|
|
module Fx
|
2023-08-30 12:27:50 +01:00
|
|
|
extend MetaFunctions
|
|
|
|
attr_accessor_float :reverb, :delay, :fx1, :fx2
|
|
|
|
attr_accessor_bool :postreverb, :postdelay, :postfx1, :postfx2
|
2023-07-09 19:43:26 +01:00
|
|
|
end
|
2023-07-14 01:46:00 +01:00
|
|
|
|
|
|
|
module LevelEnum
|
|
|
|
PREFADER = 0
|
|
|
|
POSTFADER = 1
|
|
|
|
POSTMUTE = 2
|
|
|
|
BUS = 3
|
|
|
|
end
|
2023-07-07 02:34:58 +01:00
|
|
|
end
|
|
|
|
end
|