From bbe63ddd50947195f6ef45d46dd87af4ba4de526 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 28 Dec 2014 10:30:28 +0000 Subject: source/splitfx: default tracklist for single-track files While the splitfx source is intended for applying effects to untracked audio files (e.g. transfers of vinyl records or live concert recordings), it should be useful for applying effects to an already-tracked recording. --- lib/dtas/source/splitfx.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dtas/source/splitfx.rb b/lib/dtas/source/splitfx.rb index fee27fd..2b10e5c 100644 --- a/lib/dtas/source/splitfx.rb +++ b/lib/dtas/source/splitfx.rb @@ -35,7 +35,9 @@ class DTAS::Source::SplitFX < DTAS::Source::Sox # :nodoc: sfx = DTAS::SplitFX.new begin Dir.chdir(File.dirname(ymlfile)) do # ugh - sfx.import(@ymlhash = YAML.load(buf)) + @ymlhash = YAML.load(buf) + @ymlhash['tracks'] ||= [ "t 0 default" ] + sfx.import(@ymlhash) sfx.infile.replace(File.expand_path(sfx.infile)) end @splitfx = sfx -- cgit v1.2.3-24-ge0c7