module BuildStrips
Constants
- OFF
- ON
Attributes
bus[RW]
bus_total[R]
composite_total[R]
insert_total[R]
layout[R]
num[RW]
strip[RW]
strip_total[R]
this_type[RW]
vban_total[R]
Public Instance Methods
blueprint(opts)
click to toggle source
# File lib/channels.rb, line 78 def blueprint(opts) self.layout = opts self.vban_total = @layout[:in_vban] self.composite_total = @layout[:composite] self.insert_total = @layout[:patch_insert] self.strip_total = @layout[:strip][:p_in].+(@layout[:strip][:v_in]) self.bus_total = @layout[:bus][:p_out].+(@layout[:bus][:v_out]) define_types end
build_strips(type)
click to toggle source
# File lib/channels.rb, line 45 def build_strips(type) """ blueprint strip layouts for each type """ @this_type = type if @this_type == BASIC blueprint({ :strip => {:p_in => 2, :v_in=> 1}, :bus => {:p_out => 1, :v_out=> 1}, :in_vban => 4, :out_vban => 4, :patch_insert => 0, :composite => 0 }) elsif @this_type == BANANA blueprint({ :strip => {:p_in => 3, :v_in=> 2}, :bus => {:p_out => 3, :v_out=> 2}, :in_vban => 8, :out_vban => 8, :patch_insert => 22, :composite => 8 }) elsif @this_type == POTATO blueprint({ :strip => {:p_in => 5, :v_in=> 3}, :bus => {:p_out => 5, :v_out=> 3}, :in_vban => 8, :out_vban => 8, :patch_insert => 34, :composite => 8 }) end strip_factory bus_factory end
bus=(value)
click to toggle source
# File lib/channels.rb, line 41 def bus=(value) @bus = value end
bus_factory()
click to toggle source
# File lib/channels.rb, line 101 def bus_factory self.bus = [] (1..@bus_total).each_with_index do |num, index| num = index if @base_0 @bus[num] = Bus.new(self, index) end end
bus_total=(value)
click to toggle source
# File lib/channels.rb, line 21 def bus_total=(value) @bus_total = value end
composite_total=(value)
click to toggle source
# File lib/channels.rb, line 29 def composite_total=(value) @composite_total = value end
insert_total=(value)
click to toggle source
# File lib/channels.rb, line 33 def insert_total=(value) @insert_total = value end
layout=(value)
click to toggle source
# File lib/channels.rb, line 13 def layout=(value) @layout = value end
strip=(value)
click to toggle source
# File lib/channels.rb, line 37 def strip=(value) @strip = value end
strip_factory()
click to toggle source
# File lib/channels.rb, line 93 def strip_factory self.strip = [] (1..@strip_total).each_with_index do |num, index| num = index if @base_0 @strip[num] = Strip.new(self, index) end end
strip_total=(value)
click to toggle source
# File lib/channels.rb, line 17 def strip_total=(value) @strip_total = value end
vban_total=(value)
click to toggle source
# File lib/channels.rb, line 25 def vban_total=(value) @vban_total = value end