INHARMONATOR EXAMPLES

ECMC notes by A. S. on using the
PVC program "inharmonator" :
IMPORTANT NOTE: Currently the Linux version of the inharmonator program is BROKEN, and inharmonator can only be used on the ECMC SGI systems. However, many (though not all) of the sound modification resources of inharmonator can also be achieved by using "chordmapper," which is available on the ECMC Linux as well as SGI systems. For example, compare ECMC PVC example "inharm1", and its 4 sources, "inharm1-1, inharm1-2, inharm1-3" and "inharm1-4" with "example "chordmapper3" and its 4 sources ("chordmapper3-1" through "chordmapper3-4").
Frankly, I do not understand completely how a couple of the important parameters in this program work, so there is an element of heuristic trial-and-error in using "inharmonator." The program allows one to alter the frequency and amplitude of any number of partials within the source sound. Partials to be altered are called the TARGETS, and the remaining (unaltered) partials are called the NON_TARGETS in several of the parameter names. However, the amount by which a partial is shifted in frequency (pitch) results from a combination of two parameter arguments, leading to complication and, often, difficulty in determining the exact amount of the frequency shift. (1) The first argument you may want to adjust is INHARMONATOR_fundamental_frequency=500 # int, float or FUNC for which the inharmonator.tp template provides these comments: # 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 (2) Next, determine the method to be used to specify frequency shifts. Three alternative methods are available. The method to be used is determined by the SHIFT_METHOD_multiplier_0_or_frequency_map_1_or_pitch_map_2=0 parameter: (1) If set to 0, the default, frequency shifts will be specified as multipliers. A value of .5 would shift the partial down an octave, a value of 1.5 up a perfect 5th, and so on. (2) If the SHIFT_METHOD argument is set to 1, the shifts are specified in herz (3) If the SHIFT_METHOD argument is set to 2, the shifts are specified in octave pitch class notation (e.g. 8.00 = middle C = 261.6 hz. However, whichever of these 3 methods is used, the frequency shifts also will be affected by the INHARMONATOR_fundamental_frequency value discussed in step (1) above. (3) Next, create a TARGETS SHIFT file by editing the template provided in the following portion of the inharmonator.tp script: #*****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 within this function definition. # 1) partial number # 2) shift # 3) decibels echo \ \ 1 1 -0 \ 2 1 -0 \ 3 1 0 \ 4 1 -0 \ 5 1 -0 \ \ 6 1 -0 \ 7 1 -0 \ 8 1 0 \ 9 1 0 \ 10 1 0 \ \ > $SFDIR/inharmonatorfile ; This template-within-a-template specifies 10 TARGET partials -- partial numbers 1 through 10, the lowest 10 partials of the source sound, beginning, I think, with the INHARMONATOR_fundamental_frequency frequency. frequency. If you want to specify fewer than 10 target partials, delete some of these lines. Then, for each of the target partials, edit one of these lines, changing the default values (which will produce no alteration in the source spectrum) to the 1) partial number, 2) the amount of frequency shift, and 3) any change in the amplitude of this partial, expressed in dB (4) Another importtant parameter is NON_TARGETS_gain_in_dB=-96 # Range 0 to -96 (the default) # -96 provides the maximum possible suppresion of non-target partials # but does not provide complete suppression # 0 causes no attenuation in the amplitude of the non-target partials (5) Although the parameters discussed above provide more than enough complication for most users, several additional parameters provide further modification options that can be applied independently to the target and and non-target groups of partials, or to the output sound as a whole.
inharm1.html

ECMC PVC example file inharm1
ECMC PVC and /sflib/x example "inharm1" is a linear mix of 4 source examples: inharm1-1, inharm1-2 inharm1-3 and inharm1-4 In all three examples the duration of the source violin tone is cut in half and the output gain is reduced slightly to prevent clipping in some of the examples. The PVC program "chordmapper" provides many (but not all) of the same sound modification resources available with "inharmonator." ECMC PVC example "chordmapper3" is very similar to "inharm1," creating the same modifications with somewhat different procedures. The sources for these 2 examples also are very similar: inharm1-1 corresponds to chordmapper3-1, inharm1-2 to chordmapper3-2, inharm1-3 to chordmapper3-3 and inharm1-4 to chordmapper3-4. - - - - - "inharm1-1" creates straight resynthesis (no timbral alterations) of the source violin tone. The inharmonator frequency is set to 196, matching the fundamental frequency of the source violin tone. - - - - - In example "inharm1-2", the second tone, only partial one is altered. This partial is shifted down a major seventh in frequency and its amplitude is boosted by 12 dB. All other partials are attenuated (by a specified value of 9 dB, although actually there is less attentuation than this). - - - - - In example "inharm1-3" the frequencies of partials 1 through 5 are raised by increasing amounts (partial 1 is raised a minor ninth, partial 2 a major ninth, partial 5 an eleventh. The gain of these 5 target partials by about 3 dB, while the gain of all other partials is attenuated slightly. - - - - - In example "inharm1-4" the inharmonator frequency is changed and set to 392, double the frequency of the fundamental of the violin tone. Odd numbered partial frequencies are altered by ratios alternating between a major 2nd lower and a major second higher than the original. See the 4 source files ("inharm1-1" through "inharm1-4") for details.
inharm1-1.html

ECMC PVC example file inharm1-1
#ECMC PVC and /sflib/x example "inharm1-1" : # This is a reference example -- straight resynthesis of a violin # tone, for comparison with examples inharm1-2, 1-3 and 1-4. # The duration of input soundfile /sflib/string/vln.g3 is cut in half: # time_expansion_contraction_factor=.5 # 1 # The inharmonator frequency is set to 196 to match the fundamental # of the violin tone g3: # INHARMONATOR_fundamental_frequency=196 # int, float or FUNC # (In this example this change makes no difference, but in examples # inharm1-2, inharm1-3 and inharm1-4 it is important.) # No other resynthesis alterations are made to this source sound, and # defaults are used for all other parameters except for a 2 dB gain reduction: # MASTER_gain_in_decibels=-2 # int, float or FUNC #****************************************************** #................. INHARMONATOR ....................... #****************************************************** # ******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=$SFDIR/inharm1-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=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=.5 # speed is doubled, duration cut in half #........... 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=-2 # 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=-20 # 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=0 NON_TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC NON_TARGETS_gain_in_dB=-96 # int, float or FUNC # 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=196 # 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 #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 1 0 \ 2 1 0 \ 3 1 0 \ 4 1 0 \ 5 1 0 \ \ 6 1 0 \ 7 1 0 \ 8 1 0 \ 9 1 0 \ 10 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=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC TARGETS_gain_in_dB=-0 # 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
inharm1-2.html

ECMC PVC example file inharm1-2
# ECMC PVC and /sflib/x example "inharm1-2" : # (1) Similar to example "inharm1-1," with the # duration of input soundfile /sflib/string/vln.g3 is cut in half: # time_expansion_contraction_factor=.5 # 1 # (2) The inharmonzator fundamental frequency is set to g3 to match the # fundamental frequency of the violin tone: # INHARMONATOR_fundamental_frequency=196 # (3) Only the partial one of the violin tone is altered, shifted down # a major 7th & boosted by 12 dB : # echo \ # 1 .53 12 \ # > $SFDIR/inharmonatorfile ; # TARGETS_shift_file=$SFDIR/inharmonatorfile # The SHIFT_DATA_FORMAT is set to the default 0 # SHIFT_DATA_FORMAT=0 # 0 = frequency multiplier # so the .53 specifies a multipler for the original frequency # (4) All other partials are reduced slightly in amplitude: # NON_TARGETS_gain_in_dB=-9 # -9 dB attenuation # int, float or FUNC # No other resynthesis alterations are made to this source sound, and # defaults are used for all other parameters except for a 2 dB gain reduction: # MASTER_gain_in_decibels=-2 # int, float or FUNC #****************************************************** #................. INHARMONATOR ....................... #****************************************************** # ******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=inharm1-2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # (No gen functions used in this example) ##### 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=.5 # speed is doubled, duration cut in half #........... 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=-2 # 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=-20 # 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=0 NON_TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC NON_TARGETS_gain_in_dB=-9 # int, float or FUNC # 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=196 # 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 #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 .53 12 \ > $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=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC TARGETS_gain_in_dB=-0 # 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 #====================================================== #*****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 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 #====================================================== #==================================================== #........... 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/inharmonatorfile


inharm1-3.html

ECMC PVC example file inharm1-3
# ECMC PVC and /sflib/x example "inharm1-3" : # Similar to examples "inharm1-1" and "inharm1-2" except: # (1) The frequencies of partials 1 through 5 are altered by increasing # amounts (partial 1 is raised a minor 9th, partial 2 a major 9th, # partial 3 a minor tenth, and so on: # echo \ # 1 2.059 -0 \ # 2 2.122 -0 \ # 3 2.189 0 \ # 4 2.26 -0 \ # 5 2.334 -0 \ # \ # > $SFDIR/inharmonatorfile ; # The amplitude of these 5 target partials is increased by 3 dB: # TARGETS_gain_in_dB=3 # The amplitudes of the other (non-target) partials are attenuated: # NON_TARGETS_gain_in_dB=-6 #****************************************************** #................. INHARMONATOR ....................... #****************************************************** # ******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=$SFDIR/inharm1-3 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # (No gen functions used in this example) ##### 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=.5 # speed is doubled, duration cut in half #........... 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=-2 # 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=-20 # 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=0 NON_TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC NON_TARGETS_gain_in_dB=-96 # int, float or FUNC # 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=196 # 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 #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 2.059 -0 \ 2 2.122 -0 \ 3 2.189 0 \ 4 2.26 -0 \ 5 2.334 -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=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC TARGETS_gain_in_dB=3 # 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

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


inharm1-4.html

ECMC PVC example file inharm1-4
# ECMC PVC and /sflib/x example "inharm1-4" : # The inharmonator fundamental frequency is set to double the frequency # (392 hz.) of the source violin tone (196): # INHARMONATOR_fundamental_frequency=392 # int, float or FUNC # Odd numbered partials are shifted, alternately a major 2nd lower and # a major second higher, which become major tenths lower and higher: # echo \ # \ # 1 .89 -0 \ # 3 1.12 0 \ # 5 .89 -0 \ # \ # 7 1.12 -0 \ # 9 .89 -0 \ # 11 1.12 0 \ # 13 .89 0 \ # 15 1.12 0 \ # \ # > $SFDIR/inharmonatorfile #****************************************************** #................. INHARMONATOR ....................... #****************************************************** # ******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=$SFDIR/inharm1-4 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # (No gen functions used in this example) ##### 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=.5 # speed is doubled, duration cut in half #........... 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=-2 # 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=-20 # 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=0 NON_TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC NON_TARGETS_gain_in_dB=-96 # int, float or FUNC # 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=392 # 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 #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 .89 -0 \ 3 1.12 0 \ 5 .89 -0 \ \ 7 1.12 -0 \ 9 .89 -0 \ 11 1.12 0 \ 13 .89 0 \ 15 1.12 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=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC TARGETS_gain_in_dB=-0 # 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

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


inharm2.html

ECMC PVC example file inharm2
ECMC PVC and /sflib/x example "inharm2" is a linear mix of 4 source examples: inharm2-1, inharm2-2 inharm2-3 and inharm2-4 In each of the 4 resynthesized tones 1) the duration of the original bassoon tone is reduced by 25 % 2) the INHARMONATOR_fundamental_frequency argument is set to 110, matching the fundamental frequency of input soundfile sflib/wind/bssn.a2 3) Even numbered partials 2 through 20 are defned as the target partials, but no frequency or amplitude alterations are specified for these target partials. Instead, a frequency SHIFT of +45 herz is applied to the 10 target partials TARGETS_frequency_shift=45 (shifting the frequency of each of these partials up by 45 herz) while a different frequency shift of -95 herz is applied to the remaining (non-target) partials NON_TARGETS_frequency_shift=-95 - - - - - - - - - Differences between the 4 resynthesized tones in /sflib/x/inharm2: In example file "inharm2-1" (which produced the first note in /sflib/x soundfile example "inharm2") no attenuation is applied to the non-target partials: NON_TARGETS_gain_in_dB=-0 - - - - - - - - - In example file "inharm2-2" (which produced the second note in /sflib/x soundfile example "inharm2") maximum possible suppression is applied to the non-target partials, resulting in a simpler timbre than in example "inharm2-1" NON_TARGETS_gain_in_dB=-96 # int, float or FUNC - - - - - - - - - In "inharm2-3" 2 out-of-phase functions, each with 3 peaks and 3 nulls, are created and applied to the gains of 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 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 "cross-fades" between the 2 detunings of the bassoon tone. However, for reasons that are not clear to me, much of the original, unaltered bassoon spectrum remains. - - - - - - - - - In example file "inharm2-4" no frequency shifts are applied to either the target or non-target partials. Instead the target partials begin at the original pitch level, but then glissando up in pitch a half step. gen1 -L1000 0 0 .1 0 .9 1. 1. 1 > $SFDIR/rampup TARGETS_pitch_transposition_in_semitones=$SFDIR/rampup - - - - - - - - - Example file "inharm2-5" is similar to "inharm2-4," except that here a descending one octave glissando, beginning a major 7th above the original pitch level, is applied to the target partials and an ascending one octave glissando is applied to the non-target partials:
inharm2-1.html

ECMC PVC example file inharm2-1
# ECMC example "inharm2-1" : a resynthesized bassoon tone is # timbrally detuned and its duration is decreased by 25 % # time_expansion_contraction_factor=.75 # even-numbered target partials between # 2 and 20 are all shifted up by 45 herz: # 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_frequency_shift=45 # The remaining non-target partials are shifted down by 95 herz: # NON_TARGETS_frequency_shift=-95 # No attenuation is applied to these non-target partials: # NON_TARGETS_gain_in_dB=-0 # The master gain is reduced by 7 dB: # MASTER_gain_in_decibels=-7 # int, float or FUNC #****************************************************** #................. 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-1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # (No gen functions used in this example) ##### 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=-7 # 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=-20 # 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=0 # int, float or FUNC # 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=-0 # 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 #====================================================== #*****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 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 #====================================================== #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 1 0 \ 2 1 0 \ 3 1 0 \ 4 1 0 \ 5 1 0 \ \ 6 1 0 \ 7 1 0 \ 8 1 0 \ 9 1 0 \ 10 1 0 \ > inharmonatorfile #==================================================== #........... 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/inharmonatorfile


inharm2-2.html

ECMC PVC example file inharm2-2
# ECMC example "inharm2-2" is identical to example "inharm2-1", # with even-numbered target partials between # 2 and 20 are all shifted up by 45 herz. # However, in this example, maximum possible gain suppression is # applied to the non-target partials, resulting in a simpler timbre # than in example "inharm2-1" # NON_TARGETS_gain_in_dB=-96 # int, float or FUNC # Also, the master gain is set to 0 # MASTER_gain_in_decibels=0 # int, float or FUNC #****************************************************** #................. 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-2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # (No gen functions used in this example) ##### 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=0 # 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=-20 # 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=-96 # int, float or FUNC # 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=-0 # 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 #====================================================== #*****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 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 #====================================================== #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 1 0 \ 2 1 0 \ 3 1 0 \ 4 1 0 \ 5 1 0 \ \ 6 1 0 \ 7 1 0 \ 8 1 0 \ 9 1 0 \ 10 1 0 \ > inharmonatorfile #==================================================== #........... 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/inharmonatorfile


inharm2-3.html

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

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


inharm2-4.html

ECMC PVC example file inharm2-4
# ECMC example "inharm2-4" is similar to example "inharm2-1," but # in "inharm2-4" no pitch shift is applied to either the target or # non-target partials. # NON_TARGETS_frequency_shift=-0 # TARGETS_frequency_shift=0 # Instead, a function table is created with values that move linearly# from 0 to 1 over the course of the resynthesized note: # gen1 -L1000 0 0 .1 0 .9 1. 1. 1 > $SFDIR/rampup # This function then is applied to the pitch TRANSPOSITION of the target # partials, which begin at the original pitch level and glissando up # a half step # TARGETS_pitch_transposition_in_semitones=$SFDIR/rampup # int, float or FUNC #****************************************************** #................. 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-1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # gen1 creates linear {straight line} segments, like Csound gen 7 gen1 -L1000 0 0 .1 0 .9 1. 1. 1 > $SFDIR/rampup #******************** 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=-7 # 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=-20 # 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=0 NON_TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC NON_TARGETS_gain_in_dB=0 # int, float or FUNC # 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=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=$SFDIR/rampup # int, float or FUNC TARGETS_gain_in_dB=-0 # 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 #====================================================== #*****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 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 #====================================================== #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 1 0 \ 2 1 0 \ 3 1 0 \ 4 1 0 \ 5 1 0 \ \ 6 1 0 \ 7 1 0 \ 8 1 0 \ 9 1 0 \ 10 1 0 \ > inharmonatorfile #==================================================== #........... 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/inharmonatorfile $SFDIR/rampup



ECMC PVC example file inharm2-5
# ECMC example "inharm2-5" is similar to example "inharm2-4," but # in "inharm2-5" a descending one octave glissando, beginning a major # 7th above the original pitch level, is applied to the target partials # gen1 -L1000 0 11 .1 11 .9 -1 1. -1 > $SFDIR/glissfunc # TARGETS_pitch_transposition_in_semitones=$SFDIR/glissfunc # and an ascending one octave glissando is applied to the non-target # partials: # gen1 -L1000 0 0 .1 0 .9 12 1. 12 > $SFDIR/glissfunc2 # NON_TARGETS_pitch_transposition_in_semitones=$SFDIR/glissfunc2 # Also, the "source" sound is transposed down an octave and a tritone: # SOURCE_pitch_transposition_in_semitones=-18 #****************************************************** #................. 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-5 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # gen1 creates linear {straight line} segments, like Csound gen 7 gen1 -L1000 0 11 .1 11 .9 -1 1. -1 > $SFDIR/glissfunc gen1 -L1000 0 0 .1 0 .9 12 1. 12 > $SFDIR/glissfunc2 #******************** 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=-7 # int, float or FUNC #====================================================== #********** SOURCE ************************************ SOURCE_frequency_shift=0 # int, float or FUNC SOURCE_pitch_transposition_in_semitones=-18 # int, float or FUNC SOURCE_gain_in_dB=-20 # 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=0 NON_TARGETS_pitch_transposition_in_semitones=$SFDIR/glissfunc2 # int, float or FUNC NON_TARGETS_gain_in_dB=0 # int, float or FUNC # 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=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=$SFDIR/glissfunc # int, float or FUNC TARGETS_gain_in_dB=-0 # 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 #====================================================== #*****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 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 #====================================================== #==== CREATE TARGET SHIFT FILE DATA HERE ============== echo \ 1 1 0 \ 2 1 0 \ 3 1 0 \ 4 1 0 \ 5 1 0 \ \ 6 1 0 \ 7 1 0 \ 8 1 0 \ 9 1 0 \ 10 1 0 \ > inharmonatorfile #==================================================== #........... 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/inharmonatorfile glissfunc glissfunc2