ATSsinnoi

ATSsinnoi — uses the data from an ATS analysis file to perform resynthesis.

Description

ATSsinnoi reads data from an ATS data file and uses the information to synthesize sines and noise together.

Syntax

ar ATSsinnoi ktimepnt, ksinlev, knzlev, kfmod, iatsfile, ipartials \
          [, ipartialoffset, ipartialincr]

Initialization

iatsfile – the ATS number (n in ats.n) or the name in quotes of the analysis file made using ATS.

ipartials – number of partials that will be used in the resynthesis (the noise has a maximum of 25 bands)

ipartialoffset (optional) – is the first partial used (defaults to 0).

ipartialincr (optional) – sets an increment by which these synthesis opcodes counts up from ipartialoffset for ibins components in the re-synthesis (defaults to 1).

Performance

ktimepnt – The time pointer in seconds used to index the ATS file. Used for ATSsinnoi exactly the same as for pvoc.

ksinlev - controls the level of the sines in the ATSsinnoi ugen. A value of 1 gives full volume sinewaves.

knzlev - controls the level of the noise components in the ATSsinnoi ugen. A value of 1 gives full volume noise.

kfmod – an input for performing pitch transposition or frequency modulation on all of the synthesized partials, if no fm or pitch change is desired then use a 1 for this value.

ATSsinnoi reads data from an ATS data file and uses the information to synthesize sines and noise together. The noise energy for each band is distributed equally among each partial that falls in that band. Each partial is then synthesized, along with that partial's noise component. Each noise component is then modulated by the corresponding partial to be put in the correct place in the frequency spectrum. The level of the noise and the partials are individually controllable. See the ATS webpage for more info about the sinnoi synthesis. An ATS analysis differs from a pvanal in that ATS tracks the partials and computes the noise energy of the sound being analyzed. For more info about ATS analysis read Juan Pampin's description on the the ATS web-page.

Examples

  ktime   line       0, p3, 2.5
  asig    ATSsinnoi  ktime, 1, 1, 1, "beats.ats", 42

Here we synthesize both the noise and the sinewaves (all 42 partials) contained in "beats.ats" together. The relative volumes of the noise and the partials are unaltered (each set to 1).

Here is another example of the ATSsinnoi opcode. It uses the file ATSsinnoi.csd.

Example 67. Example of the ATSsinnoi opcode.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac     ;;;RT audio out
;-iadc    ;;;uncomment -iadc if RT audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o ATSsinnoi.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1	; "beats.ats" is created by atsa

ktime	line	0,  p3, 2
knzfade	expon	0.001, p3, 2
aout	ATSsinnoi 	ktime, 1, knzfade, 1, "beats.ats", 150
	outs	aout*2, aout*2		;amplify some more
endin

</CsInstruments>
<CsScore>

i 1 0 2 
e

</CsScore>
</CsoundSynthesizer>

This example here is like the other example except that we use an envelope to control knzlev (the noise level). The result of this will be the "beats.wav" sound that has its noise component fade in over the duration of the note.

See also

ATSread, ATSreadnz, ATSinfo, ATSbufread, ATScross, ATSinterpread, ATSpartialtap, ATSadd, ATSaddnz

Credits

Author: Alex Norman
Seattle,Washington
2004