Class: DTAS::FadeFX
Defined Under Namespace
Classes: F
Instance Attribute Summary collapse
-
#in_main ⇒ Object
readonly
Returns the value of attribute in_main.
-
#in_next ⇒ Object
readonly
Returns the value of attribute in_next.
-
#out_main ⇒ Object
readonly
Returns the value of attribute out_main.
-
#out_prev ⇒ Object
readonly
Returns the value of attribute out_prev.
Instance Method Summary collapse
-
#initialize(args) ⇒ FadeFX
constructor
A new instance of FadeFX.
-
#parse!(str) ⇒ Object
q - quarter of a sine wave h - half a sine wave t - linear (‘triangular’) slope l - logarithmic p - inverted parabola default is ‘t’ (sox defaults to ‘l’, but triangular makes more sense when concatenating.
Methods included from ParseTime
Constructor Details
#initialize(args) ⇒ FadeFX
Returns a new instance of FadeFX.
11 12 13 14 15 16 17 18 |
# File 'lib/dtas/fadefx.rb', line 11 def initialize(args) args =~ /\Afade=([^,]*),([^,]*);([^,]*),([^,]*)\z/ or raise ArgumentError, "bad fade format" fades = [ $1, $2, $3, $4 ] %w(out_prev in_main out_main in_next).each do |iv| instance_variable_set("@#{iv}", parse!(fades.shift)) end end |
Instance Attribute Details
#in_main ⇒ Object (readonly)
Returns the value of attribute in_main.
8 9 10 |
# File 'lib/dtas/fadefx.rb', line 8 def in_main @in_main end |
#in_next ⇒ Object (readonly)
Returns the value of attribute in_next.
8 9 10 |
# File 'lib/dtas/fadefx.rb', line 8 def in_next @in_next end |
#out_main ⇒ Object (readonly)
Returns the value of attribute out_main.
8 9 10 |
# File 'lib/dtas/fadefx.rb', line 8 def out_main @out_main end |
#out_prev ⇒ Object (readonly)
Returns the value of attribute out_prev.
8 9 10 |
# File 'lib/dtas/fadefx.rb', line 8 def out_prev @out_prev end |
Instance Method Details
#parse!(str) ⇒ Object
q - quarter of a sine wave h - half a sine wave t - linear (‘triangular’) slope l - logarithmic p - inverted parabola default is ‘t’ (sox defaults to ‘l’, but triangular makes more sense when concatenating
27 28 29 30 31 |
# File 'lib/dtas/fadefx.rb', line 27 def parse!(str) type = "t" str.sub!(/\A([a-z])/, "") and type = $1 F[type, parse_time(str)] end |