PLAINPV EXAMPLES

ECMC PVC example file plainpv1
# Example PVC script used to create /sflib/x soundfile >> plainpv1 << # ECMC pvc example plainpv1: transposition & time stretching # of a pigmypipe tone # defaults are used for all values except: # time_expansion_contraction_factor=2 # (output duration is twice as long as the input duration) # and # pitch_transposition_in_semitones=-4 # int, float or FUNC # (pitch is transposed down a major 3rd, from g3 to ef3) #****************************************************** #.................... PLAINPV ......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile: can be aiff or wave on Linux, aiff only on SGI inputsf=/sflib/africa/pigmypipe.g3 outputsf=$SFDIR/plainpv1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### 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_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 begintim=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** 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=2 # duration is doubled # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... gain_in_decibels=0 # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-0 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=-4 # 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:
plainpv2.html

ECMC PVC example file plainpv2
# Example PVC script used to create /sflib/x soundfile >> plainpv2 << # ECMC pvc example plainpv2: detuning of a trombone tone # defaults are used for all value except: # time_expansion_contraction_factor=2 # (duration is doubled) # and # frequency_shift=-30 # detune partials, in herz; int, float or FUNC # (30 herz is subtracted from the frequency of each partial, detuning # the quasi-harmonic partials of the original trombone tone so that # the partials become inharmonic; as a result, the pitch is lower and # the inharmonic timbre is similar to that produced by frequency shifting, # or ring modulation, somewhat like a "multiphonic") # To eliminate clipping that resulted the gain is reduced by 2 dB: # gain_in_decibels=-2 # 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/wind/trb.cs3 outputsf=$SFDIR/plainpv2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### 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_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=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** 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=2 # duration is doubled # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... gain_in_decibels=-2 # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-30 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=0 # 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:
plainpv3.html

ECMC PVC example file plainpv3
ECMC pvc example "plainpv3," which illustrates use of the warp index feature of plainpv, actually is a mix of three soundfiles, each with one tone, played in succession: (1) /sflib/africa/logdrum1.c3 ( the original source soundfile) (2) a resynthesis of this logdrum tone created with pvc example "plainpv3-1" (3) a resynthesis of this logdrum tone created with pvc example "plainpv3-2" - - - - In "plainpv3-1", which created the second note, all default analysis and resynthesis values are used except: spectrum_warpshape_index=6 # int, float or FUNC and gain_in_decibels=4 # in dB, int, float or FUNC The high warp index value of 6 causes weaker intensity frequency components within the logdrum tone to be attenuated or eliminated, so that the resynthesis timbre is "simpler" and "less bright." This elimination or attenuation of most of the frequencies within the source sound also results in decreased output amplitude. We have compensated for this -- restoring the amplitude toapproximately its original level - by raising the output gain by 4 dB. To see the full script file used to create the second note in example "plainpv3," type: getpvcex plainpv3-1 or else pvcex plainpv3-1 - - - - In "plainpv3-2", which created the third note, all default analysis values were sed except: spectrum_warpshape_index=-20 # int, float or FUNC and gain_in_decibels=-18 # in dB, int, float or FUNC The very high negative warp index value of -20 causes weaker intensity frequency components within the logdrum tone to be boosted, so that the resynthesis timbre is "brighter." The increased ampltude of many of the frequencies within the source sound would result in clipping. TO avoid this, we reduced the output gain by 18 dB. To see the full script file used to create the third note in example "plainpv3," type: getpvcex plainpv3-2 or else pvcex plainpv3-2
plainpv3-1.html

ECMC PVC example file plainpv3-1
# Example PVC script used to create /sflib/x soundfile >> plainpv3 << # ECMC pvc example plainpv3-1: warp index # This script produced the second note in example "plainpv3" # All default analysis and resyntheiss values are used except: # spectrum_warpshape_index=6 # int, float or FUNC # and # gain_in_decibels=4 # in dB, int, float or FUNC # The very high warp index value of 6 causes weaker intensity frequency # components within the logdrum tone to be attenuated or eliminated, # so that the resynthesis timbre is "simpler" and "less bright." # This elimination or attenuation of most of the frequencies within # the source sound also results in decreased output amplitude. We # have compensated for this -- restoring the amplitude toapproximately # its original level - by raising the output gain by 4 dB. #****************************************************** #.................... PLAINPV ......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile: can be aiff or wave on Linux, aiff only on SGI inputsf=/sflib/africa/logdrum1.c3 outputsf=$SFDIR/plainpv3-1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### 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_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=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** 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=4 # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-0 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=0 # 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=6 # 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

(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.)


plainpv3-2.html

ECMC PVC example file plainpv3-2
# Example PVC script used to create /sflib/x soundfile >> plainpv3-2 << # ECMC pvc example plainpv3-2: warp index # This script produced the third note in example "plainpv3" # All default analysis and resyntheiss values are used except: # spectrum_warpshape_index=-20 # int, float or FUNC # and # gain_in_decibels=-20 # in dB, int, float or FUNC # The very high negative warp index value of -20 causes weaker intensity # frequency components within the logdrum tone to be boosted, # so that the resynthesis timbre consists mostly of the "noise" rather than of # the pitched frequency components of the source logdrum sound. # The increased ampltude of many of the frequencies within # the source sound would result in clipping. TO avoid this, we # reduced the output gain by 20 dB.
#****************************************************** #.................... PLAINPV ......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile: can be aiff or wave on Linux, aiff only on SGI inputsf=/sflib/africa/logdrum1.c3 outputsf=$SFDIR/plainpv3-2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### 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_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=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** 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=-20 # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-0 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=0 # 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=-20 # 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

(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:


plainpv4.html

ECMC PVC example file plainpv4
# Example PV3 script used to create /sflib/x soundfile >> plainpv4 << # Example PVC script file >> plainpv4 << : # a source snare drum roll is turned into a pulsating but sustained # medium high pitched cluster # (1) only frequencies between 600 and 1800 hz are passed: # FILTER_TYPE__0_bandpass__1_bandreject=0 # bandpass fileter # BRICKWALL_FILTER_window_low_frequency=600 # BRICKWALL_FILTER_window_high_frequency=1800 # (2) the gain is raised by ?? to compensate for the amplitude lost in this filtering # gain_in_decibels=15 # in dB, int, float or FUNC # (3) rapid changes in the original amplitude (the roll) are slowed down to # produce a sustained sound: # #************ENVELOPE RESPONSE ************************ # release_time_in_seconds=.5 # int, float or FUNC # attack_time_in_seconds=.75 # int, float or FUNC # (4) the time duration is tripled, and a very high analysis frame rate is used: # frames_per_second=600 # raised from default 200 # time_expansion_contraction_factor=3 # #****************************************************** #.................... PLAINPV ......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile: can be aiff or wave on Linux, aiff only on SGI inputsf=/sflib/perc/sdrum1.broll outputsf=$SFDIR/plainpv4 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### 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_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=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** 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=600 # raised from default 200 #====================================================== #*** 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=3 # duration is tripled # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... gain_in_decibels=15 # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-0 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... release_time_in_seconds=.5 # very high # int, float or FUNC attack_time_in_seconds=.75 # very high # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ BRICKWALL FILTER ........................ FILTER_TYPE=0 # bandpass filter # 0 = bandpass, 1 = bandreject BRICKWALL_FILTER_window_low_frequency=600 BRICKWALL_FILTER_window_high_frequency=1800 # (-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

(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:


plainpv5.html

ECMC PVC example file plainpv5
# Example PVC script used to create /sflib/x soundfile >> plainpv5 << # ECMC pvc example plainpv5: illustrates a time varying mplitude # function, using only a portion of an input soundfile, and EQ # parameters changed from the defaults include: # (1) Time varying amplitude changes # gen4 -L1000 0 -90 0 \ # .1 12 0 \ # .8 3 0 1 -90 > $SFDIR/ampfunc # An amplitude function table with 1000 values is created, moving # linearly from -90 dB to +12 dB over the first 10 % of the # output soundfile, then to +3 dB, then to -90 dB over the last # 20 % of the soundfile. This table is written to file "ampfunc" in # the user's current working soundfile directory. Note that since the # values in this table are applied to logarithmic dB values we create # linear, not exponential, transitions. # gain_in_decibels=$SFDIR/ampfunc # in dB, int, float or FUNC # (The values in function file "ampfunc" are applied to the resynthesis # output amplitude, creating a new amplitude envelope.) # (2) Only a portin of the input soundfile is used # begintime=1. # begin reading one second into the soundfile # endtime=5.5 # ( stop analysis/resynthesis at 5.5 seconds into original soundfile # (3) EQ is applied # LOW_SHELF_EQ_gain_in_decibels=6 # -96 # LOW_SHELF_EQ_frequency=100 # (All frequencies 100 herz & below are boosted by 6 dB) # HIGH_SHELF_EQ_gain_in_decibels=-60 # HIGH_SHELF_EQ_frequency=1000 # (All frequencies 1000 herz & above are attenuated by 60 dB) # The following line is added at the very end of the file to remove # the function file: # rm $SFDIR/ampfunc #****************************************************** #.................... PLAINPV ......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile: can be aiff or wave on Linux, aiff only on SGI inputsf=/sflib/env/tunroom outputsf=$SFDIR/plainpv5 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### 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 ## HERE IS WHERE WE CREATE THE AMPLITUDE FUNCTION from the line above gen4 -L1000 0 -90 0 \ .1 12 0 \ .8 3 0 1 -90 > $SFDIR/ampfunc # 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_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=1. # begin reading one second into the soundfile endtime=5.5 # ( stop analysis/resynthesis at 5.5 seconds into original soundfile #====================================================== #*** 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/ampfunc # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-0 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=0 # 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=6 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=-60 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

(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/ampfunc # here we delete the amplitude function file


plainpv6.html

ECMC PVC example file plainpv6
ECMC pvc example "plainpv6," which illustrates use of time varying functions applied to both pitch and spectral warp index, is a mix of two soundfiles, each with one tone, created by the following two example scripts: (1) plainpv6-1, in which the source soundfile is aiffinput=/sflib/wind/oboe.d4 and (2) plainpv6-2 , in which the source soundfile was aiffinput=/sflib/perc/tamb.shake To display one of these two script files, type pvcex plainpv6-1 or pvcex plainpv6-2 - - - - First note (oboe tone), created by script "plainpv6-1" : Here are the parameters that differ from the defaults: (1) input soundfile: aiffinput=/sflib/wind/oboe.d4 (2) gen functions Two functions are created, the first to control spectral warp index, the second to control pitch: # gen3 -Llength v1 v2 ... vN gen3 -L1000 5 5 -5 -5 5 > $SFDIR/spectrumfunc # 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 gen4 -L1000 0 -2 1 \ .25 -2 1 \ .5 4 1 \ .8 4 1 \ 1 2 > $SFDIR/pitchfunc (3) time warping: the duration of the input soundfile is stretched by 50 % : time_expansion_contraction_factor=1.5 (4) Time varying changes in the spectral warping are produced by the spectrum warpshape function. At the beginning & end of the note the wewaker partials are attenuated, "simplifying" the timbre. In the middle of the note, the weaker (higher) partials are boosted in intensity, creating a "brighter," more nasal timbre: spectrum_warpshape_index=$SFDIR/spectrumfunc # int, float or FUNC (4) The output pitch begins a major second below the original pitch, glisses up to a major third higher than the original pitch, then at the end of the note gliss down, ending a major second higher than the original pitch: pitch_transposition_in_semitones=$SFDIR/pitchfunc # int, float or FUNC pitch_transposition_in_semitones=$SFDIR/pitchfunc # int, float or FUNC (5) EQ is applied. Freqencies between 500 and 1200 herz are eliminated: FILTER_TYPE__0_bandpass__1_bandreject=1 BRICKWALL_FILTER_window_low_frequency=500 BRICKWALL_FILTER_window_high_frequency=1200 ---- Second "note" (the tambouring shake), produced by example script file "plainpv6-2:" All of the changes above are applied to sflib/perc/tamb.shake. File "plainpv6-2" is identical to file "plainpv6-1" except for the difference in input sound. Also, the output gain was modified in example "plainpv6-2" like this: gain_in_decibels=-6 # in dB, int, float or FUNC to eliminate clipping by about 6 dB. ----- At the end of both scripts the line rm $SFDIR/spectrumfunc $SFDIR/pitchfunc is included to delete the two function files. - - - To see the source files for "plainpv6-1" or "plainpv6-2" type pvcex plainpv6-1 or else getex plainpv6-1 pvcex plainpv6-2 or else getex plainpv6-2
plainpv6-1.html

ECMC PVC example file plainpv6-1
# Example PVC script used to create /sflib/x soundfile >> plainpv6-1 << # ECMC pvc example "plainpv6-1," which illustrates use of time # varying functions applied to both pitch and spectral warp index # of an oboe tone. # For details on this example, type : pvcex plainpv6 # This script produced the first tone in /sflibx example "plainpv6 #****************************************************** #****** script to run PLAINPV (ECMC version) ********** #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin cd $PVCBIN # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/wind/oboe.d4 outputsf=$SFDIR/plainpv6-1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # # 2 function files created to control time varying frequency spectrum and pitch: # gen3 generates amp values & linear connections at equally spaced time points # gen3 -Llength v1 v2 ... vN gen3 -L1000 5 5 -5 -5 5 > $SFDIR/spectrumfunc # 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 gen4 -L1000 0 -2 1 \ .25 -2 1 \ .5 4 1 \ .8 4 1 \ 1 2 > $SFDIR/pitchfunc ##### 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_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=0 # (-1 or 0 end time defaults to end of file) #*** 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=300 # generally 200, occasionally 400 or 600 when time stretching time_expansion_contraction_factor=1.5 #**** OUTPUT CHANNEL(S) ******************************* resynthesis_channel_1_to_max__0_all=0 # (channels are numbered from 1-maximum) # (0 = all channels) oscillator_resynthesis_threshold_in_dB=-80 #****** RESYNTHESIS PARAMETERS ************************** frequency_shift=0 # detune partials, in herz; int, float or FUNC gain_in_decibels=-0 # in dB, int, float or FUNC pitch_transposition_in_semitones=$SFDIR/pitchfunc # int, float or FUNC #************ENVELOPE RESPONSE ************************ release_time_in_seconds=0 # int, float or FUNC attack_time_in_seconds=0 # int, float or FUNC #********** SPECTRUM WARPSHAPE **************************** spectrum_warpshape_index=$SFDIR/spectrumfunc # int, float or FUNC #******** BRICKWALL BAND OR REJECT FILTER WINDOW ************ # (-1 selects respective lowest or highest) FILTER_TYPE__0_bandpass__1_bandreject=1 BRICKWALL_FILTER_window_low_frequency=500 BRICKWALL_FILTER_window_high_frequency=1200 #*************** LOW/HIGH SHELF EQ ************************* LOW_SHELF_EQ_gain_in_decibels=0 LOW_SHELF_EQ_frequency=1000 HIGH_SHELF_EQ_gain_in_decibels=-0 HIGH_SHELF_EQ_frequency=1100 #******** TERMINAL DISPLAY **************************** TERMINAL_DISPLAY_0_off__1_phase__2_magnitude__3_both=0 TERMINAL_DISPLAY_low_bin=10 TERMINAL_DISPLAY_high_bin=30 TERMINAL_DISPLAY_number_of_frames=1 #====================================================== #........... 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

(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/spectrumfunc $SFDIR/pitchfunc


plainpv6-2.html

ECMC PVC example file plainpv6-2
# Example PVC script used to create /sflib/x soundfile >> plainpv6-2 << # ECMC pvc example "plainpv6-2," which illustrates use of time # varying functions applied to both pitch and spectral warp index # of a tambourine shake. # For details on this example, type : pvcex plainpv6 # This script produced the second sound in /sflibx example "plainpv6
#****************************************************** #****** script to run PLAINPV (ECMC version) ********** #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin cd $PVCBIN # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/perc/tamb.shake outputsf=$SFDIR/plainpv6-2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # # 2 function files created to control time varying frequency spectrum and pitch: # gen3 generates amp values & linear connections at equally spaced time points # gen3 -Llength v1 v2 ... vN gen3 -L1000 5 5 -5 -5 5 > $SFDIR/spectrumfunc # 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 gen4 -L1000 0 -2 1 \ .25 -2 1 \ .5 4 1 \ .8 4 1 \ 1 2 > $SFDIR/pitchfunc ##### 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_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=0 # (-1 or 0 end time defaults to end of file) #*** 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=300 # generally 200, occasionally 400 or 600 when time stretching time_expansion_contraction_factor=1.5 #**** OUTPUT CHANNEL(S) ******************************* resynthesis_channel_1_to_max__0_all=0 # (channels are numbered from 1-maximum) # (0 = all channels) oscillator_resynthesis_threshold_in_dB=-80 #****** RESYNTHESIS PARAMETERS ************************** frequency_shift=0 # detune partials, in herz; int, float or FUNC gain_in_decibels=-6 # in dB, int, float or FUNC pitch_transposition_in_semitones=$SFDIR/pitchfunc # int, float or FUNC #************ENVELOPE RESPONSE ************************ release_time_in_seconds=0 # int, float or FUNC attack_time_in_seconds=0 # int, float or FUNC #********** SPECTRUM WARPSHAPE **************************** spectrum_warpshape_index=$SFDIR/spectrumfunc # int, float or FUNC #******** BRICKWALL BAND OR REJECT FILTER WINDOW ************ # (-1 selects respective lowest or highest) FILTER_TYPE__0_bandpass__1_bandreject=1 BRICKWALL_FILTER_window_low_frequency=500 BRICKWALL_FILTER_window_high_frequency=1200 #*************** LOW/HIGH SHELF EQ ************************* LOW_SHELF_EQ_gain_in_decibels=0 LOW_SHELF_EQ_frequency=1000 HIGH_SHELF_EQ_gain_in_decibels=-0 HIGH_SHELF_EQ_frequency=1100 #******** TERMINAL DISPLAY **************************** TERMINAL_DISPLAY_0_off__1_phase__2_magnitude__3_both=0 TERMINAL_DISPLAY_low_bin=10 TERMINAL_DISPLAY_high_bin=30 TERMINAL_DISPLAY_number_of_frames=1 #====================================================== #........... 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

(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/spectrumfunc $SFDIR/pitchfunc


plainpv7.html

ECMC PVC example file plainpv7
# Example PVC script used to create /sflib/x soundfile >> plainpv7 << # In this example, the amplitude envelope of /sflib/perc/maracaroll is # imposed on a gong (bianz.b3) from the chinaperc sflib directory # The amplitude envelope of the maraca roll was first analyzed in # ECMC PVC exmplae "envelope1", which created the file pvc.maracaroll.env # This file is read in to the plainpv7 script and applied to the # output resynthesis gain here: # gain_in_decibels=$SFDIR/pvc.maracaroll.env # file created by ecnvelope1 # Only the first 3.22 of the bianz tone are used, matching the duration # of the maraca roll: # endtime=3.22 # END TIME SET HERE TO DURATION OF MARACAROLL # In addition, a function file is created t ocontrol the spectrum warp # gen3 -L1000 10 -20 -5 10 > $SFDIR/warpfunc # spectrum_warpshape_index=$SFDIR/warpfunc # int, float or FUNC # As a result, the timbre at first grows brighter and then mellower, # unlike the original bianz tone. #****************************************************** #.................... PLAINPV ......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile: can be aiff or wave on Linux, aiff only on SGI inputsf=/sflib/chinaperc/bianz.b3 # outputsf=plainpv7 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### gen3 -L1000 10 -20 -5 10 > $SFDIR/warpfunc # gen3 generates amp values & linear connections at equally spaced time points # gen3 -Llength v1 v2 ... 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=3.22 # END TIME SET HERE TO DURATION OF MARACAROLL #====================================================== #*** 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/pvc.maracaroll.env # in dB, int, float or FUNC #.................. PITCH ............................. frequency_shift_in_Hz=-0 # detune partials, in herz; int, float or FUNC pitch_transposition_in_semitones=0 # 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=$SFDIR/warpfunc # 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

(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.)


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: # gen4 -L1000 0 0 -1 .95 0 -1 1. -96 # 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 0 -1 .95 0 -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

(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/fadeout