HARMONIZER EXAMPLES

ECMC PVC example file harmonizer1
ECMC PVC example "harmonizer" is a mix of two soundfiles, created by example scripts "harmonizer1-1" (first note) and then "harmonizer1-2" (which created the second note). Example PVC script file >> harmonizer1-1 << : A 4 note dominant 7th chord (cc2 / g3/ bf4/e6) is created from a source violin tone. Each of the 4 "harmoinzed" notes contains the full frequency spectrum of the source violin tone (the -1 low and high frequency parameter arguments in the lines below: Note: Do not include any comments (#) in the lines that create a harmonizer map file The following parameter values, written into the scratch file $SFDIR/harmonizermap, create 3 "harmonizer" notes with transpositions down 19 semitones (c2), up 15 semitones (bf4) and up 33 semitones (e6) with gain adjustments of +9 dB, +4dB and -3 dB echo \ \ -19 -1 -1 9 \ 15 -1 -1 4 \ 33 -1 -1 -3 \ \ > $SFDIR/harmonizermap HARMONIZER_shift_file=harmonizermap This function creates a master gain that increases linearly from -40 dB to -6 dB, and then decreases back to -40 dB, creating an amplitude swell in all 4 notes: gen3 -L1000 -40 -6 -40 > $SFDIR/gainfunc MASTER_gain_in_decibels=$SFDIR/gainfunc # int,float or FUNC The "source" tone g3 is reduced in amplitude by 6 dB: SOURCE_gain_in_dB=-6 # -0 # int,float or FUNC - - - - - - - Example script "harmonizer1-2," which produced the second note in /sflib/x/soundfile "harmonizer1," is identical to example "harmonizer1-1" except that only a portion of the frequency spectrum of the original violin tone is used for resynthesis of each of the 3 harmonized notes: echo \ \ -19 -1 9.00 9 \ 15 8.03 10.02 4 \ 33 9.07 -1 -3 \ \ $SFDIR/harmonizermap HARMONIZER_shift_file=harmonizermap Harmonized tone c2 is created from frequencies between 0 Hz (-1) and c5 (9.00) in the source violin tone Harmonized tone bf4 (15) is created from frequencies between ef3 (8.03) and d6 (10.02) in the source violin tone. Harmonized tone e6 (33) uses frequencies from g5 (9.07) to the Nyquist - - - To see the source files for "twarp4-1" or "twarp4-2" type pvcex harmonizer1-1 or else getex harmonizer1-1 pvcex harmonizer1-2 or else getex harmonizer1-2
harmonizer1-1.html

ECMC PVC example file harmonizer1-1
# Example PVC script file >> harmonizer1-1 << : ## Example PVC script file >> harmonizer1-1 << : # COMMENTS: A 4 note dominant 7th chord (cc2 / g3/ bf4/e6) is created # from a source violin tone. Each of the 4 "harmoinzed" notes # contains the full frequency spectrum of the source violin tone # (the -1 low and high frequency parameter arguments in the lines below: # Note: Do not include any comments (#) or blank lines in the lines that # create a harmonizer map file # The following parameter values, written into the scratch file # $SFDIR/harmonizermap, create 3 "harmonizer" notes with transpositions # down 19 semitones (c2), up 15 semitones (bf4) and up 33 semitones (e6)# with gain adjustments of +9 dB, +4dB and -3 dB # echo \ # \ # -19 -1 -1 9 \ # 15 -1 -1 4 \ # 33 -1 -1 -3 \ # \ # > $SFDIR/harmonizermap # HARMONIZER_shift_file=harmonizermap # The function below creates a master gain that increases linearly from -40 dB # to -3 dB, and then decreases back to -40 dB, creating an amplitude swell # in all 4 notes: # gen3 -L100 -40 -6 -40 > $SFDIR/gainfunc # The "source" tone g3 is reduced in amplitude by 9 dB: # SOURCE_gain_in_dB=-6 # -0 # int,float or FUNC # End of COMMENTS #****************************************************** #................ HARMONIZER .......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/string/vln.g3 outputsf=harmonizer1-1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### gen3 -L1000 -40 -6 -40 > $SFDIR/gainfunc # 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 ************************** output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #........ BEGIN/END TIMES ............................. begintime=0 endtime=0 # (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, sometimes 400 or 600 for time stretching #........... 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 #****************** MODIFICATIONS ********************* #.................. TIME .............................. time_expansion_contraction_factor=1 # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... MASTER_gain_in_decibels=$SFDIR/gainfunc # in dB, int, float or FUNC #********** SOURCE ************************************ #.................. DECIBELS .......................... SOURCE_gain_in_dB=-6 # in dB, int, float or FUNC #.................. PITCH ............................. SOURCE_frequency_shift=0 # int,float or FUNC SOURCE_pitch_transposition_in_semitones=0 # int,float or FUNC #********** HARMONIZER ******************************** #.................. DECIBELS .......................... HARMONIZER_gain_in_dB=-0 # int,float or FUNC #.................. PITCH ............................. HARMONIZER_frequency_shift=0 # int, float or FUNC HARMONIZER_pitch_transposition_in_semitones=0 # int,float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #********* AMPLITUDE STATISTICS ********************** print_amplitude_statistics_0_no__1_yes=1 amplitude_statistics_time_interval=.25 #================ DATA FILE: ========================= HARMONIZER_data_file=$SFDIR/harmonizermap #................. SHIFT METHOD ....................... HARMONIZER_shift_method=2 #( 0 = frequency multipler ) #( 1 = frequency adder ) #( 2 = semitones of transposition ) #............... BOUNDARY FORMAT ...................... HARMONIZER_boundary_data_format=1 # 0 = frequency , 1 = octave.pitchclass ) #===================================================== #*************** DATA FILE FORMAT ******************** # (1) transposition multiplier/semitone transpose # (2) low freq boundary (octave.pclass or freq) # (3) high freq boundary (octave.pclass or freq) # (4) dB #***************************************************** #EDIT THE LINES BELOW, for harmonizer "notes" 1 & 2, and add similar additional # lines for additional harmonizer "notes" # Example: # Transposition = 1 semitone up, freqs. between c3 (7.00) and b4, -3 dB # 1 7.00 8.11 -3 \ echo \ \ -19 -1 -1 9 \ 15 -1 -1 4 \ 33 -1 -1 -3 \ \ > $SFDIR/harmonizermap #........... 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
#==================================================== # COMMAND LINE SETUP -- OFFICE USE ONLY # (DO NOT WRITE BELOW THIS LINE) #==================================================== PVCDIR=/usr/local/soundapps/PVC PVCBIN=$PVCDIR/bin # pvroutine=$PVCBIN/?????? # 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=harmonizer PVFLAGS="\ \ -N$FFT_length \ -M$windowsize \ -w$window_type \ -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 \ \ -G$SOURCE_gain_in_dB \ -a$SOURCE_frequency_shift \ -P$SOURCE_pitch_transposition_in_semitones \ \ -W$spectrum_warpshape_index \ \ -Z$HARMONIZER_boundary_data_format \ -z$HARMONIZER_shift_method \ \ -m$HARMONIZER_gain_in_dB \ -q$HARMONIZER_frequency_shift \ -X$HARMONIZER_pitch_transposition_in_semitones \ -F$HARMONIZER_data_file \ \ -p$print_amplitude_statistics_0_no__1_yes \ -i$amplitude_statistics_time_interval \ \ -_$output_data_format \ -=$rescale_level_in_decibels \ \ " echo "\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/harmonizermap
harmonizer1-2.html

ECMC PVC example file harmonizer1-2
# Example PVC script file >> harmonizer1-2 << : ## Example PVC script file >> harmonizer1-2 << : # COMMENTS: This example is identical to example "harmonizer1-1" except # that only a portion of the frequency spectrum of the original violin # tone is used for resynthesis of each of the 3 harmonized notes: echo \ \ -19 -1 9.00 9 \ 15 8.03 10.02 4 \ 33 9.07 -1 -3 \ \ > $SFDIR/harmonizermap # HARMONIZER_shift_file=harmonizermap # Harmonized tone c2 is created from frequencies between 0 Hz (-1) and # c5 (9.00) in the source violin tone # Harmonized tone bf4 (15) is created from frequencies between ef3 (8.03) # and d6 (10.02) in the source violin tone. # Harmonized tone e6 (33) uses frequencies from g5 (9.07) to the Nyquist As in "harmonizer1-1" an amplitude swell is applied to the gain: # gen3 -L1000 -40 -6 -40 > $SFDIR/gainfunc # MASTER_gain_in_decibels=$SFDIR/gainfunc # in dB, int, float or FUNC # The "source" tone g3 is reduced in amplitude by 6 dB: # SOURCE_gain_in_dB=-6 # -0 # int,float or FUNC # End of COMMENTS #****************************************************** #................ HARMONIZER .......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/string/vln.g3 outputsf=harmonizer1-2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### gen3 -L1000 -40 -6 -40 > $SFDIR/gainfunc # gen3 generates amp values & linear connections at equally spaced time points # gen3 -Llength v1 v2 ... vN ##### End of gen routine function generator tempates ##### #******************** OUTPUT ************************** output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #........ BEGIN/END TIMES ............................. begintime=0 endtime=0 # (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, sometimes 400 or 600 for time stretching #........... 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 #****************** MODIFICATIONS ********************* #.................. TIME .............................. time_expansion_contraction_factor=1 # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... MASTER_gain_in_decibels=$SFDIR/gainfunc # in dB, int, float or FUNC #********** SOURCE ************************************ #.................. DECIBELS .......................... SOURCE_gain_in_dB=-6 # in dB, int, float or FUNC #.................. PITCH ............................. SOURCE_frequency_shift=0 # int,float or FUNC SOURCE_pitch_transposition_in_semitones=0 # int,float or FUNC #********** HARMONIZER ******************************** #.................. DECIBELS .......................... HARMONIZER_gain_in_dB=-0 # int,float or FUNC #.................. PITCH ............................. HARMONIZER_frequency_shift=0 # int, float or FUNC HARMONIZER_pitch_transposition_in_semitones=0 # int,float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #********* AMPLITUDE STATISTICS ********************** print_amplitude_statistics_0_no__1_yes=1 amplitude_statistics_time_interval=.25 #================ DATA FILE: ========================= HARMONIZER_data_file=$SFDIR/harmonizermap #................. SHIFT METHOD ....................... HARMONIZER_shift_method=2 #( 0 = frequency multipler ) #( 1 = frequency adder ) #( 2 = semitones of transposition ) #............... BOUNDARY FORMAT ...................... HARMONIZER_boundary_data_format=1 # 0 = frequency , 1 = octave.pitchclass ) #===================================================== #*************** DATA FILE FORMAT ******************** # (1) transposition multiplier/semitone transpose # (2) low freq boundary (octave.pclass or freq) # (3) high freq boundary (octave.pclass or freq) # (4) dB #***************************************************** #EDIT THE LINES BELOW, for harmonizer "notes" 1 & 2, and add similar additional # lines for additional harmonizer "notes" # Example: # Transposition = 1 semitone up, freqs. between c3 (7.00) and b4, -3 dB # 1 7.00 8.11 -3 \ echo \ \ -19 -1 9.00 9 \ 15 8.03 10.02 4 \ 33 9.07 -1 -3 \ > $SFDIR/harmonizermap #........... 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

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


harmonizer2.html

ECMC PVC example file harmonizer2
/sflib/x example "harmonizer2," like several other ECMC PVC examples, is a mix of two soundfiles, produced by example scripts harmonizer2-1" and harmonizer2-2". To see the source files for "harmonizer2-1" or "harmonizer2-2" type pvcex harmonizer2-1 or else getex harmonizer2-1 pvcex harmonizer2-2 or else getex harmonizer2-2 "harmonizer2-1" : Input soundfile "vln.g3" is "harmonized" as a dyad with pitches at b1 (g3 transposed down 20 semitones) and bf5 (g3 transposed up 27 semitones). The lower note is resynthesized using only frequencies between g5 (9.07) and g7 (11.07) from the source soundfile. The high note is resynthesized using only the first 4 harmonics (7.07 to 9.07). The amplitudes of the 2 notes are boosted, respectively, by 30 and 20 dB. echo \ \ -20 9.07 11.07 30 \ 27 7.07 9.07 20\ \ > $SFDIR/harmonizermap #HARMONIZER_shift_file=harmonizermap The source tone (g3) is suppressed in resynthesis: SOURCE_gain_in_dB=-96 # -0 # int,float or FUNC An amplitude envelope that increases and then decreases in intensity linearly is applied to both harmonized notes: gen3 -L100 -24 -8 -24 > $SFDIR/gainfunc MASTER_gain_in_decibels=$SFDIR/gainfunc # int,float or FUNC ----- ECMC PVC example script "harmonizer2-2" is identical to example script "harmonizer2-2" except for the band of frequencies used to resynthesize the two notes: echo \ \ -20 10.07 -1 10 \ 27 7.06 7.09 30 \ \ > $SFDIR/harmonizermap Here, the low note (b1) is resynthesized using only frequencies above g6 (the 8th harmonic) of the source violin tone, and the high note (bf6) is resynthesized as a sine wave, using only the fundamental of the source sound.
harmonizer2-1.html

ECMC PVC example file harmonizer2-1
# Example PVC script file >> harmonizer2-1 << : # ECMC PVC example script "harmonizer2-1" : # Input soundfile "vln.g3" is "harmonized" as a dyad with pitches # at b1 (g3 transposed down 20 semitones) and bf5 (g3 transposed up # 27 semitones). The lower note is resynthesizewd using only frequencies# between g5 (9.07) and g7 (11.07) from the source soundfile. The high # note is resynthesized using only the first 4 harmonics (7.07 to 9.07). # The amplitudes of the 2 notes are boosted, respectively, by 30 and 20 dB. # #echo \ #-20 9.07 11.07 30 \ #27 7.07 9.07 20\ #> $SFDIR/harmonizermap #HARMONIZER_shift_file=harmonizermap # The source tone (g3) is suppressed in resynthesis: # SOURCE_gain_in_dB=-96 # -0 # int,float or FUNC # An amplitude envelope that increases and then decreases in intensity # linearly is applied to both harmonized notes: # gen3 -L100 -24 -8 -24 > $SFDIR/gainfunc # MASTER_gain_in_decibels=$SFDIR/gainfunc # int,float or FUNC #****************************************************** #................ HARMONIZER .......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/string/vln.g3 outputsf=harmonizer2-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 ************************** output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #........ BEGIN/END TIMES ............................. begintime=0 endtime=0 # (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, sometimes 400 or 600 for time stretching #........... 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 #****************** MODIFICATIONS ********************* #.................. TIME .............................. time_expansion_contraction_factor=1 # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... gen3 -L100 -24 -8 -24 > $SFDIR/gainfunc MASTER_gain_in_decibels=$SFDIR/gainfunc # in dB, int, float or FUNC #********** SOURCE ************************************ #.................. DECIBELS .......................... SOURCE_gain_in_dB=-96 # in dB, int, float or FUNC #.................. PITCH ............................. SOURCE_frequency_shift=0 # int,float or FUNC SOURCE_pitch_transposition_in_semitones=0 # int,float or FUNC #********** HARMONIZER ******************************** #.................. DECIBELS .......................... HARMONIZER_gain_in_dB=-0 # int,float or FUNC #.................. PITCH ............................. HARMONIZER_frequency_shift=0 # int, float or FUNC HARMONIZER_pitch_transposition_in_semitones=0 # int,float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #********* AMPLITUDE STATISTICS ********************** print_amplitude_statistics_0_no__1_yes=1 amplitude_statistics_time_interval=.25 #================ DATA FILE: ========================= HARMONIZER_data_file=$SFDIR/harmonizermap #................. SHIFT METHOD ....................... HARMONIZER_shift_method=2 #( 0 = frequency multipler ) #( 1 = frequency adder ) #( 2 = semitones of transposition ) #............... BOUNDARY FORMAT ...................... HARMONIZER_boundary_data_format=1 #( 0 = frequency ) #( 1 = octave.pitchclass ) #===================================================== #*************** DATA FILE FORMAT ******************** # (1) transposition multiplier/semitone transpose # (2) low freq boundary (octave.pclass or freq) # (3) high freq boundary (octave.pclass or freq) # (4) dB #***************************************************** #EDIT THE LINES BELOW, for harmonizer "notes" 1 & 2, and add similar additional # lines for additional harmonizer "notes" # Example: # Transposition = 1 semitone up, freqs. between c3 (7.00) and b4, -3 dB # 1 7.00 8.11 -3 \ echo \ -20 9.07 11.07 30 \ 27 7.07 9.07 20 \ > $SFDIR/harmonizermap #........... 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

(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/harmonizermap $SFDIR/gainfunc


harmonizer2-2.html

ECMC PVC example file harmonizer2-2
# ECMC PVC example script "harmonizer2-2" is identical to example # script "harmonizer1-2" except for the band of frequencies used # to resynthesize the two notes: # echo \ # -20 10.07 -1 10 \ # 27 7.06 7.09 30\ # > $SFDIR/harmonizermap # Here, the low note (b1) is resynthesized using only frequencies # above g6 (the 8th harmonic) of the source violin tone, and the high# note (bf6) is resynthesized as a sine wave, using only the fundamental # of the source sound. #****************************************************** #................ HARMONIZER .......................... #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/string/vln.g3 outputsf=harmonizer2-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 ************************** output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #........ BEGIN/END TIMES ............................. begintime=0 endtime=0 # (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, sometimes 400 or 600 for time stretching #........... 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 #****************** MODIFICATIONS ********************* #.................. TIME .............................. time_expansion_contraction_factor=1 # (Adjust frames_per_second in proportion to keep a constant rate.) #.................. DECIBELS .......................... gen3 -L100 -24 -8 -24 > $SFDIR/gainfunc MASTER_gain_in_decibels=$SFDIR/gainfunc # in dB, int, float or FUNC #********** SOURCE ************************************ #.................. DECIBELS .......................... SOURCE_gain_in_dB=-96 # in dB, int, float or FUNC #.................. PITCH ............................. SOURCE_frequency_shift=0 # int,float or FUNC SOURCE_pitch_transposition_in_semitones=0 # int,float or FUNC #********** HARMONIZER ******************************** #.................. DECIBELS .......................... HARMONIZER_gain_in_dB=-0 # int,float or FUNC #.................. PITCH ............................. HARMONIZER_frequency_shift=0 # int, float or FUNC HARMONIZER_pitch_transposition_in_semitones=0 # int,float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #********* AMPLITUDE STATISTICS ********************** print_amplitude_statistics_0_no__1_yes=1 amplitude_statistics_time_interval=.25 #================ DATA FILE: ========================= HARMONIZER_data_file=$SFDIR/harmonizermap #................. SHIFT METHOD ....................... HARMONIZER_shift_method=2 #( 0 = frequency multipler ) #( 1 = frequency adder ) #( 2 = semitones of transposition ) #............... BOUNDARY FORMAT ...................... HARMONIZER_boundary_data_format=1 #( 0 = frequency ) #( 1 = octave.pitchclass ) #===================================================== #*************** DATA FILE FORMAT ******************** # (1) transposition multiplier/semitone transpose # (2) low freq boundary (octave.pclass or freq) # (3) high freq boundary (octave.pclass or freq) # (4) dB #***************************************************** #EDIT THE LINES BELOW, for harmonizer "notes" 1 & 2, and add similar additional # lines for additional harmonizer "notes" # Example: # Transposition = 1 semitone up, freqs. between c3 (7.00) and b4, -3 dB # 1 7.00 8.11 -3 \ echo \ -20 10.07 -1 10 \ 27 7.06 7.09 30 \ > $SFDIR/harmonizermap #........... 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

(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 harmonizermap gainfunc