Audio-Nama

 view release on metacpan or  search on metacpan

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

send:
  type: track
  what: Set an aux send for the current track. Remove sends with remove-send .
  short: aux
  parameters: <integer:soundcard_channel> | <string:jack_client_name> | <string:loop_id>
  example: |
    send 3 # Send the track output to soundcard channel 3.
    send jconvolver # Send the track output to the jconvolver JACK client.
remove_send:
  type: track
  what: Remove aux send from the current track.
  short: nosend noaux
  parameters: none
stereo:
  type: track
  what: Configure the current track to record two channels of audio
  parameters: none
mono:
  type: track
  what: Configure the current track to record one channel of audio
  parameters: none
set_version:
  type: track
  what: |
    Select a WAV file, by version number, for current track playback
    (Overrides a bus-level version setting)
  short: version ver
  parameters: <integer:version_number>
  example: |
    piano     # Select the piano track.
    version 2 # Select the second recorded version
    sh        # Display information about the current track
destroy_current_wav:
  type: track
  what: |
    Remove the currently selected recording version from the
    current track after confirming user intent. This DESTRUCTIVE
    command removes the underlying audio file from your disk.
    Use with caution.
  parameters: none
list_versions:
  type: track
  what: |
    List WAV versions of the current track. This will print the 
    numbers. 
  short: lver
  parameters: none
  example: |
    list-versions # May print something like: 1 2 5 7 9
    !             # The other versions might have been deleted earlier by you.
vol:
  type: track
  what: Change or show the current track's volume.
  short: v
  parameters: [ [ + | - | / | * ] <float:volume> ]
  example: |
    vol * 1.5 # Multiply the current volume by 1.5
    vol 75    # Set the current volume to 75
    !         # Depending on your namarc configuration, this means
    !         # either 75% of full volume (-ea) or 75 dB (-eadb).
    vol - 5.7 # Decrease current volume by 5.7 (percent or dB)
    vol       # Display the volume setting of the current track.
mute:
  type: track
  what: |
    Mute the current track by reducing the volume parameter.
    Use "unmute" to restore the former volume level.
  short: c cut
  parameters: none
unmute:
  type: track
  what: Restore previous volume level. It can be used after mute or solo.
  short: nomute C uncut
  parameters: none
unity:
  type: track
  what: Set the current track's volume to unity. This will change the volume to the default value (100% or 0 dB).
  parameters: none
  example: |
    vol 55 # Set volume to 55
    unity  # Set volume to the unity value.
    vol    # Display the current volume (should be 100 or 0, 
    !      # depending on your settings in namarc.)
solo:
  type: track
  what: |
    Mute all tracks but the current track or the tracks or 
    bunches specified. You can reverse this with nosolo.
  short: sl
  parameters: [ <strack_name_1> | <string:bunch_name_1> ] [ <string:track_name_2 | <string:bunch_name_2> ] ...
  example: |
    solo   # Mute all tracks but the current track.
    nosolo # Unmute all tracks, restoring prior state.
    solo piano bass Drums # Mute everything but piano, bass and Drums.
nosolo:
  type: track
  what: |
    Unmute all tracks which have been muted by a solo command.
    Tracks that had been muted before the solo command stay muted.
  short: nsl
  parameters: none
all:
  type: track
  what: |
    Unmute all tracks that are currently muted
  parameters: none
  example: |
    piano # Select track piano
    mute  # Mute the piano track.
    sax   # Select the track sax.
    solo  # Mute other tracks
    nosolo # Unmute other tracks (piano is still muted)
    all   # all tracks play
pan:
  type: track
  what: |
    Change or display the current panning position of the 
    current track. Panning is moving the audio in the stereo 
    panorama between right and left. Position is given in percent. 
    0 is hard left and 100 hard right, 50% is dead centre.
  short: p
  parameters: [ <float:pan_position_in_percent> ]
  example: |
    pan 75 # Pan the track to a position between centre and hard right
    p 50   # Move the current track to the centre.
    pan    # Show the current position of the track in the stereo panorama.
pan_right:
  type: track
  what: |
    Pan the current track hard right. this is a synonym for pan 100. 
    Can be reversed with pan-back.
  short: pr
  parameters: none
pan_left:
  type: track
  what: |
    Pan the current track hard left. This is a synonym for pan 0. 
    Can be reversed with pan-back.
  short: pl
  parameters: none
pan_center:
  type: track
  what: |
    Pan the current track to the centre. This is a synonym for pan 50.
    Can be reversed with pan-back.
  short: pc
  parameters: none
pan_back:
  type: track
  what: |
    Restore the current track's pan position prior to pan-left, 
    pan-right or pan-center commands.
  short: pb
  parameters: none
show_tracks:
  type: track 
  what: |
    Show a list of tracks, including their index number, volume, 
    pan position, recording status and source.
  short: lt show
  parameters: none
show_tracks_all:
  type: track
  what: Like show-tracks, but includes hidden tracks as well. Useful for debugging.
  short: sha showa
  parameters: none
show_bus:
  type: bus
  what: list tracks in current or named bus
  short: shb
  parameters: [ <string:busname> ]
show_track:
  type: track
  what: |
    Display full information about the current track: index, recording 
    status, effects and controllers, inserts, the selected
    WAV version, and signal width (channel count).
  short: sh -fart
  parameters: none
show_mode:
  type: setup
  what: |

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

    mfx CE 6,10 -3 
    ! Change parameters 6 and 10 of effect CE to -3
    !
    mfx D 4 + 10 
    ! Increase the fourth parameter of effect D by 10.
    ! 
    mfx A,B,C 3,6 * 5 
    ! Adjust parameters 3 and 6 of effect A, B and C by a factor of 5.
remove_effect:
  type: effect
  what: Remove effects. They don't have to be on the current track.
  short: rfx
  parameters: <fx_alias1> [ <fx_alias2> ] ...
position_effect:
  type: effect
  what: Position an effect before another effect (use 'ZZZ' for end).
  short: pfx
  parameters: <string:id_to_move> <string:position_id>
  example: |
    position-effect G F # Move effect with unique ID G immediately before effect F
show_effect:
  type: effect
  what: Show information about an effect, defaulting to current effect
  short: sfx
  parameters: [ <string:effect_id1> ] [ <string:effect_id2> ] ...
  example: |
    sfx # Display name, unique ID and parameters/controls of the current effect.
    sfx H # Display info on effect with unique ID H. H becomes the current effect.
dump_effect:
  type: effect
  what: Dump all data of current effect object
  short: dfx
list_effects:
  type: effect
  what: Print a short list of all effects on the current track, only including unique ID and effect name.
  short: lfx
  parameters: none
add_insert:
  type: effect 
  what: Add an external send/return insert to current track.
  short: ain
  parameters: |
      External: ( pre | post ) <string:send_id> [ <string:return_id> ]
      Local wet/dry: local
  example: |
    add-insert pre jconvolver 
    ! Add a prefader insert. The current track signal is sent 
    ! to jconvolver and returned to the vol/pan controls.
    add-insert post jconvolver csound 
    ! Send the current track postfader signal (after vol/pan
    ! controls) to jconvolver, getting the return from csound.
    guitar # Select the guitar track
    ain local # Create a local insert
    guitar-1-wet # Select the wet arm 
    afx G2reverb 50 5.0 0.6 0.5 0 -16 -20 # add a reverb
    afx etc 6 100 45 2.5 # add a chorus effect on the reverbed signal
    guitar # Change back to the main guitar track
    wet 25 # Set the balance between wet/dry track to 25% wet, 75% dry.
set_insert_wetness:
  type: effect 
  what: Set wet/dry balance of the insert for the current track. The balance is given in percent, 0 meaning dry and 100 wet signal only.
  short: wet
  parameters: [ pre | post ] <n_wetness>
  example: |
    wet pre 50 # Set the prefader insert to be balanced 50/50 wet/dry.
    wet 100 # Simpler if there's only one insert
remove_insert:
  type: effect
  what: Remove an insert from the current track.
  short: rin
  parameters: [ pre | post ]
  example: |
    rin # If there is only one insert on the current track, remove it.
    remove-insert post # Remove the postfader insert from the current track.
ctrl_register:
  type: effect
  what: List all Ecasound controllers. Controllers include linear controllers and oscillators.
  short: crg
  parameters: none
preset_register:
  type: effect
  what: List all Ecasound effect presets. See the Ecasound manpage for more detail on effect_presets.
  short: prg
  parameters: none
ladspa_register:
  type: effect
  what: List installed LADSPA plugins
  short: lrg
  parameters: none
list_marks:
  type: mark
  what: List all marks with index, name and their respective positions in time.
  short: lmk lm
  parameters: none
to_mark:
  type: mark
  what: Move the playhead to the named mark or mark index.
  short: tmk tom
  parameters: <string:mark_name> | <integer:mark_index>
  example: |
    to-mark sax_start # Jump to the position marked by sax_mark.
    tmk 2 # Move to the mark with the index 2.
add_mark:
  type: mark
  what: Drop a new mark at the current playback position. this will fail, if a mark is already placed on that exact position.
  short: mark amk k
  parameters: [ <string:mark_id> ]
  example: |
    mark start # Create a mark named "start" at the current position.
remove_mark:
  type: mark
  what: Remove a mark
  short: rmk
  parameters: [ <string:mark_name> | <integer:mark_index> ]
  example: |
    remove-mark start # remove the mark named start
    rmk 16 # Remove the mark with the index 16.
    rmk    # Remove the current mark
next_mark:
  type: mark
  what: Move the playhead to the next mark.

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

	} else {
		return 0;
	}
}

# Mute the current track
proc cmute {
	if [eval_cur_track] {
		mute [gett];
		return 1;
	} else {
		return 0;
	}
}

# Unmute the current track
proc cunmute {
	if [eval_cur_track] {
		unmute [gett];
		return 1;
	} else {
		return 0;
	}
}

# Mute all tracks but the current.
proc csolo {
	if [eval_cur_track] {
		let cur_track = [gett];
		for i in [tlist] {
			mute $i;
		}
		unmute $cur_track;
		return 1;
	} else {
		return 0;
	}
}

# Mute all tracks, except the given one.
proc solo my_track {
	if [eval_track $my_track] {
		let cur_track = [gett];
		ct $my_track;
		let cur_return_value = [csolo];
		sec_ct $cur_track;
		return $cur_return_value;
	} else {
		return 0;
	}
}

# Unmute all tracks
proc nosolo {
	for i in [tlist] {
		unmute $i;
	}
}

# Quantise current track to the nearest quantise_note denomination with a
# precision of precision percent starting at start_position for
# quantise_measures measures.
# Example:
# 	cquantm now 12 16 100 # quantise the next 8 measures to 16th notes with
# 	                     # 100% precision
proc cquantm start_position quantise_measures quantise_note precision {
	if [eval_cur_track] {
		let cur_pos = [getpos];
		let start_pos = [eval_pos $start_position];
		g $start_pos;
		if [getq] {
			let cur_quant = [getq];
		} else {
			let cur_quant = 8;
		}
		setq $quantise_note;
		sel $quantise_measures;
		tquant $precision;
		g $cur_pos;
		setq $cur_quant;
		return 1;
	} else {
		return 0;
	}
}

# Quantise a track to the nearest quantise_note denomination with a
# precision of precision percent starting at start_position for
# quantise_measures measures.
# Example:
# 	quantm piano 0 10 8 75 # quantise piano from beginning to 10 measures
# 	                      # to 8th notes with 75% precision
proc quantm my_track start_position quantise_measures quantise_note precision {
	if [eval_track $my_track] {
		let cur_track = [gett];
		ct $my_track;
		let cur_return_value = [cquant $start_position $quantise_measures $quantise_note $precision];
		sec_ct $cur_track;
		return $cur_return_value;
	} else {
		return 0;
	}
}

# Quantise the current track to the nearest quantise_note with a
# precision of precision percent starting at start_position upto
# end_position.
# Example:
# cquant 0 end 16 95
proc cquant start_position end_position quantise_note precision {
	let start_pos = [eval_pos $start_position];
	let end_pos = [eval_pos $end_position];
	if [eval_positive $start_pos $end_pos] {
		let quantise_measures = $end_pos - $start_pos;
		return [cquantm $start_pos $quantise_measures $quantise_note $precision];
	} else {
		return 0;
	}
}

# Quantise the track to the nearest quantise_note denomination with a
# precision of precision percent starting at start_position upto
# end_position.
# Example:
# 	quant piano 2 end 16 100
proc quant my_track start_position end_position quantise_note precision {
	let start_pos = [eval_pos $start_position];
	let end_pos = [eval_pos $end_position];
	if [eval_positive $start_pos $end_pos] {
		let quantise_measures = $end_pos - $start_pos;
		return [quantm $my_track $start_pos $quantise_measures $quantise_note $precision];
	} else {
		return 0;
	}
}

# Copy copy_measures from current track starting at start_position to
# dest_track at dest_position
# example:
# 	ccopym now 8 piano 16 # copy 8 measures starting now to piano at
# 	                      # measure 16
proc ccopym start_position copy_measures dest_track dest_position {
	if [eval_cur_track] {
		eval_dest_track $dest_track;
		let cur_track = [gett];
		let cur_pos = [getpos];
		let start_pos = [eval_pos $start_position];
		g $start_pos
		sel $copy_measures;
		tcopy;
		ct $dest_track;
		g $dest_position;
		tpaste;
		ct $cur_track;
		g $cur_pos;
		return 1;
	} else {
		return 0;
	}
}

# Copy copy_measures from start_position on the current track to dest_position
# on the current track.
# No action is taken if the two areas overlap.
# example:
#  icopym now 8 52 # copy 16 measures from current position to measure 52
proc icopym start_position copy_measures dest_position {
	if [eval_cur_track] {
		let cur_track = [gett];
		let start_pos = [eval_pos $start_position];
		let end_pos = $start_pos + $copy_measures;
		if [eval_positive $end_pos $dest_position] {
			return [ccopym $start_position $copy_measures $cur_track $dest_position];
		} else {
			print "Copy interval will overlap.";
			print "Too many measures to copy or destination position too early.";
			return 0;
		}
	} else {
		return 0;
	}
}

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

	return 1;
}

# Show list of tracks in my_group with additional information
# Example:
# 	tnew piano
# 	tnew bass
# 	let band = {piano bass}
# 	gshow $band
proc gshow my_group {
	let cur_track = [gett];
	show_header;
	for i in $my_group {
		tshow $i;
	}
	sec_ct $cur_track;
}

# Clear clear_measures from all tracks in the group starting at start_position
# Example:
# 	tnew piano
# 	tnew bass
# 	let band = {piano bass}
# 	gclrm $band now 8 # clear 8 measures, starting at measure 6
proc gclrm my_group start_position clear_measures {
	let cur_return_value = 1;
	for i in $my_group {
		let tmp_return_value = [clrm $i];
		if ($tmp_return_value == 0) {
			let cur_return_value = 0;
		}
	}
	return $cur_return_value;
}

# Clear all tracks in the group starting at start_position to end_position
# Example:
# 	tnew piano
# 	tnew bass
# 	let band = {piano bass}
# 	gclr $band 2 end
proc gclr my_group start_position end_position {
	let start_pos = [eval_pos $start_position];
	let end_pos = [eval_pos $end_position];
	if [eval_positive $start_pos $end_pos] {
		let cur_return_value = 1;
		let clear_measures = $end_pos - $start_pos;
		for i in $my_group {
			let tmp_return_value = [clrm $i $start_pos $clear_measures];
			if ($tmp_return_value == 0) {
				let cur_return_value = 0;
			}
		}
		return $cur_return_value;
	} else {
		return 0;
	}
}

# Quantise all track in the group to the nearest quantise_notes with a
# precision of precision percent, starting at start_position for
# quantise_measures measures.
# example:
# 	tnew piano
# 	tnew bass
# 	let band = {piano bass}
# 	gquantm $band now 10 16 100
proc gquantm my_group start_position quantise_measures quantise_note precision {
	let cur_return_value = 1;
	for i in $my_group {
		let tmp_return_value = [quantm $i $start_position $quantise_measures $quantise_note $precision];
		if ($tmp_return_value == 0) {
			let cur_return_value = 0;
		}
	}
	return $cur_return_value;
}

# Quantise all tracks in the group to the nearest quantise_note with a
# precision of precision percent starting at start_position upto
# end_position.
# Example:
# 	tnew piano
# 	tnew bass
# 	let band = {piano bass}
# 	gquant $band 0 now 8 75 # quantise from start to current position to 8th
# 	                        # with 100% precision
proc gquant my_group start_position end_position quantise_note precision {
	let start_pos = [eval_pos $start_position];
	let end_pos = [eval_pos $end_position];
	if [eval_positive $start_pos $end_pos] {
		let quantise_measures = $end_pos - $start_pos;
		return [gquantm $my_group $start_pos $quantise_measures $quantise_note $precision];
	} else {
		return 0;
	}
}

# Copy each track from the group to itself starting at start_position for
# copy_measure measures and put it all at dest_position.
proc gcopym my_group start_position copy_measures dest_position {
	let my_return_value = 1;
	for i in $my_group {
		let cur_return_value = [copym $i $start_position $copy_measures $i $dest_position];
		if ($cur_return_value == 0) {
			let my_return_value = 0;
		}
	}
	return $my_return_value;
}

# Copy the contents of each track in the group from start_position to
# end_position to itself at dest_position
# Example:
# 	gcopy $mystrings 2 9 10 # copy the group mystrings from measure 2 to measure
# 	                        # to measure 9 to measure 10
proc gcopy my_group start_position end_position dest_position {
	let start_pos = [eval_pos $start_position];
	let end_pos = [eval_pos $end_position];
	if [eval_positive $start_pos $end_pos] {
		let copy_measures = $end_pos - $start_pos;
		return [gcopym $my_group $start_pos $copy_measures $dest_position];
	} else {
		return 0;
	}
}

#---------------------------------------
## Device commands
# Add new synthesizers to your Midish setup

# Create new soft synthesizer with portname my_synth and midish name my_name
# Example:
# 	snew "LinuxSampler" ls
proc snew my_synth my_name {
	if ![oexists $my_name] {
		let cur_ochan = [geto];
		let index = 0
		for i in [dlist] {
			let index=$index+1;



( run in 2.129 seconds using v1.01-cache-2.11-cpan-97f6503c9c8 )