mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-22 18:00:48 +00:00
Fades, Return and BusModes added to Bus class
This commit is contained in:
parent
58d6876c0f
commit
f7f8ed64ee
@ -1,9 +1,15 @@
|
|||||||
require_relative "iremote"
|
require_relative "iremote"
|
||||||
require_relative "kinds"
|
require_relative "kinds"
|
||||||
|
require_relative "mixins"
|
||||||
|
|
||||||
module Voicemeeter
|
module Voicemeeter
|
||||||
module Bus
|
module Bus
|
||||||
class Bus < IRemote
|
class Bus < IRemote
|
||||||
|
include Mixins::Fades
|
||||||
|
include Mixins::Return
|
||||||
|
|
||||||
|
attr_reader :eq, :mode
|
||||||
|
|
||||||
def self.make(remote, i)
|
def self.make(remote, i)
|
||||||
"
|
"
|
||||||
Factory function for Bus classes.
|
Factory function for Bus classes.
|
||||||
@ -13,6 +19,20 @@ module Voicemeeter
|
|||||||
p_out, v_out = remote.kind.outs
|
p_out, v_out = remote.kind.outs
|
||||||
i < p_out ? PhysicalBus.new(remote, i) : VirtualBus.new(remote, i)
|
i < p_out ? PhysicalBus.new(remote, i) : VirtualBus.new(remote, i)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def initialize(remote, i)
|
||||||
|
super
|
||||||
|
make_accessor_bool :mute, :mono, :sel, :monitor
|
||||||
|
make_accessor_float :gain
|
||||||
|
make_accessor_string :label
|
||||||
|
|
||||||
|
@eq = BusEq.new(remote, i)
|
||||||
|
@mode = BusModes.new(remote, i)
|
||||||
|
end
|
||||||
|
|
||||||
|
def identifier
|
||||||
|
"bus[#{@index}]"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class PhysicalBus < Bus
|
class PhysicalBus < Bus
|
||||||
@ -20,5 +40,38 @@ module Voicemeeter
|
|||||||
|
|
||||||
class VirtualBus < Bus
|
class VirtualBus < Bus
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class BusEq < IRemote
|
||||||
|
def initialize(remote, i)
|
||||||
|
super
|
||||||
|
make_accessor_bool :on, :ab
|
||||||
|
end
|
||||||
|
|
||||||
|
def identifier
|
||||||
|
"bus[#{@index}].eq"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class BusModes < IRemote
|
||||||
|
def initialize(remote, i)
|
||||||
|
super
|
||||||
|
make_accessor_bool :normal,
|
||||||
|
:amix,
|
||||||
|
:bmix,
|
||||||
|
:repeat,
|
||||||
|
:composite,
|
||||||
|
:tvmix,
|
||||||
|
:upmix21,
|
||||||
|
:upmix41,
|
||||||
|
:upmix61,
|
||||||
|
:centeronly,
|
||||||
|
:lfeonly,
|
||||||
|
:rearonly
|
||||||
|
end
|
||||||
|
|
||||||
|
def identifier
|
||||||
|
"bus[#{@index}].mode"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user