);
$mute->configure( -command => sub { &toggle_muting($mute, $n) });
# Solo
$solo = $track_frame->Button;
my @muted;
$solo->configure( -command => sub {
# do nothing if mix track
return if $n == 1; MIX
# do nothing if setup not connected
return if ! grep{/$session_name/} &eval_iam(q(cs-connected));
# do nothing if someone else is soloing;
return if grep{ &is_soloing($_) } grep {$_ != $n} @all_chains; # but some may
# not be in
# chain
# setup
# restore prior mute settings if I had been soloing
if (&is_soloing($n) ) {
$solo->configure(-foreground => $old_bg );
$solo->configure(-activeforeground => $old_bg );
map{ &toggle_mute($_) if $muted[$_] != &is_muted($_) }
grep{$_ != 1} @all_chains; # MIX
}
# otherwise save muted status for each track and mute all
else {
map{ $mute($_) = &is_muted($_) } grep{$_ != 1} @all_chains; # MIX
map{ &toggle_mute($_) }
grep {! &is_muted($_) }
grep {$_ != $n}
grep {$_ != 1}
@all_chains;
&is_muted($n) and &toggle_mute($n);
$solo->configure(-foreground => q(yellow) );
$solo->configure(-activeforeground => q(yellow) );
}
});
sub is_soloing { my $n = shift; $widget_c{$n}{solo}->cget('-foreground') eq q(yellow) } sub toggle_muting { my ($widget, $n) = @_; &toggle_mute($n); if (&is_muted($n)){ $widget->configure(-background => 'brown'); $widget->configure(-activebackground => 'brown'); } else { $widget->configure(-background => $old_bg); $widget->configure(-activebackground => $old_bg); } } sub toggle_mute { my $setup = &eval_iam("cs-connected"); $setup =~ /$session_name/ or return; # only work if connected setup my $n = shift; &is_muted; &eval_iam("c-select $n"); &eval_iam("c-muting"); &is_muted; }
sub is_muted { my $n = shift; my ($cs) = grep{/Chain "$n"/} split "\n", &eval_iam("cs"); # print "CS: $cs\n"; my $status = $cs =~ /muted/; print ( $status ? "track $n: muted\n" : "track $n: not muted\n"
);
$status;
}
outputs--->device->{$name}[chain_id1, chain_id2,...] |_>file->{ $file }->[chain_id1, chain_id2] |->loop_id->[ chain_id ]
intermediate->chain_id->"chain operators and routing, etc."
sub r5 { &r("eff5") };
&find_op_offsets reads the output of the cs command to determine
the number of chain operators from the setup file, then adds
two for the volume and pan operators, to give the index offset
for the first user effect.
Here is the relevant line from the 'cs' command output:
Chain "1" [selected] "Channel copy"
we will count the quotes, divide by two, and subtract one (for the chain id)
to get offset. Then we add two for volume and pan. Finally, we will
add 1, since perl arrays (used to represent chain operators) are indexed
starting at 0, whereas ecasound indexes operators starting at 1.
In this example, the first user effect will have an index of 4, which
will also be the offset needed for our start-at-zero array.
my %L; my %M;
map { $L{$_}++ } keys %effects_ladspa; map { $M{$_}++ } grep {/el:/} keys %effect_i;
for my $k (keys %L) { $M{$k} or print "$k not found in ecasound listing\n"; } for my $k (keys %M) { $L{$k} or print "$k not found in ladspa listing\n"; } exit;
print join "\n", sort keys %effects_ladspa; print '-' x 60, "\n"; print join "\n", grep {/el:/} sort keys %effect_i;
#print Dumper @effects; exit; exit;
ls $LADSPA_PATH | perl -ne 'chomp; s/$ENV{LADSPA_PATH}//; system qq(analyseplugin $_)'
my $ds = q( Plugin Name: "LS Filter" Plugin Label: "lsFilter" Plugin Unique ID: 1908 Maker: "Steve Harris <steve@plugin.org.uk>" Copyright: "GPL" Must Run Real-Time: No Has activate() Function: Yes Has deativate() Function: No Has run_adding() Function: Yes Environment: Normal or Hard Real-Time Ports: "Filter type (0=LP, 1=BP, 2=HP)" input, control, 0 to 2, default 0, integer "Cutoff frequency (Hz)" input, control, 0.002*srate to 0.5*srate, default 0.0316228*srate, logarithmic "Resonance" input, control, 0 to 1, default 0 "Input" input, audio "Output" output, audio );
13 POD Errors
The following errors were encountered while parsing the POD:
- Around line 562:
Unknown directive: =comment
- Around line 576:
Unknown directive: =comment
- Around line 685:
Unknown directive: =comment
- Around line 1208:
Unknown directive: =comment
- Around line 1233:
Unknown directive: =comment
- Around line 1392:
Unknown directive: =comment
- Around line 1413:
Unknown directive: =comment
- Around line 1978:
Unknown directive: =comment
- Around line 2339:
Unknown directive: =comment
- Around line 2791:
Unknown directive: =comment
- Around line 2895:
Unknown directive: =comment
- Around line 3634:
Unknown directive: =comment
- Around line 3680:
Unknown directive: =comment