ECMC PVC example file convolver96-1
Example PVC script used to create /sflib/x soundfile >> convolver96-1.wav <
# ECMC PVC example convolver96-1 : 96k 24 bit intput # Sound A is a 96k 24 bit euphonium tone with a duration of 3.404 seconds: # Sound_A_input_soundfile=/sflib96/brass/euph/open/euph.mf.as4.wav # Sound B is an analysis of /sflib96/perc/shaker/metrat.shake.slow.wav, previously # made with ECMC PVC script file pvanalysis.96metrattle, with a dur. of 3.612: # Sound_B_input_analysis_file=metrat.shake.slow.pvc # We stretch the duration of the analysis slightly to match the exact duration of # the euphonium tone: # SOUND_B_data_access_mode__explicit_0__rate_1=1 # use rate mode, not explicit mode # SOUND_B_rate_multiplier=1.06 # stretch dur of analysis file slightly # Defaults are used for all other parameters
#****************************************************** #................... CONVOLVER ........................ #****************************************************** # ******TKLA CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* cd $SFDIR # all files will be created in your current working soundfile directory Sound_A_input_soundfile=/sflib96/brass/euph/open/euph.mf.as4.wav # duration is 3.4 seconds Sound_B_input_analysis_file=metrat.shake.slow.pvc # duration is 3.61 seconds outputsf=try1.wav # output soundfile outputformat=3 # 0,1,2, or 3; 1 = 16 bit short ints; 2 = 32 bit floats; 3 = 24 bit ints # 0 outputs 16 bit ints if samp. rate < 50000, 24 bit ints if samp rate > 50000 # ********************* # ##### Cmusic function file generator tempates ##### # gen0 normalizes function files previously created with other gen routines # gen0 -Llength max < inputfuncfile > outputfuncfile # gen1 creates linear {straight line} segments, like Csound gen 7 # gen1 -Llength t1 v1 ... tN vN # gen2 generates harmonic waveforms from sine {a} & cosine {b} amps # gen2 -Llength [-o (default) or -c] a1 ... aN b0 ... bM N # gen3 generates amp values & linear connections at equally spaced time points # gen3 -Llength v1 v2 ... vN # gen4 generates exponenetial segments; "a" values determine shape & # depth of curve: 0 = linear, neg. = exponential, pos. = inverse expo. # gen4 -Llength t1 v1 a1 ... tN vN # gen5 is like Csound gen 9 : harmonic1/amp/phase harmonic2/amp/phase # gen5 -Llength h1 a1 p1 ... hN aN pN # gen6 generates a table of random numbers between +1 and -1 # gen6 -Llength # cspline: smooth curve {cubic spline} interpolator # cspline len_flag [flags] x0 y0 x1 y1 ... xN yN # genraw reads in a previously created function file # genraw -LN filename (where N is the length of the output function.) # For a usage summary of "reshape" type "reshape" with no arguments. ##### End of gen routine function generator tempates ##### #........... OUTPUT CHANNEL(S) ....................... Sound_A_channel_1_to_max__0_all=0 Sound_B_channel_1_to_max__0_all=0 # (channels are numbered from 1-maximum,0 = all channels # 0-0 configurations will match A and B channels # 0 with a single channel will apply single channel to # all channels of other file #====================================================== #............ SOUND A BEGIN/END TIMES ................. Sound_A_begintime=0 Sound_A_endtime=0 # (0 end time defaults to end of file) #====================================================== #............. SOUND B TIME ........................... SOUND_B_data_access_mode__explicit_0__rate_1=1 # use rate mode, not explicit mode SOUND_B_time_point=0 SOUND_B_rate_multiplier=1.06 # stretch dur of analysis file slightly to match # duration of euphonium tone # int, float or FUNC # In rate mode, set time_point to initial position. # In explicit mode, control time_point with a function. # Rate_multiplier is nonfunctional in explicit mode. #...................................................... SOUND_B_lower_time_boundary=0 # int, float or FUN SOUND_B_upper_time_boundary=-1 # int, float or FUN # upper time < 0 defaults to file duration #...................................................... autostop_on_1__off_0=1 # If on, this will terminate synthesis when a boundary is crossed #====================================================== #*** ANALYSIS PARAMETERS ****************************** window_type=2 # window type: 0 = Hamming,1 = rectangular, 2 = Blackman (DEFAULT), # 3 = Bartlett triangular, 4-12 = Kaiser windows for alpha = 4-12 # generally recommended: 2 or 8 windowsize=0 # default 0 sets windowsize (in samples) to 2 * FFT_length if # samp. rate <= 48000 or to 4 * FFT_length if samp. rate > 48000 #====================================================== #*** RESYNTHESIS PARAMETERS *************************** #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-96 #****************** MODIFICATIONS ********************* #.................. TIME .............................. time_expansion_contraction_factor=1 #.................. DECIBELS .......................... OUTPUT_SPECTRUM_gain_in_decibels=0 # int, float or FUNC #.................. PITCH ............................. OUTPUT_SPECTRUM_frequency_shift=0 # int, float or FUNC OUTPUT_SPECTRUM_pitch_transposition_in_semitones=-0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... release_in_seconds=0 # int, float or FUNC attack_in_seconds=0 # int, float or FUNC #====================================================== #*** CONVOLUTION PANPOT (-1 to 1) (-1 = A, 1 = B )**** convolution_panpot_position=0 # int, float or FUNC #.................. DECIBELS .......................... Sound_A_gain_in_decibels=-0 # int, float or FUNC Sound_B_gain_in_decibels=-0 # int, float or FUNC Convolution_gain_in_decibels=0 # int, float or FUNC #............ PANPOT DOMAIN WARP ...................... #(warp values: 0 and greater) # warp: 0 = linear, incresingly positive warp # values distribute the convolution center into the # Sound A or B's panpot domain. Sound_A_panpot_domain_warp=0 Sound_B_panpot_domain_warp=0 #(The domain warp allows you to expand the useful # convolution range on either side of the full # convolution point at 0 by warping the panpot range on # that side. Use increasingly positive warp values # to expand the convolution center into the # Sound A or B's panpot domain. ) #====================================================== #****** CONVOLUTION OUTPUT LOW/HIGH SHELF EQ ********** FILTER_LOW_SHELF_EQ_gain_in_decibels=-0 FILTER_LOW_SHELF_EQ_frequency=200 FILTER_HIGH_SHELF_EQ_gain_in_decibels=0 FILTER_HIGH_SHELF_EQ_frequency=1000 #====================================================== #........... RESCALE for floating point only ...... rescale_level_in_decibels=0 # set to 1 to rescale to peak of input file; do not do this if input amplitude # is low #====================================================== #********** 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) #==================================================== # SYNTHESIS pvroutine=convolver # ***** TKLA CHANGES: ******* # SR=`/usr/local/bin/sfsr $Sound_A_input_soundfile | awk '{print $1}'` if ( [ `echo "$SR"` -gt 50000 ] ) ; then WORDSIZE=`/usr/local/bin/sfbits "${Sound_A_input_soundfile}" | awk '{print $1}'` if [ "$WORDSIZE" == "24" ] ; then rm -f pvcin ; 24tofloat $Sound_A_input_soundfile pvcin ; input_file=pvcin if ( ( [ "$outputformat" == 0 ] ) || ( [ "$outputformat" == 3 ] ) ) ; then output_file=pvcout # temporary floating point output soundfile for 24-bit inputs rm -f pvcout; output_data_format=2 else # 24 bit input but float output requested output_file=$outputsf ; fi else # not 24 bit input ; 16 bit int or 32 bit float input input_file=$Sound_A_input_soundfile ; output_file=$outputsf fi fi # ****** end of TKLA changes & additions ****** # PVFLAGS="\ \ -M$windowsize \ -w$window_type \ -I$time_expansion_contraction_factor \ \ -a$OUTPUT_SPECTRUM_frequency_shift \ -P$OUTPUT_SPECTRUM_pitch_transposition_in_semitones \ -A$OUTPUT_SPECTRUM_gain_in_decibels \ \ -C$Sound_A_channel_1_to_max__0_all \ -t$oscillator_resynthesis_threshold_in_dB \ \ -b$Sound_A_begintime \ -e$Sound_A_endtime \ \ -q$Sound_A_gain_in_decibels \ -B$Sound_B_gain_in_decibels \ -Z$Convolution_gain_in_decibels \ -L$release_in_seconds \ -l$attack_in_seconds \ -F$Sound_B_input_analysis_file \ \ -u$SOUND_B_data_access_mode__explicit_0__rate_1 \ -K$Sound_B_channel_1_to_max__0_all \ -Q$SOUND_B_time_point \ -Y$SOUND_B_rate_multiplier \ -g$SOUND_B_lower_time_boundary \ -G$SOUND_B_upper_time_boundary \ \ -S$convolution_panpot_position \ -j$Sound_A_panpot_domain_warp \ -J$Sound_B_panpot_domain_warp \ \ -H$FILTER_LOW_SHELF_EQ_gain_in_decibels \ -m$FILTER_LOW_SHELF_EQ_frequency \ \ -X$FILTER_HIGH_SHELF_EQ_gain_in_decibels \ -R$FILTER_HIGH_SHELF_EQ_frequency \ \ -y$autostop_on_1__off_0 \ \ -p$print_amplitude_statistics_0_no__1_yes \ -i$amplitude_statistics_time_interval \ \ -_$output_data_format \ -=$rescale_level_in_decibels \ \ " echo "\n$pvroutine $PVFLAGS $Sound_A_input_file $output_file" $pvroutine $PVFLAGS $input_file $output_file ; # ***** TKLA CHANGES & ADDITIONS: ******* # if ( ( [ "$output_file" == "pvcin" ] ) && ( test -f "pvcin" ) ) ; then rm -f pvcin ; fi if ( ( [ "$WORDSIZE" == "24" ] ) && ( [ "$output_file" == "pvcout" ] ) ) ; then echo "Converting temporary float output file pvcout to $outputsf" echo " -------------------------------------------------------" floatto24 pvcout $outputsf 2> /dev/null ; rm -f pvcin pvcout echo " -------------------------------------------------------" else echo " -------------------------------------------------------" echo -e -n "Output soundfile: " ; sfinfo -s $outputsf echo " -------------------------------------------------------" fi # ****** end of TKLA changes & additions ****** # # If you have created any gen function files above delete them below: