Audio-Nama

 view release on metacpan or  search on metacpan

lib/Audio/Nama/Help.pm  view on Meta::CPAN

	# full help for LADSPA/LV2 plugins
	
	elsif ( $id =~ /el:/  ) { @output = $fx_cache->{ladspa_help}->{$id} }
	elsif ( $id =~ /elv2:/) { @output = $fx_cache->{lv2_help}->{$id}    }

	if( $no_match ){ throw("No effects were found matching: $input\n\n"); }
	else { Audio::Nama::pager(@output) }
}

sub find_effect {
	my @keys = @_;
	#print "keys: @keys\n";
	#my @output;
	my @matches = grep{ 
		my $_help = $_; 
		my $didnt_match;
		map{ $_help =~ /\Q$_\E/i or $didnt_match++ }  @keys;
		! $didnt_match; # select if no cases of non-matching
	} grep{$_} @{$fx_cache->{user_help}};
	if ( @matches ){
	Audio::Nama::pager( $text->{wrap}->paragraphs(@matches) , "\n" );
	} else { throw(join " ", "No effects were found matching:",@keys,"\n\n") }
}

sub parse_midi_help {
	my $h = get_data_section("midi_help");
	my @lines = split $/, $h;
	my $j;
	my $cmd;
	my %acc;
	for (@lines)
	{
	 /(^\w+)/ 
		? ($cmd = $1, $acc{$cmd} = [], $j++)
		: (push @{$acc{$cmd}}, $_ );
	}
	$help->{midish} = \%acc;
	return
}

## Initialization


@{ $help->{arr_topic} } = qw(
project
track_basics
track_status
wav_versions
transport
track_fader
effect_info
effect_manipulation
marks
time_shifting
track_io
inserts
fades
group
bus
mixdown
prompt
normalization
track_caching
effect_chains
effect_profiles
advanced_transport
version_control
diagnostics
edits
advanced
                ) ;
my $i;
my @display_index = map{ $help->{index}->{++$i} = $_;  # integer => topic key
                            s/_/ /g; 
                            my $name = ucfirst $_; 
                            $help->{title}->[$i] = $name;
                            $name = join " ",$i, $name;
                            $help->{display}->[$i] = $name;
                            } @{ $help->{arr_topic} };
sub pad {
    my ($text, $len) = @_;
    my $pad = ' ' x ( $len - length $text);
    $text.$pad
}
my @twocolumn = map{ pad($display_index[$_], 22).$display_index[$_+13].$/ } 0..12;


%{ $help->{topic} }  = (

help => <<HELP,
   help <command>       - show help for <command>
   help <fragment>      - show help for commands matching /<fragment>/
   help <ladspa_id>     - info on a LADSPA id
   help <topic_number>  - list commands under <topic_number> 
HELP

project => <<'PROJECT',
   load-project, load      - load an existing project, e.g 'load <project-name>'
   create-project, create  - create a new project (usually under $HOME/nama/project-name/)
   list-projects, lp       - list all projects
   undo                    - go back in time to the state before the last command
   redo                    - reapply the step rolled back by undo
   exit, quit              - exit program, saving state 


PROJECT

track_basics => <<'TRACKBASICS',
   add-track, add          - Create a new track

      Example: add sax     - Add a new track 'sax', mono by default.
                           - Sax is selected, and receives next commands.
               source 3    - Use soundcard channel 3 as input
               rec         - Arm for recording an audio file (e.g. sax_1.wav)
               start       - Start engine, begin recording
               stop        - Stop engine, close file and queue for playback
     
               <SPACE> can be used at the prompt to start and stop engine
   
      Example: add piano; source synth; stereo; rec
   
      This line of commands prepares to record track 'piano' in stereo 
      width from JACK client 'synth'. Use of semicolons allow several 
      commands in one line of input.

   import-audio, import    - Import a .wav file, resampling if necessary
   remove-track            - Remove effects, parameters and GUI for current track
TRACKBASICS

track_status => <<'TRACKSTATUS',

Prepare conditions for next engine run

   rec              -  REC: record and monitor audio source
   mon              -  MON: monitor audio source
   play             -  PLAY: queue .wav file for playback
   off              -  OFF: omit track from audio network
   show-tracks,show - show status, all tracks
   show-track,sh    - show status of current track, including effects, versions, etc.
   chains           - show the audio network configuration
TRACKSTATUS


wav_versions => <<'WAV_VERSIONS',
   list-version, lver       - list version numbers of audio files in the current track
                            - (this information also appears in the show-track listing)
   set-version, version, n  - select a version number for the current track

A track can record multiple audio files ('takes'). The audio filenames
follow the trackname so that recording a track named 'piano' will
produce files with names with names like piano_1.wav, piano_2.wav.
Audio files recorded by Nama are considered immutable resources and
stored outside of version control.

One version can be selected as streaming source when when the track is
set to PLAY. The version number is zero by default, which means
select the most recent (highest numbered) take. The bus-version command
will set default version number for all tracks belonging to the current 
bus.
WAV_VERSIONS

transport => <<TRANSPORT,
   start, t, SPACE    -  Start processing. SPACE must be at beginning of command line.
   stop, s, SPACE     -  Stop processing. SPACE must be at beginning of command line.
   rewind, rw         -  Rewind  some number of seconds, i.e. rw 15
   forward, fw        -  Forward some number of seconds, i.e. fw 75
   setpos, sp         -  Set the playback head position, i.e. setpos 49.2
   getpos, gp         -  Get the current head position 
   jump-to-start, beg   - set playback head to beginning of audio file(s)
   jump-to-end, end     - set playback head to end
TRANSPORT
track_fader => <<'TRACKFADER',
   Track volume/pan fader can be used to change settings for the current track.

   pan, p                   -  get/set pan position
   pan-back, pb             -  restore pan after pr/pl/pc  
   pan-center, pc           -  set pan center    
   pan-left, pl             -  pan track fully left    

lib/Audio/Nama/Help.pm  view on Meta::CPAN

                                example: wet 99 (99% wet, 1% dry)
INSERTS
fades => <<FADES,
   add-fade,         afd, fade  - add fade (in or out) to current track
                                  examples: 
                                      fade in song-start 0.2
                                  (fades in at mark 'song-start' over 0.2 s)
                                      fade out 0.5 song-start
                                  (fades out over 0.5 s ending at 'song-start')
                                  
   remove-fade,      rfd        - remove fade (by index)
   list-fade         lfd        - list all fades
FADES

group => <<GROUP,
Group control
   new-bunch, bunch, nb       - name a bunch of tracks
                                e.g. bunch strings violins cello bass
                                e.g. bunch 3 4 6 7 (track indexes)
   list-bunches,     lb       - list groups of tracks (bunches)
   remove-bunches,   rb       - remove bunch definitions

   for                   - execute commands on several tracks 
                           by name, or by specifying a group or bunch
                           example: for strings; vol +10
                           example: for drumkit congas; mute
                           example: for 3 5; vol * 1.5
                           example: for Main; version 5;; show
                            (operates on all tracks in bus Main,
                            commands following ';;' execute only once)
                           example: for bus; version 5
                            (operates on tracks in current bus)
                           example: for rec; off
                            (operates on tracks in current bus set to 'rec')
                           example: for OFF; off
                            (operates on tracks in current bus w/status OFF)
GROUP

bus => <<BUS,
   add-bus, abs         - create a sub-bus feeding a regular user track
                          of the same name
                          example: add-bus Strings 
                                   add-tracks violin cello bass
                                   for cello violin bass; move-to-bus Strings
   list-buses, lbs      - list bus data
   remove-bus           - remove a bus
   bus-version          - select default .wav version for all tracks on bus
   bus-off              - set all tracks belonging to bus to OFF
   bus-on               - restore bus tracks to status at previous bus-off
BUS

mixdown => <<MIXDOWN,
   mixdown,    mxd             - enable mixdown 
   mixoff,     mxo             - disable mixdown 
   mixplay,    mxp             - playback a recorded mix 
   automix                     - normalize track vol levels, then mixdown
   master-on,  mr              - enter mastering mode
   master-off, mro             - leave mastering mode
MIXDOWN

prompt => <<PROMPT,
   The prompt displays the name of the project and currently selected track and
   bus (if other than Main.)

   nama allegro violin / Strings > 

   At the command prompt, you can enter several types
   of commands:

   Type                        Example
   ------------------------------------------------------------
   Nama commands               load somesong
   Ecasound commands           cs-is-valid
   Shell expressions           ! ls
   Perl code                   eval 2*3     # prints '6'

   Many commands in Nama operate on the currently selected track or 'current track'. 
   track name or number to a command sets the current track before the command
   executes.  For example, to mute the volume for a track called 'sax', you could
   say 'sax mute', or even something like '4 mute'. Using the track number
   can be convenient when executing commands on multiple tracks as 'for 4 5 6; unmute'

PROMPT

normalization => <<'NORMAL',
Normalization

   ecanormalize, normalize, norm 
                           - run ecanormalize on current track version
   ecafixdc, fixdc         - run ecafixdc on current track version
   autofix-tracks, autofix - fixdc and normalize selected versions of all PLAY
NORMAL

track_caching => <<'CACHING',
Track caching (freezing) - render effects to a new .wav file to fix a result and save cpu

   cache                       - cache the output of a track or bus as a .wav file
   uncache                     - restore effects and settings prior to cache operation
CACHING

effect_chains => <<'EFFECT_CHAINS',

Effect chains are presets that can consist of multiple effects. They are a
convenient way to save by name sequences of effects with the parameters that
you commonly use. You make an effect chain by saving effects from the current
track. 

   find-effect-chains,     fec   - find all effect chains (filtering on key/value pairs, if supplied)
   find-user-effect-chains,fuec  - find all user-defined effect chains, filtering as above
   new-effect-chain,       nec   - define a new effect chain
   overwrite-effect-chain, oec   - as above, but overwite existing definition
   add-effect-chain,       aec   - add an effect chain to the current track
   delete-effect-chain,    dec   - delete an effect chain definition
EFFECT_CHAINS

effect_profiles => <<'EFFECT_PROFILES',
Effect profiles (effect chains for a group of tracks)

An effect profile is a group of effect chains, saved with the tracks that
configure them. It is a convenient way to share parts of a project among other
projects. 

   new-effect-profile, nep       - define a new effect profile
   apply-effect-profile, aep     - apply an effect profile
                                   (current effects are bypassed)
   overlay-effect-profile, oep   - apply an effect profile,
                                   adding to current effects



( run in 0.907 second using v1.01-cache-2.11-cpan-0b5f733616e )