about summary refs log tree commit homepage
path: root/lib/dtas/splitfx.rb
DateCommit message (Collapse)
2016-12-27http -> https, and relocate homepage to https://80x24.org/dtas/
HTTPS allows some level of security(*) and we've actually supported it on 80x24.org for many months, now. So, point new readers to it. Moving away from hostname-based homepages will allow us to save on subjectAltName space (and bandwith) when negotiating an HTTPS connection. We'll also have an .onion mirror for Tor users, soon, too; in case we can't afford to pay ICANN in the future. (assuming TLS libraries don't have any more Heartblead-level bugs in them, CAs aren't compromised, MITM HTTPS stripping proxies don't get in your way, and your certificate bundle isn't compromised).
2016-12-07splitfx: more consistently generate fade_in effects
No reason to generate the command in a different place than fade_out.
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright [1] git://git.savannah.gnu.org/gnulib.git
2015-12-27splitfx: fixup frozen_string_literal for spawn
This only affected splitfx when it used the command option, and only when calling dtas-splitfx (not when playing splitfx files through the player).
2015-12-25enable "frozen_string_literal: true"
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
2015-06-15splitfx: set OUTFMT correctly for subenv if command is set
Oops!
2015-05-24splitfx: allow -p/--sox-pipe option
This allows splitfx YAML files to operate more seamlessly with external commands such as play(1) especially when combined with the -t/--trim option.
2015-05-21splitfx: simplify output display
No point in executing echo and wasting CPU cycles. We'll only waste cycles now during dry-runs
2015-05-20splitfx: documentation for subclasses
2015-05-20splitfx: drop unnecessary variable
We no longer use it since commit 7b47191aa4c88b3daa4c980013f0047cb7ae7f6d ("splitfx: avoid double-truncation with user command")
2015-05-19source/splitfx: allow watching extra external scripts
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
2015-05-19splitfx: avoid double-truncation with user command
It's probably harmless as the sub (second) command is usually innocuous as fars a modifying dynamic range, but it makes the command-line output confusing.
2015-05-18splitfx: remove support for encoding opus
Lossy file encoding has too many tunable variables and it is not a good fit for an audio production tool such as dtas-splitfx. This was becoming a maintenance burden for me and is a sign of featuritis.
2015-05-18splitfx: show correct command for output
Oops...
2015-05-17dtas-splitfx: support --trim argument
It can often be useful to expose only part of a track for quick inspection. This lets us do that.
2015-05-10splitfx: fix non-generic, user-specified targets
Regression appeared in the previous commit, oops. commit ab63c7bb1b69423f8c39a60dd00230c560eecfc4 (splitfx: fix lossy output with player command is in use)
2015-05-10splitfx: fix lossy output with player command is in use
We must ensure lossy encodings do not get lossily-encoded twice, only once at the final stage. There is no effect for lossless outputs as lossless is the common case for splitfx users.
2015-05-10splitfx: --bits and --rate for quick-n-dirty generic targets
generic targets (e.g. "wav") is useful for quickly checking if clipping is introduced by dither and resampling, so we'll support changing the sample rate and bits-per-sample from the command-line so users don't need to setup their own targets or wait on FLAC encoding.
2015-05-10splitfx: pass compression factor to sox(1)
This can be useful for speeding up splitfx during development, as sox defaults to maximum compression with FLAC and that is extremely slow.
2015-05-10splitfx: support -O/--outdir switch to control output dir
It is useful to force output to a writable directory if the YAML file is on a read-only mount point or to force the output to a large tmpfs mount point to avoid SSD/HDD wear.
2015-05-10splitfx: fix typo for dither application
We do not need to dither unless we output to 16-bit or less. This bug caused us to unnecessarily apply dither on 24-bit output files. Oops!
2015-04-13cleanup: avoid redundant Array conversion for escapes
We already convert xs arg to be an Array, so avoid bloating our code with redundancy.
2015-04-13escape INFILE and related environment variables
We may expand them, so ensure they're properly escaped, first for use in shell snippets.
2015-01-20doc: describe most classes a bit
Hopefully this makes the code less daunting to newcomers
2015-01-19update copyright years and links to mailing list archives
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
2015-01-19avoid aliasing global "spawn" method
This makes debugging, grepping, and following code confusing at times and also unexpected breaks usage of the global "spawn" method.
2015-01-19splitfx: export TBEG and TLEN variables
These are the raw sample counts for the "trim" effect and may be useful for arithmetic in the shell.
2015-01-19splitfx: remove unnecessary assignment
We already assigned fmt before entering the case statement, so make the case statement smaller.
2015-01-03splitfx: remove redundant Hash#merge call
This was unnecessary since we already iterate through the overrides hash and merge "manually" based on command-line arguments (which allows us to represent nested hashes).
2015-01-03dtas-splitfx: use the top-level command used by -player
If somebody is using dtas-player to help edit a file for dtas-splitfx, it is likely they will want to use it when generating the final files (regardless of "target" format).
2015-01-03splitfx: add INDIR and INBASE environment variables
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.
2014-12-28splitfx: use $FX env consistently in targets, too
While we're at it, document the splitfx manpage and make the example suitable for tests.
2014-12-27player: support playing splitfx YAML files
This allows splitfx users to test CUE breakpoints and run file-specific effects without interrupting their normal flow.
2014-06-06update copyrights and email address for 2014
I'm still normal, and still trolling, but 80x24.org will be epic :)
2013-12-01splitfx: support --no-dither/-D option
splitfx is incapable of knowing in 100% of cases whether dithering should be used (as it has no visibility into sox internals), so support disabling it completely via command-line. This is like the identical sox option, and passed to sox(1), too. This feature is useful for splitting already-mastered 16-bit recordings.
2013-10-10format: common detection code (based on sox)
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.
2013-10-02splitfx: default to default DTAS::Format if unspecified
Some users may not use nor care about $OUTFMT at all, so just start them out with a default one based on the original to get started.
2013-09-22splitfx: nodoc the Skip class
This is an internal class, and we don't have a public Ruby API anyways.
2013-09-22splitfx: rename "opus" target to "opusenc"
sox(1) may gain the ability to natively encode to Opus one day without using opusenc(1), so make it more explicit we are relying on opusenc(1).
2013-09-11splitfx: preserve original rate/channels/bits for generic targets
We do not explicitly resample/dither/downmix without users permission.
2013-09-11splitfx: add "skip" directive
This allows skipping periods of silence/noise in between music tracks. This should be useful if the recorder is left running during intermission or during equipment swaps.
2013-09-10splitfx: add opus and flac-cdda outputs
These are common output targets, at least for my workflow.
2013-09-09doc: nodoc new classes
We have no public Ruby API, only socket protocols and data formats.
2013-09-09tracklist: next_track -> advance_track
This is a more accurate depiction of what happens, and we'll implement "next" and "previous" commands in the future.
2013-09-09splitfx: minor bugfixes, use strings for commands/targets
Minor bugfixes, this allows users to setup targets easily without introducing them to the ":" Rubyism for symbols. Also, use "track_start" instead of "track_first" to match the existing published examples for numbering the first track. While we're at it, detect the decoded sample precision correctly for dither use.
2013-09-07splitfx: flesh out functionality + integration test
This seems to be working out nicely. Having a basic integration test should be enough to get us started for now.
2013-09-07splitfx: round instead of truncate for CDDA
Rounding should be more accurate, even though my original awk snippet truncated the output.
2013-09-07add dtas-splitfx - .cuesheets + make(1)
This is lacking tests and documentation, but it works from a old trivial sample I had from a recording I previously split using plain POSIX shell splitfx is like make(1) for splitting and minor audio editing. It also allows any number of effects.