Date | Commit message (Collapse) |
|
While we're in the area, make a wording change from "GPLv3 or later"
to "GPL-3.0+", as the latter is favored by SPDX.org
|
|
Since writing nested shell commands inside YAML is subject to all
sorts of strange quoting rules, encourage users to rely on external
scripts which the YAML file refers to instead. These scripts can be
written in any reasonable scripting language capable of executing
other commands.
This allows transparently monitoring things such as `my-script.rb'
in the below example when playing my-splitfx.yml via dtas-player:
--------------------- my-splitfx.yml -----------------------
infile: input.flac
command: $INDIR/my-script.rb "$INFILE"
...
--------------------- my-script.rb --------------------------
#!/usr/bin/ruby
require 'shellwords'
infile = ARGV.shift
ch = %W(sox #{infile} -p).concat((ENV['TRIMFX'] || '').shellsplit)
fx = %W(highpass 25 gain 9)
l = ch.dup.concat(%W(remix 1v1)).concat(fx).concat(%w(contrast 30))
r = ch.dup.concat(%W(remix 2v1)).concat(fx).concat(%w(contrast 0))
cmd = %W(sox -M |#{l.shelljoin} |#{r.shelljoin})
cmd.concat((ENV['SOXFMT'] || '-p').shellsplit)
cmd.concat(%w(- stats))
warn cmd.inspect
exec *cmd
|
|
We may expand them, so ensure they're properly escaped, first
for use in shell snippets.
|
|
For seeking, the name might be a little confusing,
but this is zero relative to the current queued source.
|
|
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").
|
|
Hopefully this makes the code less daunting to newcomers
|
|
The documentation part is managed by the new
Documentation/update-copyright script. For the future, the rest may
be managed by the update-copyright tool in gnulib
|
|
This makes debugging, grepping, and following code confusing
at times and also unexpected breaks usage of the global "spawn"
method.
|
|
This allows changes in the source YAML file to be reflected
immediately in player after the user saves the file in their
favorite $EDITOR. Previously, a user would need to:
1) start dtas-sourceedit, spawning $EDITOR
2) edit the file
3) save changes
4) exit $EDITOR
5) repeat starting from 1) until happy with the results
Now, the workflow allows avoiding the context switch between their
$EDITOR and terminal to restart dtas-sourcedit:
1) start dtas-sourceedit, spawning $EDITOR
2) edit the file
3) save changes
4) repeat starting from 1) until happy with the results
5) exit $EDITOR
In my experience, this greatly speeds up tuning of the playback
change, giving all the repeatability and flexibility of editing text
files while having the immediacy of an interactive UI.
Keep in mind this can cause problems for those with auto-save
enabled in their $EDITOR buffer at inopportune times, so a
-N/--no-watch option is added.
|
|
These are intended to act like `$(@D)' and `$(@F)' in GNU make(1)
and to ease managing temporary files for some effects
(e.g. noiseprof + noisered in sox) for splitfx users.
|
|
We cannot afford to break the entire player because somebody
enqueued a non-existent file (or enqueued and later renamed it).
|
|
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.
|
|
This should allow users to setup effects in a more standardized
fashion and avoid needing to specify a "command:" field in their
splitfx YAML files in the general case.
|
|
Since splitfx YAML files are intended to be frequently edited and
modified by the user, we'll support automatically restarting the
source when the user saves changes via their favorite $EDITOR
This change is only for Linux users. However, sleepy_penguin
supports kqueue nowadays so a patch to support such functionality
would be appreciated.
|
|
This allows splitfx users to test CUE breakpoints and run
file-specific effects without interrupting their normal flow.
|
|
I'm still normal, and still trolling, but 80x24.org will be epic :)
|
|
This reduces duplication for sox-based components, which our audio
editing components will rely on. We only use avconv/ffmpeg for odd
formats which sox does not play natively, and editing audio in
strange/lossy formats is undesirable anyways.
|
|
This adds the ability to seek internally within FLAC file
based on the internal CUE sheet. Other formats may be supported
in the future, but FLAC is the only one I know of which supports
embedded cue sheets.
Note: flac 1.3.0 is recommended for users of non-CDDA-compatible
formats.
See updates to dtas-player_protocol(7) for details.
|
|
This will allow users to more-easily edit configs and feel
like a real shell. We no longer mistakenly expand nil env
variables to "" anymore, either.
|
|
Singleton methods tend to be bad like this.
TODO: write tests for this.
|
|
Some containers (e.g. large VOBs) are not easily probed and require
additional options for avprobe/ffprobe to find audio streams. We do
this by looping and increasing the duration/size of the probe to
find new audio streams.
This seems to work reasonably well for some DVD rips I have until
seeking is required. This breaks if the seek point (including seeks
for source effects) exceeds the avprobe/ffprobe -analyzeduration.
Anyways, I recommend extracting the audio stream (without
transcoding) out of the VOB container as the best way to go.
Something like:
avconv -analyzeduration 2G -probesize 2G \
-i input.vob -vn -sn -c:a copy -map 0:$STREAM_NR output.ext
|
|
This is reproducible on a video file with a mono audio stream
when attempting playback in stereo.
|
|
We don't need it since IO#read(bytes, buf) will convert to
ASCII-8BIT anyways. Everywhere else, we ensure path names are
already binary. We do this mainly at the client layer before using
Shellwords to escape the paths.
We also must be careful about parsing output from soxi/avprobe
which can show us metadata in whatever encoding is in the file.
We must still handle data from parsing command output as binary,
as the encoding of file metadata tends to vary.
This also should buy us Syck compatibility for Ruby 1.9.3 users
on Debian systems where Ruby 1.9.3 still uses Syck.
|
|
All files we distribute in the tarball need to have a
copyright/license specified for Savannah.
We don't need the example state file anymore.
|
|
It's possible to get zero samples when playing streams of
unknown length (e.g. over Icecast over HTTP)
|
|
We expose no public API, so avoid cluttering users disk space with
useless ri/rdoc and avoid cluttering the web with HTML nobody will
read.
|
|
Showing the warning for the same file over and over again is
annoying when seeking a file handled by avconv/ffmpeg, so stop
doing it.
While we're at it, the error handling for __load_comments is totally
redundant (absent of race conditions if another process modifies the
file). However, if we do hit races, all the other soxi invocations
would be racy, too; but we really just shouldn't care about such
a corner case in here.
|
|
Since ffmpeg/ffprobe are wrappers around their libav-variants,
I haven't had the chance to actually test with "real" ffmpeg,
but the usage is probably similar enough to not matter.
|
|
soxi may not handle some files correctly and detect zero samples
without error-ing out. If sox can't detect the sample count
or the file is really empty, then there's no point trying futher
and we'll fall back to avconv.
|
|
We should be fully-capable of managing any number of options
to try sources in.
|
|
This should better prepare us to make "source ed" into
"source <av|sox> ed" and set per-source priorities.
We also now treat @env consistently for all per-source commands
(such as soxi/avprobe) so we can be sure we're using the same
installation of sox or libav if using a non-standard PATH, or if we
want to set AV_LOG_FORCE_NOCOLOR
|
|
I forgot :err is already handled by Process.spawn, so split out
the functionality into err_str where we want to use it.
Also, add a :no_raise flag which will allow us to better handle
avprobe/soxi calls which can fail and avoid needless exceptions.
|
|
Shellwords.join is an identical method and there's no reason not to
use it.
|
|
We need to tell sox to use and resample to the _player_ format
instead of the source format. Otherwise 48000 Hz audio (common for
video?) sounds very slow when attempting to play back on the default
44100 Hz. It is also likely preferable to choose the audio stream
which matches the player channel count instead of letting sox
automatically invoke the remix effect.
Before this change, playing 6-channel, 48000 Hz source into a sink
expecting stereo, 44100 Hz is rather disturbing...
While we're at it, clarify the spawn code for the sox source, too.
We can drop the test_format_from_file test now, since
it's probably overkill at this point.
|
|
avconv is capable of outputting to the .sox format, greatly
simplifying our life as it enables us to easily apply sox
effects on a per-source file basis.
dtas-sourceedit and the "source" protocol commands will need
to change to support internal priorities (like sink).
|
|
We'll be supporting reading the format from avprobe and ffprobe,
so we should avoid tying ourselves to soxi
|
|
We should've done this at the start, but we didn't.
|
|
Rename COPYRIGHT -> COPYING, as that seems to be the more common
name for the GPLv3 license file. Kill all rdoc, since I don't
agree with HTML documentation and we do not expose any Ruby APIs.
|
|
|