ECMC PVC example file inharm2-3
# ECMC example "inharm2-3" is identical to example "inharm2-1" and "inharm2-2" # with even-numbered target partials between # 2 and 20 are all shifted up by 45 herz and non-target partials # shifted down by 95 herz. However, in this example, 3 amplitude # cross fades are applied between the target and non-target partials # gen5 -L100 3 1 0 | reshape -b-96 -B3 > $SFDIR/tremolo1 # gen5 -L100 3 1 180 | reshape -b-96 -B3 > $SFDIR/tremolo2 # In these functions, 3 cycles of a sine wave are created # rescale then rescales these functions from an initial range # of +1 to -1 to a new range of +3 to -96 (dB) # NON_TARGETS_frequency_shift=-95 # NON_TARGETS_gain_in_dB=$SFDIR/tremolo1 # int, float or FUNC # TARGETS_frequency_shift=45 # TARGETS_gain_in_dB=$SFDIR/tremolo2 # int, float or FUNC # This results in 3 oscillations between the target and non-target groups. # However, despite the frequency shifts applied to both the target # and non-target partials, much of the original unaltered bassoon # spectrum remains, for reasons that are not clear to me #****************************************************** #................. INHARMONATOR ....................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/wind/bssn.a2 outputsf=inharm2-3 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### gen5 -L100 3 1 0 | reshape -b-96 -B3 > $SFDIR/tremolo1 gen5 -L100 3 1 180 | reshape -b-96 -B3 > $SFDIR/tremolo2 ##### End of gen routine function generator tempates ##### #******************** OUTPUT ************************** output_data_format=0 # 0= Same as input file, 1 = integers 2 = rescaled floats #******************** INPUT *************************** #........ BEGIN/END TIMES ............................. begintime=0 endtime=0 # (0 or less 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 *************************** #.................. TIME .............................. time_expansion_contraction_factor=.75 # #........... OUTPUT CHANNEL(S) ....................... output_channel=0 # (channels are numbered from 1-maximum) # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-6 # int, float or FUNC #====================================================== #********** SOURCE ************************************ SOURCE_frequency_shift=0 # int, float or FUNC SOURCE_pitch_transposition_in_semitones=-0 # int, float or FUNC SOURCE_gain_in_dB=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... SOURCE_attack_time_in_seconds=0 # int, float or FUNC SOURCE_release_time_in_seconds=0 # int, float or FUNC #********** NON TARGETS ******************************** NON_TARGETS_frequency_shift=-95 NON_TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC NON_TARGETS_gain_in_dB=$SFDIR/tremolo1 # Range 0 to -96 (the default) # -96 provides the maximum possible suppression of non-target partials # but does not provide complete suppression # 0 causes no attenuation in the amplitude of the non-target partials #====================================================== #********** TARGETS ******************************** #............ FUNDAMENTAL FREQUENCY ..................... INHARMONATOR_fundamental_frequency=110 # int, float or FUNC # IMPORTANT: If possible change the default value of 500 above # to the fundamental frequency, in herz, of the input soundfile # Use the "midinote" command, or else consult the help file "herz" # to determine this frequuency # For inharmonic sounds, try changing the 500 default to various other # values, and choose the value that provides the best result #*****TARGETS SHIFT FILE: DATA FORMAT # Edit the template table below, changing the 3 values for each partial # and adding or deleting lines to specify more or less than 10 target # partials. Do not include any comments or blank lines within this function # definition and make sure that the \ at the end of each line is preceded # by a space # The 3 arguments on each line below specify the: # 1) partial number # 2) shift # 3) change in gain in decibels echo \ 2 1 0 \ 4 1 0 \ 6 1 0 \ 8 1 0 \ 10 1 0 \ \ 12 1 0 \ 14 1 0 \ 16 1 0 \ 18 1 0 \ 20 1 0 \ > $SFDIR/inharmonatorfile #*************** TARGETS ******************************** TARGETS_shift_file=$SFDIR/inharmonatorfile #Do not change this line unless # you really know what you are doing #====================================================== SHIFT_DATA_FORMAT=0 # 0 = frequency multiplier 1 = map to frequency # 2 = map to octave.pitchclass 3 = map to partial number #====================================================== TARGETS_partial_band_edge_decibels=-0 #.................. DECIBELS .......................... TARGETS_frequency_shift=45 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC TARGETS_gain_in_dB=$SFDIR/tremolo2 # int, float or FUNC #.................CONTROL .......................... TARGETS_freq_shift_control_proportion=1 # int, float or FUNC #(control proportion is 0-1, 0=no shift, 1=full shift) #............ SPECTRUM WARPSHAPE ...................... TARGETS_spectrum_warpshape_index=0 #............ RESPONSE ............................... INHARMONATOR_attack_time_in_seconds=0 # int,float or FUNC INHARMONATOR_release_time_in_seconds=0 # int,float or FUNC INHARMONATOR_frequency_response_time_in_seconds=0 # int,float or FUNC #====================================================== #........... 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) #==================================================== PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin 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=inharmonator PVFLAGS="\ \ -N$FFT_length \ -M$windowsize \ -D$frames_per_second \ -I$time_expansion_contraction_factor \ \ -C$output_channel \ -t$oscillator_resynthesis_threshold_in_dB \ \ -b$begintime \ -e$endtime \ \ -A$MASTER_gain_in_decibels \ \ -Q$SOURCE_frequency_shift \ -u$SOURCE_pitch_transposition_in_semitones \ -r$SOURCE_gain_in_dB \ -l$SOURCE_attack_time_in_seconds \ -L$SOURCE_release_time_in_seconds \ \ -f$INHARMONATOR_fundamental_frequency \ -v$INHARMONATOR_attack_time_in_seconds \ -V$INHARMONATOR_release_time_in_seconds \ -Y$INHARMONATOR_frequency_response_time_in_seconds \ -Z$SHIFT_DATA_FORMAT \ \ -a$NON_TARGETS_frequency_shift \ -P$NON_TARGETS_pitch_transposition_in_semitones \ -G$NON_TARGETS_gain_in_dB \ \ -F$TARGETS_shift_file \ -B$TARGETS_partial_band_edge_decibels \ -q$TARGETS_frequency_shift \ -X$TARGETS_pitch_transposition_in_semitones \ -m$TARGETS_gain_in_dB \ -S$TARGETS_shift_control_proportion \ \ \ -W$TARGETS_spectrum_warpshape_index \ \ -p$print_amplitude_statistics_0_no__1_yes \ -i$amplitude_statistics_time_interval \ \ -_$output_data_format \ -=$rescale_level_in_decibels \ \ \ " 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/inharmonatorfile