ATSread
Reads data from an ATS file.
ATSread returns the amplitude (kamp) and frequency (kfreq) information of a user specified partial contained in the ATS analysis file at the time indicated by the time pointer ktimepnt.
Syntax
Initialization
iatsfile – the ATS number (n in ats.n) or the name in quotes of the analysis file made using ATSA.
ipartial – the number of the analysis partial to return the frequency in Hz and amplitude.
Performance
kfreq, kamp - outputs of the ATSread unit. These values represent the frequency and amplitude of a specific partial selected by the user using ipartial. The partials' informations are derived from an ATS analysis. ATSread linearly interpolates the frequency and amplitude between frames in the ATS analysis file at k-rate. The output is dependent on the data in the analysis file and the pointer ktimepnt.
ktimepnt – The time pointer in seconds used to index the ATS file. Used for ATSread exactly the same as for pvoc and ATSadd.
Examples
Here is an example of the ATSread opcode. It uses the file ATSread.csd.
Here we are using ATSread to get the 10th partial's frequency and amplitude data out of the 'beats.ats' ATS analysis file. We are using that data to drive an oscillator, but we could use it for anything else that can take a k-rate input, like the bandwidth and resonance of a filter etc.
Here is a musical example of the ATSread opcode. It uses the file ATSread-musical.csd.
Example 2 of the ATSread opcode. | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
See also
Credits
Author: Alex Norman
Seattle,Washington
2004