ECMC PVC example file plainpv8
# ECMC PVC example >> plainpv8 << # In this example the time varying pitch of /sflib/voice/sop1.b3 is # imposed upon a gamelan jegogan tone. The pitch analysis of the soprano # tone was created by ECMC PVC example pitchtracker1, which wrote the # analysis output to a file called "pvc.sop1.b3.ptrack" # This file is used as the input to the pitch transposition argument # within plainpv8 : # pitch_transposition_in_semitones=$SFDIR/pvc.sop1.b3.ptrack # int, float or FUNC # The output duration of plainpv8 is set to match the duration of the # soprano tone: # endtime=6.36 # end time is adjusted to the duration of /sflib/voice/sop1.b3 # Finally, because only a portion of the jegogan soundfile is used, we create# an amplitude envelope to apply an exponential fade-out, and apply the values # from this function file to the gain parameter, also reducing the gain by - 2dB # during the "steady-state" portion to eliminate clipping: # gen4 -L1000 0 -2 -1 .95 -2 -1 1. -96 > $SFDIR/fadeout # gain_in_decibels=$SFDIR/fadeout # in dB, int, float or FUNC #****************************************************** #.................... PLAINPV ......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile: can be aiff or wave on Linux, aiff only on SGI inputsf=/sflib/gamelan/jegogan.1 outputsf=plainpv8 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### gen4 -L1000 0 -2 -1 .95 -2 -1 1. -96 > $SFDIR/fadeout # 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 ##### End of gen routine function generator tempates ##### output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis # endtime=6.36 # end time is adjusted to the duration of /sflib/voice/sop1.b3 #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # must be power-of-2, usually 1024, 512 or 2048 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 # 0 sets windowsize to 2 * FFT (or larger) frames_per_second=200 # generally 200, occasionally 400 or 600 when time stretching #====================================================== #*** RESYNTHESIS PARAMETERS *************************** #........... OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #******** RESYNTHESIS MODIFICATIONS ********************* #.................. DURATION .............................. time_expansion_contraction_factor=1 # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... gain_in_decibels=$SFDIR/fadeout # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-0 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=$SFDIR/pvc.sop1.b3.ptrack # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... release_time_in_seconds=0 # int, float or FUNC attack_time_in_seconds=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ BRICKWALL FILTER ........................ FILTER_TYPE=0 # 0 = bandpass, 1 = bandreject BRICKWALL_FILTER_window_low_frequency=-1 BRICKWALL_FILTER_window_high_frequency=-1 # (-1 selects respective lowest or highest frequency) #====================================================== #*************** LOW/HIGH SHELF EQ ********************* LOW_SHELF_EQ_gain_in_decibels=0 LOW_SHELF_EQ_frequency=200 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=2000 #====================================================== #........... 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 EXCEPT TO DELETE FUNCTION FILES AT VERY END) #==================================================== # ***** ECMC CHANGES: ******* # PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin pvroutine=$PVCBIN/plainpv # ECMC cd $SFDIR # ECMC if [ "$OSTYPE" = "irix" ] then 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 $inputsf -t au pvcin # ECMC elif [ `echo "$OSTYPE" | grep linux` ] then input_file=$inputsf output_file=$outputsf fi # ****** end of ECMC changes & additions ****** # pvroutine=plainpv PVFLAGS="\ \ -N$FFT_length \ -M$windowsize \ -w$window_type \ -D$frames_per_second \ -I$time_expansion_contraction_factor \ \ -a$frequency_shift_in_Hz \ -P$pitch_transposition_in_semitones \ -A$gain_in_decibels \ \ -C$output_channel \ -t$oscillator_resynthesis_threshold_in_dB \ \ -b$begintime \ -e$endtime \ \ -H$LOW_SHELF_EQ_gain_in_decibels \ -m$LOW_SHELF_EQ_frequency \ \ -X$HIGH_SHELF_EQ_gain_in_decibels \ -R$HIGH_SHELF_EQ_frequency \ \ -L$release_time_in_seconds \ -l$attack_time_in_seconds \ \ -W$spectrum_warpshape_index \ \ -T$FILTER_TYPE \ -f$BRICKWALL_FILTER_window_low_frequency \ -F$BRICKWALL_FILTER_window_high_frequency \ \ -_$output_data_format \ -=$rescale_level_in_decibels \ \ \ -p$print_amplitude_statistics_0_no__1_yes \ -i$amplitude_statistics_time_interval \ " echo "\n\n$pvroutine $PVFLAGS $input_file $output_file " $pvroutine $PVFLAGS $input_file $output_file # ***** ECMC CHANGES & ADDITIONS: ******* # if [ "$OSTYPE" = "irix" ] then echo 'Converting temporary NeXT format output soundfile to aiff format:"' /usr/local/bin/sox -t au pvcout -t aiff $outputsf # ECMC /sbin/rm -f pvcin pvcout # ECMC echo "Header information for output soundfile >> $outputsf << :" /usr/sbin/sfinfo -s $outputsf # ECMC elif [ `echo "$OSTYPE" | grep linux` ] then if [ "$outputformat" = "AIFF" ] then echo " Converting output soundfile $output_file to AIFF format ..." /usr/local/soundapps/PVC/bin/wav2aiff $output_file fi echo "Header information for output soundfile >> $outputsf << :" /usr/local/bin/sfinfo -s $outputsf fi # ****** end of ECMC changes & additions ****** # # If you have created any gen function files above delete them below: rm $SFDIR/fadeout