ATSaddnz
Prev | Orchestra Opcodes and Operators | Next

## ATSaddnz

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

## Description

ATSaddnz reads from an ATS analysis file and uses the data to perform additive synthesis using a modified randi function.

## Syntax

    ar ATSaddnz ktimepnt, iatsfile, ibands[, ibandoffset, ibandincr]

## Initialization

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

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

ibandoffset (optional) – is the first noise band used (defaults to 0).

ibandincr (optional) – sets an increment by which these synthesis opcodes counts up from ibandoffset 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 ATSaddnz exactly the same as for pvoc and ATSadd.

ATSaddnz and ATSadd are based on pvadd by Richard Karpen and use files created by Juan Pampin's ATS (Analysis - Transformation - Synthesis).

ATSaddnz also reads from an ATS file but it resynthesizes the noise from noise energy data contained in the ATS file. It uses a modified randi function to create band limited noise and modulates that with a cosine wave, to synthesize a user specified selection of frequency bands. Modulating the noise is required to put the band limited noise in the correct place in the frequency spectrum.

## Examples

      ktime line     0, p3, 2.5
      asig  ATSaddnz ktime, "clarinet.ats", 25

In the example above we're synthesizing all 25 noise bands from the data contained in the ATS analysis file called "clarinet.ats".

## Examples

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

Example 54. Example of the ATSaddnz opcode.

    <CsoundSynthesizer>
    <CsOptions>
    ; Select audio/midi flags here according to platform
    -odac     ;;;RT audio out
    ;-iadc    ;;;uncomment -iadc for RT audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o ATSaddnzwav -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
    asig	ATSaddnz ktime, "beats.ats", 1, 24
    	outs	asig*10, asig*10	;amplify
    endin

    </CsInstruments>
    <CsScore>

    i 1 0 2
    e

    </CsScore>
    </CsoundSynthesizer>

Here we synthesize only the 25th noise band (ibandoffset of 24 and ibands of 1).

## See also

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

## Credits

Author: Alex Norman
Seattle,Washington
2004

Prev | Up | Next
ATSadd | Home | ATSbufread