diff options
author | Eric Wong <e@80x24.org> | 2015-01-28 07:44:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-28 07:47:57 +0000 |
commit | 37eae22446feb5a805d9cd59f6ad54362829189f (patch) | |
tree | 50172ce0b549fb9a0eae1e2e0b4d6bc47bc3a8d6 /lib/dtas/source/splitfx.rb | |
parent | ead7725fa693c7dd832b22f77b32847c81a70d72 (diff) | |
download | dtas-37eae22446feb5a805d9cd59f6ad54362829189f.tar.gz |
This feature is intended to allow users to "zoom-in" on a particular portion of a track to tweak parameters (either with dtas-sourceedit(1) or via playback of splitfx YAML files). This may be combined with looping the tracklist (via "tl repeat").
Diffstat (limited to 'lib/dtas/source/splitfx.rb')
-rw-r--r-- | lib/dtas/source/splitfx.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/dtas/source/splitfx.rb b/lib/dtas/source/splitfx.rb index 680ad8b..b7b9b86 100644 --- a/lib/dtas/source/splitfx.rb +++ b/lib/dtas/source/splitfx.rb @@ -20,7 +20,7 @@ class DTAS::Source::SplitFX < DTAS::Source::Sox # :nodoc: @sox = sox end - def try(ymlfile, offset = nil) + def try(ymlfile, offset = nil, trim = nil) @splitfx = @ymlhash = nil st = File.stat(ymlfile) return false if !st.file? || st.size > MAX_YAML_SIZE @@ -41,8 +41,8 @@ class DTAS::Source::SplitFX < DTAS::Source::Sox # :nodoc: end @splitfx = sfx @infile = ymlfile - sox = @sox.try(sfx.infile, offset) or return false - rv = source_file_dup(ymlfile, offset) + sox = @sox.try(sfx.infile, offset, trim) or return false + rv = source_file_dup(ymlfile, offset, trim) rv.sox = sox rv.env = sfx.env rv.sfx = sfx @@ -66,7 +66,7 @@ class DTAS::Source::SplitFX < DTAS::Source::Sox # :nodoc: @sfx.infile_env(e, @sox.infile) # make sure these are visible to the "current" command... - e["TRIMFX"] = @offset ? "trim #@offset" : nil + e["TRIMFX"] = trimfx e["RGFX"] = rg_state.effect(self) || nil e.merge!(@rg.to_env) if @rg |