Class: DTAS::SplitFX::T
- Inherits:
-
Struct
- Object
- Struct
- DTAS::SplitFX::T
- Defined in:
- lib/dtas/splitfx.rb
Overview
a standard “track” for splitfx
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#env ⇒ Object
Returns the value of attribute env.
-
#fade_in ⇒ Object
Returns the value of attribute fade_in.
-
#fade_out ⇒ Object
Returns the value of attribute fade_out.
-
#tbeg ⇒ Object
Returns the value of attribute tbeg.
Instance Method Summary collapse
Instance Attribute Details
#comments ⇒ Object
Returns the value of attribute comments
36 37 38 |
# File 'lib/dtas/splitfx.rb', line 36 def comments @comments end |
#env ⇒ Object
Returns the value of attribute env
36 37 38 |
# File 'lib/dtas/splitfx.rb', line 36 def env @env end |
#fade_in ⇒ Object
Returns the value of attribute fade_in
36 37 38 |
# File 'lib/dtas/splitfx.rb', line 36 def fade_in @fade_in end |
#fade_out ⇒ Object
Returns the value of attribute fade_out
36 37 38 |
# File 'lib/dtas/splitfx.rb', line 36 def fade_out @fade_out end |
#tbeg ⇒ Object
Returns the value of attribute tbeg
36 37 38 |
# File 'lib/dtas/splitfx.rb', line 36 def tbeg @tbeg end |
Instance Method Details
#commit(advance_track_samples) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/dtas/splitfx.rb', line 37 def commit(advance_track_samples) tlen = advance_track_samples - tbeg trimfx = "trim #{tbeg}s #{tlen}s".dup if fade_in trimfx << " #{fade_in}" end if fade_out tmp = fade_out.dup fade_out_len = tmp.pop or raise ArgumentError, "fade_out needs a time value" fade_type = tmp.pop # may be nil fade = " fade #{fade_type} 0 #{tlen}s #{fade_out_len}" trimfx << fade end # raw sample counts (without 's' suffix) env["TBEG"] = tbeg.to_s env["TLEN"] = tlen.to_s env["TRIMFX"] = trimfx end |