Additive Synthesis tools in SNDAN
for an. format files:
NB the addsyn programs do not currently resynthesise 'full' format
analysis files reliably.
for .mq format files:
(see also mqtoan, to convert .mq files into .an files)
Several parameters and flags are common to all the addsyn programs:
write floating-point samples. See File
Formats for more infomation on the soundfile formats supported
read parameters interactively. This corresponds to the original
behaviour of the program, in which any numeric parameters (which are not
optional; they are printed in italic in this documentation) not
entered on the command line are requested interactively, as a single group.
They can also be read from a text file using 'redirection' (see Using
the Windows Console). When run in this way the programs print useful
information from the header, which can guide the choice of parameter values.
There are nevertheless advantages to the requirement for a complete
command line. If a parameter is omitted, the program terminates, rather
than present a prompt. This is safer behaviour when the program is run
from a batch file (the program will return an error value that can be tested
by the batch file). If a parameter is incorrect, the program terminates
with an informative message, but as all the parameters were entered into
a running program, the MSDOS command-line history command doskey
cannot be used to recall the full command line, so that all parameters
have to be re-entered. The non-interactive mode is therfore quicker to
use; if an error is made the full command line can be retrieved using doskey,
and a correction quickly made.
(See Using the Windows Console
for information on doskey).
perform byte-swapping for .fp and .sh formats.
the input analysis file, in the appropriate format
the output soundfile, in one of the supported formats
sample rate for the outfile (Hz).
As the data in the analysis file is in principle independent of sample
rate, you are free to resynthsize using any sample rate. If the chosen
rate is lower than that of the original source, the number of harmonics
retained will be reduced to avoid aliasing.
the fundamental frequency for the outfile (Hz).
For an exact reproduction of the source, use the 'Analysis Frequency'
given in the analysis file header (run the program interactively to see
this, or use showhdr).
By using a lower or higher value, the sound is pitch-shifted down or
up. To shift an exact musical interval, some simple arithmetic is needed
to find the required frequency. See Pitch
Table for a list of frequency ratios for common musical intervals.
the number of harmonics to retain in the synthesis.
The number of harmonics available is shown in the analysis file header.
You can use a lower number to eliminate higher partials, thus performing
simple low-pass filtering (remembering that the partials can rise in pitch
- this behaviour is not affected by the nhar
setting). Also, where the number of source harmoncis is high (low Analysis
Frequency), using a lower value for nhar
will spped up processing. Use a low value to confirm the general quality
of the analysis, or to check the effect of other parameters. Then
use more, or all, harmonics for a final definitive synthesis.
Amplitude scale factor for the outfile (multiplier).
Any amplitude transformations applied to the analysis file can be adjusted
here either to reduce level (to avoid numeric overflow), or of course to
increase itl if necessary. The at
command in monan can be used to find
out, for example, if the level will be too high (for a 16bit soundfile
it must be less than 96dB). A scale factor of 2 increases amplitude by
6dB, and the reciprocal factor of 0.5 (i.e. 1/2) reduces level by the same
amount. It is generally good practice to leave a small amount of amplitude
headroom - peak level should therefore be not above 93dB (i.e. -3dB
below peak in studio terms).
set the duration for the outfile (seconds). See the description
of each program for particular restrictions and refinements.
Additive synthesis with time-stretching, pitch shifting and amplitude
rescaling. Note that time compression (reducing the duration)
is not supported (see addsyn3). Thus the value for dur must be less
than that of the analysis file.
addsyn1 [-x] [-f]
(Refer to Common parameters for descriptions
of all parameters.)
Time-compressed additive synthesis using interpolation, with
pitch shifting and amplitude scaling.
This is a special variant of addsyn designed specifically for reduction
of duration leaving the attack and decay segments unaffected. Reduction
is performed usign a special interpolation method that preserves transient
addsyn3 [-f] [-i]
ampfac t1 t2 dur
time marking the start of the sustain segment to be compressed (end
of the attack).
time marking the end of the sustain segment to be compressed (start
of the decay). The length of the decay segment is thus defined as t2 to
new (shorter) duration for the whole sound. Must be at least the sum
of the lengths of the attack and decay segments, i.e. at least t1 + (end_of_the_sound
- t2). It must also be less than the current duration of the sound. It
follows that if t1 and t2 are close, there is little scope
Additive synthesis of .mq format ( partial-track) analysis files, with
acceleration/deceleration and amplitude scaling.
This is the only program available in the SNDAN suite for direct
synthesis from .mq format analysis files. It is provided primarily as a
means of checking the quality of the analysis; in most cases you will want
to convert the file into .an format, for use with the addsyn
programs and monan.
Nevertheless, one transformation unique to this program is the ability
to accelerate or decelerate the sound from start to end, in addition
to the ability to apply fixed time-scaling.
mqsyn2 [-f] infile
outfile timefac1 timefac2 [ampfac]
NB: in this program, if sr = 0, the internal default sample rate
of 22050 is used.
time-scale factor to apply at the start of the sound.
time-scale factor to reach by the end of the sound.
Values are multipliers; a value of 1 signifies no time-scaling.
Values above 1 lengthen the sound progrssively (deceleration), values
below 1 shorten the sound (acceleration). Where both values are the same,
the effect will be of a fixed time-scaling.
For example, with timefac1 = 1 and timefac2 = 3, the sound will start
at the original speed, and drop to one third of the original at the end.
Pitch is unaffected. However, the process cannot be relied upon to be clean
in all cases, as new interference patterns not present in the original
may be created, leading to unexpected phasing effects.
[SNDAN Home page]