From b4d72e7e89744cc8d2c65cd866d20d9aa39d3b5d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 10 Apr 2024 15:03:26 -0400 Subject: soxdial: fix timing for bluebox kp and kp2. --- soxdial | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/soxdial b/soxdial index f622a84..f86bd72 100755 --- a/soxdial +++ b/soxdial @@ -407,8 +407,9 @@ sub add_bluebox_digit { # --norm is needed because otherwise, the volume decreases as the number of # digits (tones for "synth") goes up. --norm=-3 helps avoid clipping. sub make_sox_subcmd { + my $length = shift || $digittime; my $cmd = "sox -n -b$bits $encoding -r$rate -c1 -traw - --norm=-3 "; - my $synth = " synth $digittime "; + my $synth = " synth $length "; my $delay = "delay "; for(0..$#freqs1) { @@ -654,8 +655,10 @@ for ($argc = 0; $argc < @ARGV; $argc++) { } warn "$SELF: start dial string '$_'\n" if $verbose; + my $time_override; if($bluebox) { if(/^(?:st[23]?|kp2?)/) { + $time_override = 0.1 if $_ eq 'kp' || $_ eq 'kp2'; add_bluebox_digit($_); } else { add_bluebox_digit($_) for split "", $_; @@ -672,7 +675,7 @@ for ($argc = 0; $argc < @ARGV; $argc++) { add_digit($digit); } } - push @sox_subcmds, make_sox_subcmd(); + push @sox_subcmds, make_sox_subcmd($time_override); push @sox_subcmds, silence_subcmd(randomize($intertime)); warn "$SELF: end dial string '$_'\n" if $verbose; -- cgit v1.2.3