Audio-Nama
view release on metacpan or search on metacpan
lib/Audio/Nama.pm view on Meta::CPAN
what: Select (and move to) rec end mark of the current edit.
short: rem
parameters: none
set_play_start_mark:
type: edit
what: Set play-start-mark to the current playback position.
short: spsm
parameters: none
set_rec_start_mark:
type: edit
what: Set rec-start-mark to the current playback position.
short: srsm
parameters: none
set_rec_end_mark:
type: edit
what: Set rec-end-mark to current playback position.
short: srem
parameters: none
disable_edits:
type: edit
what: |
Turn off the edits for the current track and playback
the original WAV file. This will remove the edit bus.
short: ded
parameters: none
merge_edits:
type: edit
what: Mix edits and original into a new host-track. this will write a new audio file to disk and the host track will have a new version for this.
short: med
parameters: none
explode_track:
type: track
what: Make the current track into a sub bus, with one track for each version.
parameters: none
move_to_bus:
type: track
what: Move the current track to another bus. A new track is always in the Main bus. So to reverse this action use move-to-bus Main .
short: mtb
parameters: <string:bus_name>
example: |
asub Drums # Create a new sub bus, called Drums.
snare # Make snare the current track.
mtb Drums # Move the snare track into the sub bus Drums.
promote_version_to_track:
type: track
what: Create a read-only track using the specified version of the current track.
short: pvt
parameters: <integer:version_number>
read_user_customizations:
type: general
what: Re-read the user customizations file 'custom.pl'.
short: ruc
parameters: none
limit_run_time:
type: setup
what: Stop recording after the last audio file finishes playing. Can be turned off with limit-run-time_off.
short: lr
parameters: [ <float:additional_seconds> ]
limit_run_time_off:
type: setup
what: Disable the recording stop timer.
short: lro
parameters: none
offset_run:
type: setup
what: Record/play from a mark, rather than from the start, i.e. 0.0 seconds.
short: ofr
parameters: <string:mark_name>
offset_run_off:
type: setup
what: Turn back to starting from 0.
short: ofro
parameters: none
view_waveform:
type: general
what: Launch mhwavedit to view/edit waveform of the current track and version. This requires to start Nama on a graphical terminal, like xterm or gterm or from GNOME via alt+F2 .
short: wview
parameters: none
edit_waveform:
type: general
what: Launch audacity to view/edit the waveform of the current track and version. This requires starting Nama on a graphical terminal like xterm or gterm or from GNOME starting Nama using alt+F2 .
short: wedit
parameters: none
rerecord:
type: setup
what: Record as before. This will set all the tracks to record, which have been recorded just before you listened back.
short: rerec
parameters: none
example: |
for piano guitar;rec # Set piano and guitar track to record.
! do your recording and ilstening.
! You want to record another version of both piano and guitar:
rerec # Sets piano and guitar to record again.
analyze_level:
type: track
what: Print Ecasound amplitude analysis for current track. This will show highest volume and statistics.
short: anl
parameters: none
for:
type: general
what: Execute command(s) for several tracks.
parameters: <string:track_name_1> [ <string:track_name_2>} ... ; <string:commands>
example: |
for piano guitar; vol - 3; pan 75 # reduce volume and pan right
for snare kick toms cymbals; mtb Drums # move tracks to bus Drums
git:
type: project
what: execute git command in the project directory
parameters: <string:command_name> [arguments]
edit_rec_setup_hook:
type: track
what: edit the REC hook script for current track
short: ersh
parameters: none
edit_rec_cleanup_hook:
type: track
what: edit the REC cleanup hook script for current track
short: erch
parameters: none
remove_fader_effect:
type: track
lib/Audio/Nama.pm view on Meta::CPAN
select_edit: _select_edit dd { Audio::Nama::select_edit($item{dd}); 1}
preview_edit_in: _preview_edit_in { Audio::Nama::edit_action($item[0]); 1}
preview_edit_out: _preview_edit_out { Audio::Nama::edit_action($item[0]); 1}
play_edit: _play_edit { Audio::Nama::edit_action($item[0]); 1}
record_edit: _record_edit { Audio::Nama::edit_action($item[0]); 1}
edit_track: _edit_track {
Audio::Nama::select_edit_track('edit_track'); 1}
host_track_alias: _host_track_alias {
Audio::Nama::select_edit_track('host_alias_track'); 1}
host_track: _host_track {
Audio::Nama::select_edit_track('host'); 1}
version_mix_track: _version_mix_track {
Audio::Nama::select_edit_track('version_mix'); 1}
play_start_mark: _play_start_mark {
my $mark = $Audio::Nama::this_edit->play_start_mark;
$mark->jump_here; 1;
}
rec_start_mark: _rec_start_mark {
$Audio::Nama::this_edit->rec_start_mark->jump_here; 1;
}
rec_end_mark: _rec_end_mark {
$Audio::Nama::this_edit->rec_end_mark->jump_here; 1;
}
set_play_start_mark: _set_play_start_mark {
$Audio::Nama::setup->{edit_points}->[0] = Audio::Nama::ecasound_iam('getpos'); 1}
set_rec_start_mark: _set_rec_start_mark {
$Audio::Nama::setup->{edit_points}->[1] = Audio::Nama::ecasound_iam('getpos'); 1}
set_rec_end_mark: _set_rec_end_mark {
$Audio::Nama::setup->{edit_points}->[2] = Audio::Nama::ecasound_iam('getpos'); 1}
end_edit_mode: _end_edit_mode { Audio::Nama::end_edit_mode(); 1;}
disable_edits: _disable_edits { Audio::Nama::disable_edits();1 }
merge_edits: _merge_edits { Audio::Nama::merge_edits(); 1; }
explode_track: _explode_track {
Audio::Nama::explode_track($Audio::Nama::this_track)
}
promote_version_to_track: _promote_version_to_track version {
my $v = $item{version};
my $t = $Audio::Nama::this_track;
$t->versions->[$v] or Audio::Nama::pager($t->name,": version $v does not exist."),
return;
Audio::Nama::VersionTrack->new(
name => $t->name.":$v",
version => $v,
target => $t->name,
rw => Audio::Nama::PLAY,
group => $t->group,
);
}
version: dd
read_user_customizations: _read_user_customizations {
Audio::Nama::setup_user_customization(); 1
}
limit_run_time: _limit_run_time sign(?) dd {
my $sign = $item{'sign(?)'}->[-1];
$Audio::Nama::setup->{runtime_limit} = $sign
? eval "$Audio::Nama::setup->{audio_length} $sign $item{dd}"
: $item{dd};
Audio::Nama::pager( "Run time limit: ", Audio::Nama::heuristic_time($Audio::Nama::setup->{runtime_limit})); 1;
}
limit_run_time_off: _limit_run_time_off {
Audio::Nama::pager( "Run timer disabled");
Audio::Nama::disable_length_timer();
1;
}
offset_run: _offset_run markname {
Audio::Nama::set_offset_run_mark( $item{markname} ); 1
}
offset_run_off: _offset_run_off {
Audio::Nama::pager( "no run offset.");
Audio::Nama::disable_offset_run_mode();
}
view_waveform: _view_waveform {
my $viewer = 'mhwaveedit';
if( `which $viewer` =~ m/\S/){
my $cmd = join " ",
$viewer,
"--driver",
$Audio::Nama::jack->{jackd_running} ? "jack" : "alsa",
$Audio::Nama::this_track->full_path,
"&";
system($cmd)
}
else { Audio::Nama::throw("Mhwaveedit not found. No waveform viewer is available.") }
}
edit_waveform: _edit_waveform {
if ( `which audacity` =~ m/\S/ ){
my $cmd = join " ",
'audacity',
$Audio::Nama::this_track->full_path,
"&";
my $old_pwd = Audio::Nama::getcwd();
chdir Audio::Nama::this_wav_dir();
system($cmd);
chdir $old_pwd;
}
else { Audio::Nama::throw("Audacity not found. No waveform editor available.") }
1;
}
rerecord: _rerecord {
Audio::Nama::pager(
scalar @{$Audio::Nama::setup->{_last_rec_tracks}}
? "Toggling previous recording tracks to REC"
: "No tracks in REC list. Skipping."
);
map{ $_->set(rw => Audio::Nama::REC) } @{$Audio::Nama::setup->{_last_rec_tracks}};
Audio::Nama::restore_preview_mode();
1;
}
show_track_latency: _show_track_latency {
my $node = $Audio::Nama::setup->{latency}->{track}->{$Audio::Nama::this_track->name};
Audio::Nama::pager( Audio::Nama::json_out($node)) if $node;
1;
}
show_latency_all: _show_latency_all {
Audio::Nama::pager( Audio::Nama::json_out($Audio::Nama::setup->{latency})) if $Audio::Nama::setup->{latency};
1;
}
analyze_level: _analyze_level { Audio::Nama::check_level($Audio::Nama::this_track);1 }
something: /\S.+/
git: _git something {
my @result = map{ $_ .= "\n" } $Audio::Nama::project->{repo}->run( split " ", $item{something});
Audio::Nama::pager(@result);
lib/Audio/Nama.pm view on Meta::CPAN
set the current sysex bank, i.e. the one that will be recorded. The current sysex back is the one affected by all sysex editing functions.
getx
return the current sysex bank or ``nil'' if none
ci channame
set the current (named) input channel. All input channel editing functions will act on it.
geti
return the name of the current input channel or ``nil'' if none
co channame
set the current (named) output channel. All output channel editing functions will act on it.
geto
return the name of the current output channel or ``nil'' if none
setunit ticks_per_unit
set the time resolution of the sequencer to ``tpu'' ticks in a whole note (1 unit note = 4 quarter notes). The default is 96 ticks, which is the default of the MIDI standard.
getunit
return the number of ticks in a whole note
fac tempo_factor
set the tempo factor for play and record to the given integer value. The tempo factor must be between 50 (play half of the real tempo) and 200 (play at twice the real tempo).
getfac
return the current tempo factor
t beats_per_minute
set the tempo at the current song position
mins amount {num denom}
insert ``amount'' blank measures at the current song position. The time signature used is num/denom. If the time signature is an empty list (i.e. ``{}'') then the time signature at the current position is used.
mcut
cut the current selection of all tracks, including the time structure.
mdup where
duplicate the current selection inserting a copy of it at the position given by the ``where'' parameter. The target position is a measure number relative to the current selection to be copied. If ``where'' is positive it's relative to the end of ...
minfo
print the meta-track (tempo changes, time signature changes.
mtempo
Return the tempo at the current song position. The unit is beats per minute.
msig
Return the time signature at the current song position. The result is a two number list: numerator and denominator.
mend
Return the ending measure of the song (i.e. its size in measures).
ls
list all tracks, channels, filters and various default values
save filename
save the song into the given file. The ``filename'' is a quoted string.
load filename
load the song from a file named ``filename''. the current song is destroyed, even if the load command fails.
reset
destroy completely the song, useful to start a new song without restarting the program
export filename
save the song into a standard MIDI file, ``filename'' is a quoted string.
import filename
load the song from a standard MIDI file, ``filename'' is a quoted string. Only MIDI file ``type 1'' and ``type 0'' are supported.
dlist
return the list of attached devices (list of numbers)
dnew devnum filename mode
attach MIDI device ``filename'' as device number ``devnum''; ``filename'' is a quoted string. The ``mode'' argument is the name of the mode, it can be on if the following:
``ro'' - read-only, for input only devices
``wo'' - write-only, for output only devices
``rw'' - read and write.
If midish is configured to use ALSA (default on Linux systems) then ``filename'' should contain the ALSA sequencer port, as listed by ``aseqdump -l'', (eg. ``28:0'', ``FLUID Synth (qsynth)''). If ``nil'' is given instead of the path, then the por...
ddel devnum
detach device number ``devnum''
dmtcrx devnum
use device number ``devnum'' as MTC source. In this case, midish will relocate, start and stop according to incoming MTC messages. Midish will generate its clock ticks from MTC, meaning that it will run at the same speed as the MTC device. This i...
dmmctx { devnum1 devnum2 ... }
Configure the given devices to transmit MMC start, stop and relocate messages. Useful to control MMC-capable audio applications from midish. By default, devices transmit MMC.
dclktx { devnum1 devnum2 ... }
Configure the given devices to transmit MIDI clock information (MIDI ticks, MIDI start and MIDI stop events). Useful to synchronize an external sequencer to midish.
dclkrx devnum
set device number ``devnum'' to be the master MIDI clock source. It will give midish MIDI ticks, MIDI start and MIDI stop events. This useful to synchronize midish to an external sequencer. If ``devnum'' is ``nil'', then the internal clock will b...
dclkrate devnum ticrate
set the number of ticks in a whole note that are transmitted to the MIDI device (if dclktx was called for it). Default value is 96 ticks. This is the standard MIDI value and its not recommended to change it.
dinfo devnum
Print some information about the MIDI device.
dixctl devnum list
Setup the list of controllers that are expected to be received as 14-bit numbers (i.e. both coarse and fine MIDI controller messages will be expected). By default only coarse values are used, if unsure let this list empty.
devoxctl devnum list
Setup the list of controllers that will be transmitted as 14-bit numbers (both coarse and fine MIDI controller messages).
diev devnum list
Configure the device to process as a single event the following patterns of input MIDI messages.
``xpc'' - group bank select controllers (0 and 32) with program changes into a signle ``xpc'' event.
``nrpn'' - group NRPN controllers (98 and 99) with data entry controllers (6 and 38) into a single ``nrpn'' event.
``rpn'' - same as ``nrpn'', but for RPN controllers (100 and 101).
By default all of the above are enabled, which allows banks, NRPNs and RPNs to be handled by midish the standard way. It makes sense to disable grouping of above messages on rare hardware that maps above-mentioned controller numbers (0, 6, 32, 38...
doev devnum list
Same as diev but for output MIDI messages.
ctlconf ctlname ctlnumber defval
Configure controller number ``ctlnumber'' with name ``ctlname'', and default value ``defval''. If defval is ``nil'' then there is no default value and corresponding controller events are not grouped into frames. See sec. Controller frames.
ctlconfx ctlname ctlnumber defval
Same as ctlconf function, but for 14-bit controllers. Thus defval is in the range 0..16383.
ctlconf ctlname
Unconfigure the given controller. ``ctlname'' is the identifier that was used with ctlconf
ctlinfo
Print the list of configured controllers
evpat name sysex_pattern
Define a new event type corresponding to the given system exclusive message pattern. The pattern is a list of bytes or event parameter identifiers (aka atoms). The following atoms are supported: v0, v0_lo, v0_hi, v1, v1_lo, v1_hi. They correspond...
evpat master {0xf0 0x7f 0x7f 0x04 0x01 v0_lo v0_hi 0xf7}
defines a new event type for the standard master volume system exclusive message.
evinfo
Print the list of event patterns.
m mode
Set the mode of the metronome. The following modes are available:
``on'' - turned on for both playback and record
``rec'' - turned on for record only
``off'' - turned off
metrocf eventhi eventlo
select the notes that the metronome plays. The pair of events must be note-ons
info
display the list of built-in and user-defined procedures and global variables
print expression
display the value of the expression
err string
display the given string and abort the statement being executed.
h funcname
display list of arguments function ``funcname''
exec filename
read and executes the script from a file, ``filename'' is a quoted string. The execution of the script is aborted on error. If the script executes an exit statement, only the script is terminated.
debug flag val
set debug-flag ``flag'' to (integer) value ``val''. It's a developer knob. If ``val=0'' the corresponding debug-info are turned off. ``flag'' can be:
``filt'' - show events passing through the current filter
``mididev'' - show raw MIDI traffic on stderr
``mixout'' - show conflicts in the output MIDI merger
``norm'' - show events in the input normalizer
``pool'' - show pool usage on exit
``song'' - show start/stop events
``timo'' - show timer internal errors
``mem'' - show memory usage
version
Display midish version.
panic
Cause the sequencer to core-dump, useful to developpers.
proclist
Return the list of all user defined procs.
builtinlist
Return a list of all builtin commands.
@@ aux_midi_commands
# This is a Midish configuration file written by F. Silvain.
# Get Midish from:
# http://www.midish.org/
# This file is GPL version 3 or later.
# These commands should help you in your sequencing and editing workflow.
#---------------------------------------
# If appropriate commands return a positive number on success and 0 or nil
# otherwise. In case of errors commands will also print an error message.
# To get the most out of these commands define name input and output channels
# for your devices.
# List of Midish commands:
# fw measures
# Forward measures from curent position.
# rw measures
# Rewind measures from current position or if new position would be less than
# 0, go to 0.
# show
# Display all tracks with additional information.
# sh
# Display information about the current track.
# cclrm start_position clear_measures
# Remove clear_measure from the current track, starting at start_position.
# cclr start_position end_position
# Remove everything between start_position and end_position from current track.
# clrm track start_position clear_measures
# Remove clear_measures from track, starting at start_position.
# clr track start_position end_position
# Remove everything from track starting at start_position and ending at
# end_position.
# cmute
# Mute the current track
# cunmute
# Unmute the current track.
# csolo
# Mute all but the current track.
# solo track
# Mute all tracks, with the exception of track.
# nosolo
# Unmute all tracks.
# cquantm start_position quantise_measures quantise_note precision
# Quantise the current track.
# cquant start_position end_position quantise_note precision
# Quantise the current track.
# quantm track start_position quantise_measures quantise_note precision
# Quantise another track.
# quant track start_position end_position quantise_note precision
( run in 3.402 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )