smsHarmonicExtract Manual




The program smsHarmonicExtract is a PERL program which can be used to extract individual harmonics from a soundfile using the sms program, and the program soundinfo (to identify the sampling rate) and subtract (to extract single harmonics) programs. The basic usage for the program is:

   smsHarmonicExtract start end input.wav output.wav [parameters]

Here is a description of the arguments:

  1. start : the first harmonic to extract. 1=fundamental.
  2. end : the last harmonic to extract. If only one harmonic needs to be extracted, then duplicate the start-harmonic value.
  3. input.wav : the input soundfile to analyze.
  4. output.wav : the template name for output soundfiles.
  5. parameters : optional anlaysis/synthesis parameters

The output file name is a template for creating the names of files to write the harmonic into. For example, the command:

   smsHarmonicExtract 4 7 input.wav output.wav 
would create 4 files: output-4.wav, output-5.wav, output-6.wav, output-7.wav which would contain the 4th, 5th, 6th and 7th harmonics respectively.

The optional parameters that follow the output template file name are the sms analysis parameters in the form Parameter=Value. For example, the following command will set the LowestPitch and HighestPitch parameters in the sms analysis file:

   smsHarmonicExtract 1 4 in.wav out.wav LowestPitch=350 HighestPitch=400
All extra parameters following the output template filename are for the analysis score-file except for Type and SamplingRate.

There are a few interpreted parameters which are used for convenience in the smsHarmonicExtract program which are converted to analysis parameters:
Pitch The expected pitch in the analysis file. The value can be in Hertz, or it can be a note name, such as c4, C4, cs5, f6, etc. s represents sharps, but no flats are allowed. The Pitch parameter will be converted into the two analysis parameters LowestPitch and HighestPitch according to the error tolerance given by CentError.
CentError The error range above and below the expected pitch in cents. 100 cents equals one half-step.

As an example, here is the way to extract the 4th harmonic from a file where you know that the pitch is C5:

   smsHarmonicExtract 4 4 input.wav output.wav Pitch=c5

If the note contains a wide vibrato, or you are not sure of the exact pitch, you can increase the CentError value. The following example will search for pitches between F4 and G5:

   smsHarmonicExtract 4 4 in.wav out.wav Pitch=c5 CentError=700