diff options
author | Eric Wong <e@80x24.org> | 2014-07-05 23:53:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-07-05 23:53:26 +0000 |
commit | 3471463325be6c990b3abd18b4d34f723440d19a (patch) | |
tree | 988c3b4f6448ba1834b11319bcbde0ca17285809 /lib | |
parent | 7a2d650592fae471fefdca70f686861dd49ac7ce (diff) | |
download | dtas-3471463325be6c990b3abd18b4d34f723440d19a.tar.gz |
This will not be needed after all.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dtas/fadefx.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/dtas/fadefx.rb b/lib/dtas/fadefx.rb deleted file mode 100644 index ceae3ac..0000000 --- a/lib/dtas/fadefx.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors -# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) -require_relative '../dtas' -require_relative 'parse_time' - -class DTAS::FadeFX - include DTAS::ParseTime - attr_reader :out_prev, :in_main, :out_main, :in_next - F = Struct.new(:type, :len) - - 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 - - # 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 - def parse!(str) - type = "t" - str.sub!(/\A([a-z])/, "") and type = $1 - F[type, parse_time(str)] - end -end |