CHORDMAPPER EXAMPLES

ECMC notes by A. S. on using the
PVC program CHORDMAPPER
The hardest thing about using "chordmapper" is creating the "chordmapper" function file with 12 arguments for each resynthesis note. Who can remember what these 12 arguments are? The chordmapper.tp script lists and briefly describes these 12 arguments before one must create the function: #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # 5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # 6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # 7) partial spacing as proportion of fundamental,negative = rejectmode # 8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # 9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # 10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # 11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # 12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase However,some of these descriptions still may be out of view when you actually have to create the function. Some of the arguments also are rather abstruse. What is the "Frequency control switch" or a "Null phase factor." When you run a "chordmapper" job the output includes a table of these twelve arguments, but it will gowhizzing by so fast you may not even see it. Here is the table output produced by ECMC example file "chordmapper2," which creates 4 resynthesis "tone" or "notes: ************************************************************************ |Tone|Source |Source Low|Oct.Pitch |Number |BW | | | |Oct.Pitch |Partial |Class Map |of |Proportion|Decibels | | |Class |Number |Point |Partials | | | .......................................................................| |1 |7.110 |1.000 |7.060 |0.000 |0.300 |0.000 | |2 |7.110 |1.000 |8.000 |0.000 |0.300 |-3.000 | |3 |7.110 |1.000 |8.050 |0.000 |0.300 |-6.000 | |4 |7.110 |1.000 |8.110 |0.000 |0.300 |-9.000 | ************************************************************************ ************************************************************************ |Tone|Partials |Db Rolloff|Amp Interp|FreqInterp|Tuning |Null | | |Spacing |(or up)per| Control | Control |Factor |Phase | | |Proportion|Octave | Switch | Switch | | | .......................................................................| |1 |1.000 |0.000 |0.000 |0.000 |0.000 |0.000 | |2 |1.000 |0.000 |0.000 |0.000 |0.000 |0.000 | |3 |1.000 |0.000 |0.000 |0.000 |0.000 |0.000 | |4 |1.000 |0.000 |0.000 |0.000 |0.000 |0.000 | ************************************************************************ Note that arguments 7 through 12 (the second row above, "Partials spacing proportion" through "Null Phase") are used much less frequently than the first six arguments, and that with the exception of "Partials Spacing Proportion," which has a default of 1, the rest of the arguments (8 through 12) on the second row have default values of 0. The chordmapper program is VERY picky, and will abort (often with an error message of "INSUFFICIENT DATA FILE") if there is ANYTHING it does not like within these 12 arguments. Supposedly one can use * (an asterisk) to comment out a function line, but I have found that often chordmapper objects to lines within this function that begin with * Do not include any blank lines within the chordmapper function definition, nor any spaces after an * comment. You can NOT omit any of the 12 arguments, even if you want the default zeros, like this: echo 7.00 1 7.03 0 1 -0 1. 0 0 > chordmapfile (Only 9 arguments on the line above.) This will cause a INSUFFICIENT DATA FILE error. When chordmapper is unhappy, it often will hang, just sitting there indefinitely, rather than die. However, sometimes chordmapper can run EXTREMELY SLOWLY, even when your file is fine. Wiyth other input files it runs rather quickly.
chordmapper1.html

ECMC PVC example file chordmapper1
# Example PVC script file >> chordmapper1 << : ECMC pvc soundfile example /sflib/x/chordmapper1 illustrates the use of the chordmapper program for modifying the timbres of single notes rather than for building "chords." This soundfile is a mix of 4 successive source soundfiles, produced by example files "chordmapper1-1" through "chordmapper1-4". Each creates a single note, resynthesizing the horn tone sflib/wind/hn.c3 -- which is created by a single line written to the file used to resynthesize notes by the chordmapper program. The paramters on this line are: DATA FILE FORMAT ******************** # (1) frequency/pitch-source # (2) frequency/pitch-target # (3) number of partials (0 = all below Nyquist) # (4) partial halfbandwidth as proportion of fundamental frequency # (5) dB # (6) partial spacing as proportion of fundamental # (7) decibel of top-partial, relative to fundamental - - - First note (produced by ECMC example PVC file chordmapper1-1) : echo \ \ 7.00 7.03 0 1. -0 1 -0 \ \ > $SFDIR/chordmapperfile ; This transposes the note up a minor third (from 7.00, c3, to 7.03, ef3). Values for the other parameters on this line have been set with the goal of making the resynthesis closely match the original horn tone, although some of the "puff" is missing freom the attack. --------------- 2nd note, created by example file "chordmapper1-2". The file "chordmapper1-2" is identical to file ""chordmapper1-1" except for these three lines: SHIFT_METHOD_frequency_map_0_or_pitch_map_1=0 (Input and output pitches on the line below are expressed in frequency, rather than the default octave pitch class. ) 130.8 155.56 0 24. -9 1 36 \ (Note the high value -- 24 -- for partial halfbandwidth, and for the ratio of top partial-to-fundamental (36). The result is a brighter timbre. These values also caused clipping, so I reduced the master gain:) MASTER_gain_in_decibels=-54 # int, float or FUNC --------------- 3rd note, created by example file "chordmapper1-3": Here only 4 partials of the horn timbre are resynthesized: 7.00 7.03 4 1. 36 1 -0 \ This creates a "mellower" timbre, but also would cause severe loss in amplitude, which is compensated for by the 36 dB boost (5th argumnet in the line above. --- 4th note, created by example file "chordmapper1-4": Here, the frequency ratio between the partials is altered (the 1.4 value in the 6th argument), altering, and partially detuning, the timbre: 7.00 7.03 0 1. -0 1.4 -0 \
chordmapper1-1.html

ECMC PVC example file chordmapper1-1
# ECMC PVC Example chordmapper1-1 # This is a reference soundfile -- a straight resynthesis of /sflib/wind/hn.c3 # except for a transposition up a minor third to ef3 # The 7 values in the resynthesis data file are: # echo \ # \ # 7.00 7.03 0 1. -0 1 -0 \ # \ # > $SFDIR/chordmapperfile ; # This transposes the note up a minor third (from 7.00, c3, to # 7.03, ef3). Values for the other parameters on this line have been set # with the goal of making the resynthesis closely match the original # horn tone, although some of the "puff" is missing freom the attack. #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/wind/hn.c3 outputsf=chordmapper1-1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # gen0 normalizes function files previously created with other gen routines # gen0 -Llength max < inputfuncfile > outputfuncfile # gen1 creates linear {straight line} segments, like Csound gen 7 # gen1 -Llength t1 v1 ... tN vN # gen2 generates harmonic waveforms from sine {a} & cosine {b} amps # gen2 -Llength [-o (default) or -c] a1 ... aN b0 ... bM N # gen3 generates amp values & linear connections at equally spaced time points # gen3 -Llength v1 v2 ... vN # gen4 generates exponenetial segments; "a" values determine shape & # depth of curve: 0 = linear, neg. = exponential, pos. = inverse expo. # gen4 -Llength t1 v1 a1 ... tN vN # gen5 is like Csound gen 9 : harmonic1/amp/phase harmonic2/amp/phase # gen5 -Llength h1 a1 p1 ... hN aN pN # gen6 generates a table of random numbers between +1 and -1 # gen6 -Llength # cspline: smooth curve {cubic spline} interpolator # cspline len_flag [flags] x0 y0 x1 y1 ... xN yN # genraw reads in a previously created function file # genraw -LN filename (where N is the length of the output function.) # For a usage summary of "reshape" type "reshape" with no arguments. ##### End of gen routine function generator tempates ##### #...................................................... output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1025, sometimes 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_expansion_contraction_factor=1 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-0 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=3 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.00 1 7.03 0 1 -0 \ 1. 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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=chordmapper 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 \ \ -q$TARGETS_frequency_shift \ -X$TARGETS_pitch_transposition_in_semitones \ -m$TARGETS_gain_in_dB \ -F$TARGETS_shift_file \ \ -L$release_time_in_seconds \ -l$attack_time_in_seconds \ \ \ -c$TARGETS_amp_interpolation_control__0_to_1 \ -d$TARGETS_freq_interpolation_control__0_to_1 \ \ -B$TARGETS_nullphase_interpolation_control__0_to_1 \ -K$TARGETS_partial_tuning_control \ -J$TARGETS_partial_tuning_base_value \ \ \ -Z$SHIFT_DATA_FORMAT \ -Q$SOURCE_POINT_DATA_FORMAT \ -W$spectrum_warpshape_index \ \ \ -S$LOW_SHELF_EQ_gain_in_decibels \ -U$LOW_SHELF_EQ_frequency \ \ -T$HIGH_SHELF_EQ_gain_in_decibels \ -V$HIGH_SHELF_EQ_frequency \ \ \ -_$output_data_format \ -=$rescale_level_in_decibels \ \ -p$print_amplitude_statistics_0_no__1_yes \ -i$amplitude_statistics_time_interval \ \ " 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/chordmapfile
chordmapper1-2.html

ECMC PVC example file chordmapper1-2
# ECMC PVC example chordmapper1-2 # The output is timbrally much brighter than chordmapper1-1 owing to the high # value of 24 for partial half bandwidth and 5 for decibel rolloff. These 2 values # greatly increase the strength of higher upper partials, resulting in much higher # overall gain as well. # Gain is reduced by 9 dB to avoid clipping # 7.00 3 7.03 0 24 -9 \ # 1. 5 0 0 0 0 \ # > $SFDIR/chordmapfile # Defaults are used for all other parameters, just like chordmapper1-1 # Note: This job runs VERY SLOWLY #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/wind/hn.c3 outputsf=chordmapper1-2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # No cmusic function generator files are created in this example #...................................................... output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1025, sometimes 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_expansion_contraction_factor=1 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-54 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=3 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.00 3 7.03 0 24 -12 \ 1. 5 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile


chordmapper1-3.html

ECMC PVC example file chordmapper1-3
# ECMC PVC example chordmapper1-3 # This example is identical to chordmapper1-1 except for the #echo \ 7.00 1 7.03 4 1 36 \ 1. 0 0 0 0 0 \ > $SFDIR/chordmapfile # Only the 1st 4 partials are synthesized. This greatly reduces the amplitude, # so 36 dB gain is introduced. The aural result of the "brickwall" lowpass # filtering is rather like a plunger mute # All other parameter values are set to defaults, as in chordmapper1-1 #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/wind/hn.c3 outputsf=chordmapper1-3 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # No cmusic function generator files are created in this example #...................................................... output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1025, sometimes 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_expansion_contraction_factor=1 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-0 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=3 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.00 1 7.03 4 1 36 \ 1. 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile


chordmapper1-4.html

ECMC PVC example file chordmapper1-4
# ECMC PVC example chordmapper1-4 # This example emphasizes the 3rd harmonic partial # 7.00 1 7.03 0 1 -0 \ # 2.4 0 0 0 0 0 \ # The 7th argument, partial spacing as proportion of fundamental, is set # to 2.4 rather than 1., emphasizing the 3rd harmonic (which is approximately # 2.5 times the fundamental frequency) # Defaults are used for all other parameters, as in chordmapper1-1 and chordmapper1-3 #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/wind/hn.c3 outputsf=chordmapper1-4 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # No cmusic function generator files are created in this example #...................................................... output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1025, sometimes 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_expansion_contraction_factor=1 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-0 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=3 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.00 1 7.03 0 1 -0 \ 2.4 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile


chordmapper2.html

ECMC PVC example file chordmapper2
# ECMC pvc example chordmapper2: this example creatres a four note # "harmonization" from soprano tone /sflib/voice/sop1.b3. The four # chord tone clones created from the analysis of this source soundfile # are pitched at fs3, c4, f4 and b4. The output amplitudes of these 4# notes decrease from the lowest to highest note, in attempt to # "balance" the chord. # echo \ # 7.11 1 7.06 0 .3 0 1 0 0 0 0 0 \ # 7.11 1 8.00 0 .3 -3 1 0 0 0 0 0 \ # 7.11 1 8.05 0 .3 -6 1 0 0 0 0 0 \ # 7.11 1 8.11 0 .3 -9 1 0 0 0 0 0 \ # > $SFDIR/chordmapfile # The low .3 values in parameter 5 (partial bandwidth as proportion of # fundamental frequency) simplify the timbre, reducing higher frequencies # To obtain better spectral resolution and reduce buzzing artifacts, # the FFT size is increase from the default 1024 to 4096: # FFT_length=4096 # 2048 # 1024 # To eliminate clipping that would be caused by 4 clones of a tone the # master gain is reduced by 10 dB # MASTER_gain_in_decibels=-10 # in dB, int, float or FUNC # > $SFDIR/chordmapfile # Notice the exaggeration in the quavering amplitude variations of the # original soprano tone that result when four pitch-shifted clones # of this tone sound simultaneously. #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******ECMC CHANGES & ADDITIONS: *************** #******** INPUT & OUTPUT SOUNDFILES ************* # input soundfile, can be aiff or wave format on Linux, aiff only on SGI inputsf=/sflib/voice/sop1.b3 outputsf=chordmapper2 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # No cmusic function generator files are created in this example #...................................................... output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=4096 # usually 1024, sometimes 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_expansion_contraction_factor=1 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-10 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=3 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # 5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # 6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # 7) partial spacing as proportion of fundamental,negative = rejectmode # 8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # 9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # 10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # 11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # 12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: # 4 note harmonization at fs3, c4, f4, b4: echo \ 7.11 1 7.06 0 .3 0 1 0 0 0 0 0 \ 7.11 1 8.00 0 .3 -3 1 0 0 0 0 0 \ 7.11 1 8.05 0 .3 -6 1 0 0 0 0 0 \ 7.11 1 8.11 0 .3 -9 1 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile


chordmapper3.html

ECMC PVC example file chordmapper3
ECMC PVC example "chordmapper3" illustrates that "chordmapper" can be used for many (but not all) of the same types of detuning operations as the PVC program "inharmonator." This example is very similar to ECMC PVC example "inharm1." Like "inharm1," it mixes, in succession, 4 source soundfiles, which were created by ECMC example script files chordmapper3-1, chordmapper3-2, chordmapper3-3 and chordmapper3-4. In chordmapper3-1, which created the first note, source soundfile /sflib/string/vln.g3 is resynthesized with no alterations, to provide a reference for the following 3 examples. Not much of interest here, except by way of comparison. The resulting tone is practically identical to that produced by ECMC PVC example "inharm1-2." In chordmapper3-2, the second tone, only harmonic one (the fundamental) is altered. This harmonic is shifted down a major seventh in frequency and its amplitude is boosted by 12 dB. All other harmonics are attenuated by 9 dB. Compare with ECMC example "inharm2-3." In example "chordmapper3-3" the frequencies of partials 1 through 5 are raised by increasing amounts (partial 1 is raised a minor ninth, partial2 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. Compare with example "inharm1-3" -- there is almost no difference. In the final tone, created by example file "chordmapper3-4," the frequencies of odd numbered harmonics 1, 3, 5, 7, 9 and 11 are altered by ratios alternating between a major second lower and a major second higher than the original frequencies, while the even numbered harmonics, and those above harmonic 11, are unaltered. In contrast to the earlier three tones, this examples differs audibly from its twin, "inharm1-4," since there is no parameter in "chordmapper" that corresponds to the INHARMONATOR_fundamental_frequency parameter in inharmonator. For details on how each of the four tones within "chordmapper3" was realized see ECMC PVC example file "chordmapper3-1" through "chordmapper3-4."
chordmapper3-1.html

ECMC PVC example file chordmapper3-1
# ECMC PVC example >> chordmapper3-1 << # This example, very similar to ECMC PVC example "inharmon1-1", # is a reference example -- a straight resynthesis of /sflib/string/vln.g3 # The 12 values entered into the chordmap file, all defaults except for the # input pitch, recreate all of the harmonics of the original tone at their # original time varying frequencies and amplitudes # echo \ # 7.07 1 1 0 1 -0 \ # 1. 0 0 0 0 0 \ # > $SFDIR/chordmapfile #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******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=chordmapper3-1 # output soundfile outputformat=AIFF # for Linux only : specify AIFF or WAVE output format # ********************* # ##### Cmusic function file generator tempates ##### # No cmusic function generator files are created in this example #...................................................... output_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1024, sometimes 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_expansion_contraction_factor=.5 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=0 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=0 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.07 1 1 0 1 -0 \ 1. 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile


chordmapper3-2.html

ECMC PVC example file chordmapper3-2
# ECMC PVC example >> chordmapper3-2 << # This example, very similar to ECMC PVC example "inharmonator1-2", # detunes the fundamental of a violin tone but leaves all other harmonics # in tact. # The pitch shift data format is changed from 0 to 3, so that # pitch shifts are expressed in octave pitch class notation: # SHIFT_DATA_FORMAT=3 # 3 = map to octave.pitchclass #The chordmapfile creates two simultaneous output "notes", # one for the fundamental, which is transposed down a major seventh and boosted # by 12 dB,, and another for all of the other harmonics, which are unchanged, # but reduced in amplitude by 9 dB # echo \ # 7.07 1 6.08 1 1 12 \ # 1. 0 0 0 0 0 \ # 7.07 2 7.07 0 1 -9 \ # 1. 0 0 0 0 0 \ # > $SFDIR/chordmapfile # The first two lines above # 7.07 1 6.08 1 1 12 \ # 1. 0 0 0 0 0 \ # create the transposed fundamental. Note the pitch transposition from 7.07 (g3) # to 6.08 (for the fundemtal). The 2nd argument (1) specifies that this tone # begins with the fundamental and the 4th argument (1) specifies that only # 1 partial (the fundamental) is included in this "tone." The 6th argument (12) # specifies a 12 dB gain for this partial. # The third and fourth lines # 7.07 2 7.07 0 1 -9 \ # 1. 0 0 0 0 0 \ # create the rest of the partials, untransposed (the 1st and 3rd arguments, # input and output pitch, both are set to 7.07, or g3). The 2nd argument (2) # specifies that this tone begins at partial 2, rather than the fundamental, # and the 4th argument (0) specifies that all harmonics from 2 upwards # be resynthesized. The -9 sixth argument specifies a 9 dB amplitude reduction # for all of these harmonics. # The duration of the original violin tone is reduced by 50 % # time_expansion_contraction_factor=.5 #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******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=chordmapper3-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_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1024, sometimes 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_expansion_contraction_factor=.5 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=0 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=0 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.07 1 6.08 1 1 12 \ 1. 0 0 0 0 0 \ 7.07 2 7.07 0 1 -9 \ 1. 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile


chordmapper3-3.html

ECMC PVC example file chordmapper3-3
# ECMC PVC example >> chordmapper3-3 << # This example is very similar to ECMC PVC example "inharmonator1-3", # illustrating again that many sound transformations possible with # inharmonator also can be achieved with chordmapper. # In this example, as in "inharmonator1-3", the first five partials of a # violin tone are detuned by progressively greater amounts, which harmonics 6 # and up are resynthesized at their original pitch, detuning the violin tone. # Each of the 1st 5 lines after the 'echo"statement contains all 12 arguments # required to resynthesize a single partial frequency, while the final line # creates all of the higher harmonics, beginning with harmonic 6: # echo \ # 7.07 1 2.059 1 1 2 1 0 0 0 0 0 \ # 7.07 2 2.122 1 1 2 1 0 0 0 0 0 \ # 7.07 3 2.189 1 1 2 1 0 0 0 0 0 \ # 7.07 4 2.260 1 1 2 1 0 0 0 0 0 \ # 7.07 5 2.334 1 1 2 1 0 0 0 0 0 \ # 7.07 6 1.0 0 1 -4 1 0 0 0 0 0 \ # > $SFDIR/chordmapfile # The first 5 lines after the "echo"statement each create a sinusoid. The fundmental # is resynthesized at 2.059 times its original frequency (an minor ninth up), the # 2nd harmonic is shifted up a majjor ninth (2.122), the third harmonic is transposed # up a minor tenth (2.189), the 4th harmonic is shifted up a major tenth (2.26) # and the 5th harmonic is shifted up a major tenth (2.334). All of these 5 partials # are given a 2 dB boost, while the other, non-transposed partials are cut by 4 dB. # TO avoid cliping we cut the master gain for ALL of these partials by 4 dB: # MASTER_gain_in_decibels=-4 # in dB, int, float or FUNC #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******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=chordmapper3-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_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1024, sometimes 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_expansion_contraction_factor=.5 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-4 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=-0 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=1 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=0 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.07 1 2.059 1 1 2 1 0 0 0 0 0 \ 7.07 2 2.122 1 1 2 1 0 0 0 0 0 \ 7.07 3 2.189 1 1 2 1 0 0 0 0 0 \ 7.07 4 2.260 1 1 2 1 0 0 0 0 0 \ 7.07 5 2.334 1 1 2 1 0 0 0 0 0 \ 7.07 6 1.0 0 1 -4 1 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile


chordmapper3-4.html

ECMC PVC example file chordmapper3-4
# ECMC PVC example >> chordmapper3-4 << # This example is very similar to ECMC PVC example "inharmonator1-4" # The frequencies of odd numbered harmonics 1,3,5,7,9 and 11 are # altered by ratios alternating between .89 (a major 2nd down) and # 1.12 (a major second up). Even numbered harmonics, and harmonics above # the 11th harmonic, are not transposed: # echo \ # 7.07 1 .89 1 1 0 1 0 0 0 0 0 \ # 7.07 3 1.12 1 1 0 1 0 0 0 0 0 \ # 7.07 5 .89 1 1 0 1 0 0 0 0 0 \ # 7.07 7 1.12 1 1 0 1 0 0 0 0 0 \ # 7.07 9 .89 1 1 0 1 0 0 0 0 0 \ # 7.07 11 1.12 1 1 0 1 0 0 0 0 0 \ # 7.07 2 1 1 1 0 1 0 0 0 0 0 \ # 7.07 4 1 1 1 0 1 0 0 0 0 0 \ # 7.07 6 1 1 1 0 1 0 0 0 0 0 \ # 7.07 8 1 1 1 0 1 0 0 0 0 0 \ # 7.07 10 1 1 1 0 1 0 0 0 0 0 \ # 7.07 11 1 0 1 0 1 0 0 0 0 0 \ # > $SFDIR/chordmapfile # All frequencies also are transposed uup an octave: # TARGETS_partial_tuning_control=2 #****************************************************** #************** CHORDMAPPER *************************** #****************************************************** # ******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=chordmapper3-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_data_format=1 # 0= Same as input file, 1 = integers 2 = rescaled floats #******** BEGIN/END TIMES ***************************** # beginning and end times within input soundfile for analysis/resynthesis begintime=0 # time in input soundfile to begin analysis/resynthesis endtime=0 # (-1 or 0 end time defaults to end of file) #====================================================== #*** ANALYSIS PARAMETERS ****************************** FFT_length=1024 # usually 1024, sometimes 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_expansion_contraction_factor=.5 # OUTPUT CHANNEL(S) ....................... output_channel=0 # channels are numbered from 1 to the maximum; 0 = all channels #.............OSCIL THRESHOLD ........................ oscillator_resynthesis_threshold_in_dB=-80 #( Usually -60 to -80 unless dropouts become audible. ) #****************** MODIFICATIONS ********************* #.................. DECIBELS .......................... MASTER_gain_in_decibels=-8 # 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 #====================================================== #**************** TARGETS ***************************** #====================================================== #.................. DECIBELS .......................... TARGETS_gain_in_dB=6 # int, float or FUNC #.................. PITCH ............................. TARGETS_frequency_shift=0 # int, float or FUNC TARGETS_pitch_transposition_in_semitones=0 # int, float or FUNC #............ SPECTRUM WARPSHAPE ...................... spectrum_warpshape_index=0 # int, float or FUNC #............ AMPLITUDE RESPONSE ...................... attack_time_in_seconds=0 # int, float or FUNC release_time_in_seconds=0 # int, float or FUNC #====================================================== #***** LOW/HIGH SHELF EQ (TARGETS ONLY) *************** LOW_SHELF_EQ_gain_in_decibels=-0 LOW_SHELF_EQ_frequency=100 HIGH_SHELF_EQ_gain_in_decibels=0 HIGH_SHELF_EQ_frequency=1000 #====================================================== #...MASTER INTERPOLATION CONTROLS ...................... # (Using (0-1) control functions, these 3 variables provide # master controls for time varying manipulation of the amp, # freq and null phase values of a tone. With the respective P-field # of a tone set to 1 (on), the controls interpolate # between the source value and target setting. For example, a # function moving between 0 and 1 would cause the frequency to # shift from the orginal source value to the tone's target # setting. Setting the P-field to .5 would start the shift halfway # between source and target values. Negative # produce the same as positive values except that they # invert the control value in its 0-1 range before using it. #.....AMPLITUDE: TARGETS_amp_interpolation_control__0_to_1=1 #....FREQUENCY: TARGETS_freq_interpolation_control__0_to_1=1 #....NULL PHASE: TARGETS_nullphase_interpolation_control__0_to_1=1 #====================================================== #........Two more TUNING conrtols: ........................ # Most of you will never use these variables (A.S.) # There are two tuning control values; the first for the tone # and the second global value that sets the tuning base for # all tones. The partial_tuning_control determines the current tuning # of the tone by mapping its 0-1 value or function into the difference # between the base and tone tuning settings. For example, # a function progressing from 0 to 1, placed in the tuning control # parameter would case the tuning to move from the base value to the # target tuning. TARGETS_partial_tuning_control=2 # (0-1 control value) TARGETS_partial_tuning_base_value=0 # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning deviation amplified, # > 1 = inverse amplified source tuning deviation #====================================================== TARGETS_shift_file=$SFDIR/chordmapfile #..............SOURCE POINT FORMAT .................... SOURCE_POINT_DATA_FORMAT=1 # 0 = pitch specified in frequency used in chordmapfile # 1 = pitch specified in octave.pitchclass used in chordmapfile #.............. SHIFT POINT FORMAT .................... SHIFT_DATA_FORMAT=0 # 0 = frequency multiplier # 1 = partial shift adder # 2 = map to frequency ) 3 = map to octave.pitchclass # (A.S. : I don't know what this parameter does) #====================================================== #***** DATA SET for CHORDMAPPER "TONES" ********** # Create 12 values in the data file for each output tone. # Line 1 below # 1) source freq. or oct.pch (depending on SOURCE_DATA_FORMAT above) # 2) lowest partial number : 1 or higher # 3) output freq. or oct.pch (depending on SOURCE_DATA_FORMAT above # 4) number of partials above lowest (0 = all below Nyquist) # (5) partial bandwidth as proportion of fundamental frequency # higher values = brighter timbres # (6) gain or attenuation in dB # Line 2 below : these parameters used less frequently # (7) partial spacing as proportion of fundamental,negative = rejectmode # (8) decibel rolloff per octave beginning with lowest partial. # Postive rolloff produces gain.rejectmode measure begins from fundamental # (9) Amplitude interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (10) Frequency interpolation switch/degree. # 0 = off, 1 = on, -1 = inverse on, .5 = half on # (11) Tuning factor # 0 = original source tuning, 1 = tuned to target partial # < 0 = source tuning-deviation amplified, # > 1 = inverse of amplified source-tuning-deviation # (12) Null phase factor, 0 = off, 1 = null phase, # .5 = halfway to null phase #====================================================== # Create CHORDMAPPER FUNCTION HERE: echo \ 7.07 1 .89 1 1 0 1 0 0 0 0 0 \ 7.07 3 1.12 1 1 0 1 0 0 0 0 0 \ 7.07 5 .89 1 1 0 1 0 0 0 0 0 \ 7.07 7 1.12 1 1 0 1 0 0 0 0 0 \ 7.07 9 .89 1 1 0 1 0 0 0 0 0 \ 7.07 11 1.12 1 1 0 1 0 0 0 0 0 \ 7.07 2 1 1 1 0 1 0 0 0 0 0 \ 7.07 4 1 1 1 0 1 0 0 0 0 0 \ 7.07 6 1 1 1 0 1 0 0 0 0 0 \ 7.07 8 1 1 1 0 1 0 0 0 0 0 \ 7.07 10 1 1 1 0 1 0 0 0 0 0 \ 7.07 11 1 0 1 0 1 0 0 0 0 0 \ > $SFDIR/chordmapfile #***************************************************** # An * (asterisk) at the beginning of a data set will comment it out. # Do not include any blank lines, # or other characters in this function # definition. Be very careful - -chordmapper is VERY picky #........... 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/chordmapfile