BANDAMP EXAMPLES

ECMC PVC example file bandamp1
[Note: bandamp is an older PVC program available only on the ECMC SGI systems. There is no Linux version of bandamp.]

ECMC PVC and /sflib/x example "bandamp1" is a linear mix of two source examples: bandamp1-1 (heard first) and then bandamp1-2. - - - - Example "bandamp1-1" : uses the frequency response file of a fragment of a soprano tone created by example "freqresponse1 The input soundfile is the same soundfile (/sflib/voice/sop1.ds4) on which the freqresponse analysis was performed aiffinput=/sflib/voice/sop1.ds4 freqresponsefile=sop1.ds4.ss.fr # created by ECMC example script "freqresponse1" In the resynthesis, only partials with intensities between -20 and -96 dB are used. All of the stronger partial frequency components - those with intensities above -20dB - are eliminated: WINDOW_type__bandpass_0__bandreject_1=0 WINDOW_upper_threshold_in_dB=-20 # int, float or FUNC WINDOW_lower_threshold_in_dB=-96 # int, float or FUNC The result is a type of unvoiced singing, emphasizing the noise components within the tone The time varying amplitudes of the partials are smoothed out to eliminate artifacts that might otherwise occur: envelope_attack_in_seconds=.1 # int, float or FUNC envelope_release_in_seconds=.1 # int, float or FUNC To restore some of the amplitude lost by eliminating the stronger frequency components we increase the output amplitude by 12 dB: gain_in_decibels=12 # int, float or FUNC - - - Example "bandamp1-2" is identical to example "bandamp1-1" except that a violin tone (/sflib/string/vln.b3) is used as the input soundfile, rather than the soprano tone as in "bandamp1-1" aiffinput=/sflib/string/vln.b3


bandamp1-1.html

ECMC PVC example file bandamp1-1
# ECMC PVC example script "bandamp1-1" uses the frequency response # file of a fragment of a soprano tone created by example "freqresponse1 # The input soundfile is the same soundfile (/sflib/voice/sop1.ds4) # on which the freqresponse analysis was performed # aiffinput=/sflib/voice/sop1.ds4 # freqresponsefile=sop1.ds4.ss.fr # created by ECMC example script "freqresponse1" # In the resynthesis, only partials with intensities between -20 and -96 # dB are used. All of the stronger partial frequency components - those # with intensities above -20dB - are eliminated: # WINDOW_type__bandpass_0__bandreject_1=0 # WINDOW_upper_threshold_in_dB=-20 # int, float or FUNC # WINDOW_lower_threshold_in_dB=-96 # int, float or FUNC # The result is a type of unvoiced singing, emphasizing the noise # components within the tone # The time varying amplitudes of the partials are smoothed out to # eliminate artifacts that might otherwise occur: # envelope_attack_in_seconds=.1 # int, float or FUNC # envelope_release_in_seconds=.1 # int, float or FUNC # To restore some of the amplitude lost by eliminating the stronger # frequency components we increase the output amplitude by 12 dB: # gain_in_decibels=12 # int, float or FUNC #****************************************************** #*************** BANDAMP (ECMC version) ************** # ******ECMC CHANGES & ADDITIONS: *************** PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin cd $PVCBIN #******** AIFF INPUT & OUTPUT SOUNDFILES ************* aiffinput=/sflib/voice/sop1.ds4 aiffoutput=bandamp1-1 freqresponsefile=sop1.ds4.ss.fr # created by ECMC example script "freqresponse1" #****************************************************** # No gen functions are created in this example, so the template # lines for creating these functions have been delted #------------------------------------------------------ #******************** ANALYSIS ************************ #------------------------------------------------------ peaks_analysis_file=$freqresponsefile peak_analysis_begintime=0 peak_analysis_endtime=0 ANALYSIS_METHOD_average_0_peak_1_flag=1 ANALYSIS_frames_per_second=32 ANALYSIS_print_response_to_terminal_0_no__1_yes=0 #------------------------------------------------------ #******************* SYNTHESIS ************************ #------------------------------------------------------ #******** BEGIN/END TIMES ***************************** # (-1 end time defaults to end of file) begintime=0 endtime=-1 # begin & end times determine output duration FFT_length=1024 windowsize=0 frames_per_second=200 time_expansion_contraction_factor=1 #**** OUTPUT CHANNEL(S) ******************************* channel_1_to_max__0_all=0 # (channels are numbered from 1-maximum) # (0 = all channels) oscillator_resynthesis_threshold_in_dB=-96 #****** DYNAMIC PARAMETERS **************************** frequency_shift=0 # int, float or FUNC gain_in_decibels=12 # int, float or FUNC pitch_transposition_in_semitones=0 # int, float or FUNC #****** WINDOW PARAMETERS ***************************** peaks_response_smooth_factor_in_octaves=0 print_smoothed_freq_response_to_terminal_0_no__1_yes=0 WINDOW_type__bandpass_0__bandreject_1=0 WINDOW_upper_threshold_in_dB=-20 # int, float or FUNC WINDOW_lower_threshold_in_dB=-96 # int, float or FUNC #******** LOW/HIGH SHELF EQ (post transpose/shift) **** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=200 HIGH_SHELF_EQ_gain_in_decibels=-0 HIGH_SHELF_EQ_frequency=4000 #************ENVELOPE RESPONSE ********************** envelope_attack_in_seconds=.1 # int, float or FUNC envelope_release_in_seconds=.1 # int, float or FUNC #********** AMPLITUDE STATISTICS ******************** print_amplitude_statistics_0_no__1_yes=1 amplitude_statistics_time_interval=.25
#==================================================== # COMMAND LINE SETUP -- OFFICE USE ONLY # (DO NOT WRITE BELOW THIS LINE) #==================================================== # ***** ECMC CHANGES: ******* # cd $SFDIR # ECMC input_file=pvcin # ECMC temporary NeXT format input soundfile output_file=pvcout # ECMC temporary NeXT format output soundfile /sbin/rm -f pvcin pvcout # # Create temporary NeXT format input soundfile "pvcin:" ECMC /usr/local/bin/sox -t aiff $aiffinput -t au pvcin # ECMC pvanalysisroutine=$PVCBIN/freqresponse # ECMC # ****** end of ECMC changes & additions ****** # # ANALYSIS PVFLAGS="\ \ -N$FFT_length \ -M0 \ -D$ANALYSIS_frames_per_second \ \ -b$peak_analysis_begintime \ -e$peak_analysis_endtime \ \ -c$ANALYSIS_METHOD_average_0_peak_1_flag \ \ -P$ANALYSIS_print_response_to_terminal_0_no__1_yes \ \ -C$channel_1_to_max__0_all \ \ -B1 \ \ " echo "\n$pvanalysisroutine $PVFLAGS $input_file $peaks_analysis_file" $pvanalysisroutine $PVFLAGS $input_file $peaks_analysis_file ; #exit ; #==================================================== # SYNTHESIS pvroutine=$PVCBIN/bandamp # ECMC PVFLAGS="\ \ -N$FFT_length \ -M$windowsize \ -D$frames_per_second \ -I$time_expansion_contraction_factor \ \ -a$frequency_shift \ -P$pitch_transposition_in_semitones \ -A$gain_in_decibels \ \ -C$channel_1_to_max__0_all \ -t$oscillator_resynthesis_threshold_in_dB \ \ -b$begintime \ -e$endtime \ \ -F$peaks_analysis_file \ -Q$WINDOW_upper_threshold_in_dB \ -q$WINDOW_lower_threshold_in_dB \ -S$peaks_response_smooth_factor_in_octaves \ -Z$print_smoothed_freq_response_to_terminal_0_no__1_yes \ -L$envelope_release_in_seconds \ -l$envelope_attack_in_seconds \ -W$WINDOW_type__bandpass_0__bandreject_1 \ \ -H$LOW_SHELF_EQ_gain_in_decibels \ -m$LOW_SHELF_EQ_frequency \ \ -X$HIGH_SHELF_EQ_gain_in_decibels \ -R$HIGH_SHELF_EQ_frequency \ \ -p$print_amplitude_statistics_0_no__1_yes \ -i$amplitude_statistics_time_interval \ \ " echo "\n$pvroutine $PVFLAGS $input_file $output_file" $pvroutine $PVFLAGS $input_file $output_file ; # ***** ECMC CHANGES & ADDITIONS: ******* # echo 'Converting temporary NeXT format output soundfile to aiff format:"' /usr/local/bin/sox -t au pvcout -t aiff $aiffoutput # ECMC /sbin/rm -f pvcin pvcout # ECMC /usr/sbin/sfinfo -s $aiffoutput # ECMC # ****** end of ECMC changes & additions ****** # # If you have created any gen function files above delete them below:
bandamp1-2.html

ECMC PVC example file bandamp1-2
# ECMC PVC example "bandamp1-2" is identical to example "bandamp1-1" # except that a violin tone (/sflib/string/vln.b3) is used as the # input soundfile, rather than the soprano tone as in "bandamp1-1" #****************************************************** #*************** BANDAMP (ECMC version) ************** # ******ECMC CHANGES & ADDITIONS: *************** PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin cd $PVCBIN #******** AIFF INPUT & OUTPUT SOUNDFILES ************* aiffinput=/sflib/string/vln.b3 aiffoutput=bandamp1-2 freqresponsefile=sop1.ds4.ss.fr #****************************************************** ##### Cmusic function file generator tempates ##### # (No gen functions used in this example) ##### End of gen routine function generator tempates ##### #------------------------------------------------------ #******************** ANALYSIS ************************ #------------------------------------------------------ peaks_analysis_file=$freqresponsefile peak_analysis_begintime=0 peak_analysis_endtime=0 ANALYSIS_METHOD_average_0_peak_1_flag=1 ANALYSIS_frames_per_second=32 ANALYSIS_print_response_to_terminal_0_no__1_yes=0 #------------------------------------------------------ #******************* SYNTHESIS ************************ #------------------------------------------------------ #******** BEGIN/END TIMES ***************************** # (-1 end time defaults to end of file) begintime=0 endtime=-1 # begin & end times determine output duration FFT_length=1024 windowsize=0 frames_per_second=200 time_expansion_contraction_factor=1 #**** OUTPUT CHANNEL(S) ******************************* channel_1_to_max__0_all=0 # (channels are numbered from 1-maximum) # (0 = all channels) oscillator_resynthesis_threshold_in_dB=-96 #****** DYNAMIC PARAMETERS **************************** frequency_shift=0 # int, float or FUNC gain_in_decibels=12 # int, float or FUNC pitch_transposition_in_semitones=0 # int, float or FUNC #****** WINDOW PARAMETERS ***************************** peaks_response_smooth_factor_in_octaves=0 print_smoothed_freq_response_to_terminal_0_no__1_yes=0 WINDOW_type__bandpass_0__bandreject_1=0 WINDOW_upper_threshold_in_dB=-20 # int, float or FUNC WINDOW_lower_threshold_in_dB=-96 # int, float or FUNC #******** LOW/HIGH SHELF EQ (post transpose/shift) **** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=200 HIGH_SHELF_EQ_gain_in_decibels=-0 HIGH_SHELF_EQ_frequency=4000 #************ENVELOPE RESPONSE ********************** envelope_attack_in_seconds=.1 # int, float or FUNC envelope_release_in_seconds=.1 # int, float or FUNC #********** AMPLITUDE STATISTICS ******************** print_amplitude_statistics_0_no__1_yes=1 amplitude_statistics_time_interval=.25

(The bottom portion of this file, which converts all of the parameter variables above into a single long command line, and which the users should never edit or change, has been omitted here.)
# If you have created any gen function files above delete them below:


bandamp2.html

ECMC PVC example file bandamp2
# ECMC PVC example script "bandamp2" uses the frequency response # file created by example script "freqresponse2" - a fragmentary # analysis (between times .3 and .6 seconds) of a cello pizzicato tone # All frequenciies greater than -15 dB (all "louder" frequencies within # the source cello pizz tone) are suppressed: # WINDOW_type__bandpass_0__bandreject_1=0 # WINDOW_upper_threshold_in_dB=-15 # int, float or FUNC # WINDOW_lower_threshold_in_dB=-90 # int, float or FUNC # Suppression of the stronger frequency components of the source sound # would result in a very low output level. We compensate for this # by introducing a 12 dB gain, as well as a fade-out, in this # amplitude function: # gen4 -L1000 0 1. -1 4.6 1. -1 4.8 0 | reshape -M18. > $SFDIR/gainfunc # gain_in_decibels=$SFDIR/gainfunc # int, float or FUNC # "bandamp" tends to produce artifacts -- clicks or noise. # Smoothing out changes in the amplitudes of frequency componentts, # , as in the two lines below, often helps remove these artifacts. # envelope_attack_in_seconds=.05 # int, float or FUNC # envelope_release_in_seconds=.05 # int, float or FUNC #****************************************************** #*************** BANDAMP (ECMC version) ************** # ******ECMC CHANGES & ADDITIONS: *************** PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin cd $PVCBIN #******** AIFF INPUT & OUTPUT SOUNDFILES ************* aiffinput=/sflib/string/vc.p.e2 aiffoutput=bandamp2 freqresponsefile=vc.p.e2.mid.fr #****************************************************** ##### Cmusic function file generator tempates ##### # gen4 generates exponenetial segments; "a" values determine shape & # depth of curve: 0 = linear, neg. = exponential, pos. = inverse expo. gen4 -L1000 0 1. -1 4.6 1. -1 4.8 0 | reshape -M18. > $SFDIR/gainfunc # gen4 -Llength t1 v1 a1 ... tN vN #------------------------------------------------------ #******************** ANALYSIS ************************ #------------------------------------------------------ peaks_analysis_file=$freqresponsefile peak_analysis_begintime=0 peak_analysis_endtime=0 ANALYSIS_METHOD_average_0_peak_1_flag=1 ANALYSIS_frames_per_second=32 ANALYSIS_print_response_to_terminal_0_no__1_yes=0 #------------------------------------------------------ #******************* SYNTHESIS ************************ #------------------------------------------------------ #******** BEGIN/END TIMES ***************************** # (-1 end time defaults to end of file) begintime=0 endtime=-1 # begin & end times determine output duration FFT_length=2048 # 1024 windowsize=0 frames_per_second=200 time_expansion_contraction_factor=2 #**** OUTPUT CHANNEL(S) ******************************* channel_1_to_max__0_all=0 # (channels are numbered from 1-maximum) # (0 = all channels) oscillator_resynthesis_threshold_in_dB=-96 #****** DYNAMIC PARAMETERS **************************** frequency_shift=0 # int, float or FUNC gain_in_decibels=$SFDIR/gainfunc # int, float or FUNC pitch_transposition_in_semitones=1 # int, float or FUNC #****** WINDOW PARAMETERS ***************************** peaks_response_smooth_factor_in_octaves=0 print_smoothed_freq_response_to_terminal_0_no__1_yes=0 WINDOW_type__bandpass_0__bandreject_1=0 WINDOW_upper_threshold_in_dB=-15 # int, float or FUNC WINDOW_lower_threshold_in_dB=-90 # int, float or FUNC #******** LOW/HIGH SHELF EQ (post transpose/shift) **** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=200 HIGH_SHELF_EQ_gain_in_decibels=-0 HIGH_SHELF_EQ_frequency=4000 #************ENVELOPE RESPONSE ********************** envelope_attack_in_seconds=.05 # int, float or FUNC envelope_release_in_seconds=.05 # int, float or FUNC #********** AMPLITUDE STATISTICS ******************** print_amplitude_statistics_0_no__1_yes=1 amplitude_statistics_time_interval=.25

(The bottom portion of this file, which converts all of the parameter variables above into a single long command line, and which the users should never edit or change, has been omitted here.)
# If you have created any gen function files above delete them below: rm $SFDIR/gainfunc