everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] dtas 0.20.0 - duct tape audio suite for *nix
@ 2022-02-03  5:15  6% Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2022-02-03  5:15 UTC (permalink / raw)
  To: dtas-all, ruby-talk

Free Software command-line tools for audio playback, mastering, and
whatever else related to audio.  dtas follows the worse-is-better
philosophy and acts as duct tape to combine existing command-line tools
for flexibility and ease-of-development.  dtas is currently implemented
in Ruby, Perl5, and some embedded shell, but may use other languages in
the future.

Changes:

    dtas 0.20.0 - ruby 3.1+ compatibility, splitfx improvements

    This release catches up with Psych (YAML) changes in Ruby 3.1+
    Ruby 2.3+ is now the minimum version, though keep in mind the
    ruby-core team already dropped support for it long ago.

    Most of the features are focused on audio engineering
    capabilities of dtas-splitfx.  dtas-splitfx gains the --filter
    switch, along with per-track environment variables and comments.
    These new features have made my workflow significantly better.

    dtas-archive supports explicit comments, and omits the default
    SoX comment.  To better cope with temporary and modified files
    during editing, dtas-player metadata now checks ctime before
    reusing the cache, handy for frequently-modified files.
    "dtas-tl prune" is now supported to cull temporary files from
    the player tracklist.

    There's a few dtas-console improvements, too.

    28 changes since v0.19.0 (2021-09-05):

          archive: support comments, default to none
          splitfx: use Etc.nprocessors for jobs if unspecified
          dtas-console: set X11 terminal title iff DISPLAY is set
          dtas-console: add 'i' toggle to show comments (metadata)
          splitfx: fix track_zpad with integer arg
          doc: drop ordered map from examples
          player: reduce syscalls when splicing to single target
          dtas-console: support Wayland terminal titles, too
          console: workaround safe warnings in outdated `curses' gem
          require Ruby 2.3+
          get rid of DTAS.dedupe_str wrapper
          move dtas-graph into script/, support Perl for dtas.sh
          use YAML.unsafe_load in Psych 4.x (Ruby 3.1+)
          deduplicate and freeze pathnames + metadata
          player: remove omap conversion
          dtas: drop unnecessary "require 'yaml'" statements
          dtas-tl prune: cull missing files from tracklist
          dtas-tl: drop encoding hacks, use binary stdout+stderr
          use IO#wait_readable consistently
          get rid of DTAS::Nonblock wrapper for Ruby <= 2.0
          unix_accepted: drop Ruby < 2.3 support code
          do not check IO#closed? before calling IO#close
          splitfx: support per-track environment variables
          splitfx: add --filter option to limit match to comments
          player: expire sox metadata cache on file st_ctime changes
          readahead: do not call -@ on non-String
          splitfx: disallow combining --trim and --filter
          splitfx: document changes ahead of 0.20.0 release

* homepage: https://80x24.org/dtas/
* https://80x24.org/dtas/INSTALL
* https://80x24.org/dtas/dtas-player.txt
* https://80x24.org/dtas/NEWS.atom
* git clone https://80x24.org/dtas.git
* dtas-all@nongnu.org (plain-text only, no HTML mail, please)
* mail archives: https://80x24.org/dtas-all/
  nntps://news.public-inbox.org/inbox.comp.audio.dtas
  imaps://anon:mous@public-inbox.org/inbox.comp.audio.dtas.0
  nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.dtas
  imap://anon:mous@7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.dtas.0
  https://80x24.org/dtas-all/new.atom

note: .onion URLs require Tor: <https://www.torproject.org/>


^ permalink raw reply	[relevance 6%]

* [PATCH] readahead: do not call -@ on non-String
@ 2022-01-27  7:12  7% Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2022-01-27  7:12 UTC (permalink / raw)
  To: dtas-all

There may not be an `infile' element in the `current' response.

Fixes: bf9787ac517fe19a ("deduplicate and freeze pathnames + metadata")
---
 bin/dtas-readahead | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/dtas-readahead b/bin/dtas-readahead
index 6da5f88..f2ab514 100755
--- a/bin/dtas-readahead
+++ b/bin/dtas-readahead
@@ -145,8 +145,9 @@ def do_open(path)
   cur = DTAS.yaml_load(c.req('current'))
   while @todo_ra > 0 && fp.nil?
     if current = cur['current']
-      track = -current['infile']
+      track = current['infile']
       break unless track.kind_of?(String)
+      track = -track
       fp = work[track] ||= do_open(track)
       cur_pid = current['pid']
       if fp


^ permalink raw reply related	[relevance 7%]

* [PATCH 1/9] deduplicate and freeze pathnames + metadata
  2022-01-23 21:37  6% [PATCH 0/9] various cuts for memory savings Eric Wong
@ 2022-01-23 21:37  6% ` Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2022-01-23 21:37 UTC (permalink / raw)
  To: dtas-all

This ought to save some memory for dtas-player and
dtas-readahead users with multiple instances of the same
track(s) on their track list.
---
 bin/dtas-readahead              | 7 +++----
 lib/dtas/edit_client.rb         | 4 ++--
 lib/dtas/mcache.rb              | 4 ++--
 lib/dtas/player.rb              | 6 +++---
 lib/dtas/sigevent/fiddle_efd.rb | 4 ++--
 lib/dtas/source/sox.rb          | 2 +-
 lib/dtas/track.rb               | 2 +-
 7 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/bin/dtas-readahead b/bin/dtas-readahead
index 3f46b95..996142c 100755
--- a/bin/dtas-readahead
+++ b/bin/dtas-readahead
@@ -141,7 +141,7 @@ def do_open(path)
         buf << fp.read(fp.size - 4)
         Dir.chdir(File.dirname(path)) do
           yml = DTAS.yaml_load(buf)
-          x = yml['infile'] and return File.open(File.expand_path(x).freeze)
+          x = yml['infile'] and return File.open(-File.expand_path(x))
         end
       end
     end
@@ -158,9 +158,8 @@ def do_open(path)
   cur = DTAS.yaml_load(c.req('current'))
   while @todo_ra > 0 && fp.nil?
     if current = cur['current']
-      track = current['infile']
+      track = -current['infile']
       break unless track.kind_of?(String)
-      track.freeze
       fp = work[track] ||= do_open(track)
       cur_pid = current['pid']
       if fp
@@ -197,7 +196,7 @@ def do_open(path)
     repeat = c.req('tl repeat').split[-1]
     while @todo_ra > 0 && idx && (cid = ids[idx])
       fp = nil
-      track = c.req("tl get #{cid}").sub!(/\A1 \d+=/, '').freeze
+      track = -(c.req("tl get #{cid}").sub!(/\A1 \d+=/, ''))
       begin
         fp = work[track] ||= do_open(track)
       rescue SystemCallError
diff --git a/lib/dtas/edit_client.rb b/lib/dtas/edit_client.rb
index a885060..036d036 100644
--- a/lib/dtas/edit_client.rb
+++ b/lib/dtas/edit_client.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
+# Copyright (C) all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
 require 'tempfile'
@@ -14,7 +14,7 @@ def editor
       v.empty? and next
       return v
     end
-    'vi'.freeze
+    'vi'
   end
 
   def client_socket
diff --git a/lib/dtas/mcache.rb b/lib/dtas/mcache.rb
index 817bfb8..4f1e9e8 100644
--- a/lib/dtas/mcache.rb
+++ b/lib/dtas/mcache.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2020 all contributors <dtas-all@nongnu.org>
+# Copyright (C) all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
 # encoding: binary
@@ -22,7 +22,7 @@ def lookup(infile)
     @tbl[bucket] = begin
       cur = cur ? cur.clear : {}
       if ret = yield(infile, cur)
-        ret[:infile] = infile.frozen? ? infile : infile.dup.freeze
+        ret[:infile] = infile.frozen? ? infile : -(infile.dup)
         ret[:btime] = DTAS.now
       end
       ret
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index ff7440f..243f0b0 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -208,13 +208,13 @@ def client_iter(io, msg)
     command = msg.shift
     case command
     when "enq"
-      enq_handler(io, msg[0])
+      enq_handler(io, -msg[0])
     when "enq-cmd"
-      enq_handler(io, { "command" => msg[0]})
+      enq_handler(io, { "command" => -msg[0]})
     when "pause", "play", "play_pause"
       play_pause_handler(io, command)
     when "pwd"
-      io.emit(Dir.pwd)
+      io.emit(-Dir.pwd)
     else
       m = "dpc_#{command.tr('-', '_')}"
       __send__(m, io, msg) if respond_to?(m)
diff --git a/lib/dtas/sigevent/fiddle_efd.rb b/lib/dtas/sigevent/fiddle_efd.rb
index 40cec77..ec9ec65 100644
--- a/lib/dtas/sigevent/fiddle_efd.rb
+++ b/lib/dtas/sigevent/fiddle_efd.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
+# Copyright (C) all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
 
@@ -13,7 +13,7 @@ class DTAS::Sigevent # :nodoc:
     Fiddle::TYPE_INT) # fd
 
   attr_reader :to_io
-  ONE = [ 1 ].pack('Q').freeze
+  ONE = -([ 1 ].pack('Q'))
 
   def initialize
     fd = EventFD.call(0, 02000000|00004000) # EFD_CLOEXEC|EFD_NONBLOCK
diff --git a/lib/dtas/source/sox.rb b/lib/dtas/source/sox.rb
index e38e23c..6ca29bc 100644
--- a/lib/dtas/source/sox.rb
+++ b/lib/dtas/source/sox.rb
@@ -63,7 +63,7 @@ def mcache_lookup(infile)
         comments.each do |k,v|
           v.chomp!
           DTAS.try_enc(v, enc)
-          comments[k] = v
+          comments[k] = -v
         end
       end
       dst
diff --git a/lib/dtas/track.rb b/lib/dtas/track.rb
index 85b667a..3f4b813 100644
--- a/lib/dtas/track.rb
+++ b/lib/dtas/track.rb
@@ -9,6 +9,6 @@ class DTAS::Track # :nodoc:
 
   def initialize(track_id, path)
     @track_id = track_id
-    @to_path = path
+    @to_path = -path
   end
 end


^ permalink raw reply related	[relevance 6%]

* [PATCH 0/9] various cuts for memory savings
@ 2022-01-23 21:37  6% Eric Wong
  2022-01-23 21:37  6% ` [PATCH 1/9] deduplicate and freeze pathnames + metadata Eric Wong
  0 siblings, 1 reply; 4+ results
From: Eric Wong @ 2022-01-23 21:37 UTC (permalink / raw)
  To: dtas-all

"dtas-tl prune" can simplify life a bit for users who frequently
replace/rename tracks on their FS (I do it while editing audio
with dtas-splitfx).

Moving to Ruby 2.3 lets us depend on a bunch of newer APIs and
compatibility code can be dropped, since YARV instructions for
old versions still remain.  The overall difference isn't very
noticeable, but the diffstat showing deleted lines is nice.

Eric Wong (9):
  deduplicate and freeze pathnames + metadata
  player: remove omap conversion
  dtas: drop unnecessary "require 'yaml'" statements
  dtas-tl prune: cull missing files from tracklist
  dtas-tl: drop encoding hacks, use binary stdout+stderr
  use IO#wait_readable consistently
  get rid of DTAS::Nonblock wrapper for Ruby <= 2.0
  unix_accepted: drop Ruby < 2.3 support code
  do not check IO#closed? before calling IO#close

 Documentation/dtas-tl.pod        |  4 ++-
 bin/dtas-console                 |  1 -
 bin/dtas-msinkctl                |  1 -
 bin/dtas-player                  |  3 +-
 bin/dtas-readahead               | 26 ++++-----------
 bin/dtas-splitfx                 |  1 -
 bin/dtas-tl                      | 55 +++++++++++++++++---------------
 lib/dtas/buffer.rb               |  4 +--
 lib/dtas/buffer/read_write.rb    |  3 +-
 lib/dtas/edit_client.rb          |  5 ++-
 lib/dtas/mcache.rb               |  4 +--
 lib/dtas/nonblock.rb             | 24 --------------
 lib/dtas/pipe.rb                 |  5 ++-
 lib/dtas/player.rb               | 14 +++-----
 lib/dtas/process.rb              |  5 ++-
 lib/dtas/sigevent/fiddle_efd.rb  |  7 ++--
 lib/dtas/sigevent/pipe.rb        |  5 ++-
 lib/dtas/sink.rb                 |  3 +-
 lib/dtas/source/sox.rb           |  2 +-
 lib/dtas/source/splitfx.rb       |  1 -
 lib/dtas/track.rb                |  2 +-
 lib/dtas/unix_accepted.rb        | 49 +++++++---------------------
 lib/dtas/unix_client.rb          |  4 +--
 lib/dtas/unix_server.rb          | 16 ++--------
 lib/dtas/watchable.rb            |  3 +-
 lib/dtas/watchable/fiddle_ino.rb |  2 +-
 test/player_integration.rb       |  3 +-
 test/test_buffer.rb              |  2 +-
 test/test_encoding.rb            |  1 -
 test/test_splitfx.rb             |  1 -
 test/test_tfx.rb                 |  1 -
 test/test_unixserver.rb          |  2 +-
 32 files changed, 84 insertions(+), 175 deletions(-)
 delete mode 100644 lib/dtas/nonblock.rb


^ permalink raw reply	[relevance 6%]

Results 1-4 of 4 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-01-23 21:37  6% [PATCH 0/9] various cuts for memory savings Eric Wong
2022-01-23 21:37  6% ` [PATCH 1/9] deduplicate and freeze pathnames + metadata Eric Wong
2022-01-27  7:12  7% [PATCH] readahead: do not call -@ on non-String Eric Wong
2022-02-03  5:15  6% [ANN] dtas 0.20.0 - duct tape audio suite for *nix Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).