├── README.md
├── ats-pd
├── cl.ats
├── crt.ats
├── help-atsreadhelp.pd
├── README
└── help-atsread.pd
├── ats
├── doc
│ ├── analysis.jpg
│ ├── list-view.jpg
│ ├── settings.jpg
│ ├── smart_sel.jpg
│ ├── edit-linear.jpg
│ ├── edit-spline.jpg
│ ├── header-view.jpg
│ ├── main-screen.jpg
│ ├── main-screen-res.jpg
│ ├── synthesis-main.jpg
│ ├── synthesis-time.jpg
│ ├── main-screen-selection.jpg
│ ├── main-screen-selection-zoom.jpg
│ └── main-screen-selection-discont.jpg
├── reconf
├── TODO
├── src
│ ├── atsh
│ │ ├── help.c
│ │ ├── atsh-mask.c
│ │ ├── mask.c
│ │ ├── about.c
│ │ ├── my_curve.h
│ │ ├── popup.c
│ │ ├── progress.c
│ │ ├── header.c
│ │ ├── ats-header.c
│ │ ├── atsh-undo.c
│ │ ├── undo.c
│ │ ├── help.h
│ │ ├── get_sparams.c
│ │ ├── sel.c
│ │ └── atsh-sel.c
│ ├── atsa
│ │ ├── atsa.c
│ │ ├── save-load-sound.c
│ │ ├── critical-bands.c
│ │ ├── peak-detection.c
│ │ ├── atsa-nogui.c
│ │ ├── other-utils.c
│ │ ├── peak-tracking.c
│ │ ├── residual.c
│ │ └── residual-analysis.c
│ └── sndlib
│ │ ├── README
│ │ ├── sndlib-config.in
│ │ ├── makefile.in
│ │ ├── config.h.in
│ │ ├── install-sh
│ │ └── sndlib-strings.h
├── Makefile.am
├── README
├── configure.ac
├── mkinstalldirs
├── config.h.in
├── compile
└── install-sh
├── icmc-paper
├── ATS_final.pdf
├── ATS_User_Interfaces_final.pdf
└── chicago.sty
└── ats-csound
├── README.txt
├── docs
├── atsinfo.html
├── atsread.html
├── atssynth.html
└── atsbuffuncs.html
└── ugnorman.h
/README.md:
--------------------------------------------------------------------------------
1 | This project has moved to https://gitlab.com/dxarts/projects/ats
2 |
--------------------------------------------------------------------------------
/ats-pd/cl.ats:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats-pd/cl.ats
--------------------------------------------------------------------------------
/ats-pd/crt.ats:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats-pd/crt.ats
--------------------------------------------------------------------------------
/ats/doc/analysis.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/analysis.jpg
--------------------------------------------------------------------------------
/ats/doc/list-view.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/list-view.jpg
--------------------------------------------------------------------------------
/ats/doc/settings.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/settings.jpg
--------------------------------------------------------------------------------
/ats/doc/smart_sel.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/smart_sel.jpg
--------------------------------------------------------------------------------
/ats/doc/edit-linear.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/edit-linear.jpg
--------------------------------------------------------------------------------
/ats/doc/edit-spline.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/edit-spline.jpg
--------------------------------------------------------------------------------
/ats/doc/header-view.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/header-view.jpg
--------------------------------------------------------------------------------
/ats/doc/main-screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/main-screen.jpg
--------------------------------------------------------------------------------
/icmc-paper/ATS_final.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/icmc-paper/ATS_final.pdf
--------------------------------------------------------------------------------
/ats/doc/main-screen-res.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/main-screen-res.jpg
--------------------------------------------------------------------------------
/ats/doc/synthesis-main.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/synthesis-main.jpg
--------------------------------------------------------------------------------
/ats/doc/synthesis-time.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/synthesis-time.jpg
--------------------------------------------------------------------------------
/ats/doc/main-screen-selection.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/main-screen-selection.jpg
--------------------------------------------------------------------------------
/ats/doc/main-screen-selection-zoom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/main-screen-selection-zoom.jpg
--------------------------------------------------------------------------------
/ats/doc/main-screen-selection-discont.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/ats/doc/main-screen-selection-discont.jpg
--------------------------------------------------------------------------------
/icmc-paper/ATS_User_Interfaces_final.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamezilla/ats/HEAD/icmc-paper/ATS_User_Interfaces_final.pdf
--------------------------------------------------------------------------------
/ats/reconf:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo removing junk...
3 | rm -f aclocal.m4 config.cache config.h configure *.in config.status Makefile
4 | rm -rf autom4te.cache/
5 | echo running aclocal...
6 | aclocal
7 | echo running autoconf...
8 | autoconf
9 | echo running autoheader...
10 | autoheader
11 | echo running automake...
12 | automake --foreign -a
13 |
--------------------------------------------------------------------------------
/ats-pd/help-atsreadhelp.pd:
--------------------------------------------------------------------------------
1 | #N canvas 603 133 514 568 10;
2 | #X obj 40 100 osc~;
3 | #X obj 58 132 *~;
4 | #X obj 102 33 packel \$1;
5 | #X obj 7 31 packel \$1;
6 | #X obj 59 156 throw~ \$2-atsaudio;
7 | #X obj 102 11 r \$2-atsamp;
8 | #X obj 7 9 r \$2-atsfreq;
9 | #X obj 101 107 lop~ 10;
10 | #X connect 0 0 1 0;
11 | #X connect 1 0 4 0;
12 | #X connect 2 0 7 0;
13 | #X connect 3 0 0 0;
14 | #X connect 5 0 2 0;
15 | #X connect 6 0 3 0;
16 | #X connect 7 0 1 1;
17 |
--------------------------------------------------------------------------------
/ats/TODO:
--------------------------------------------------------------------------------
1 |
2 | Synthesis:
3 |
4 | 1-Add DC Blocker to the residual
5 | 2-Substractive Synthesis
6 | 3-Rethink Time envelope (possibly have a time transformation function)
7 | 4-Amplitude of residual bands with curves. (we will do it "on the fly" in the Synthesis, can't do it now because I do no have sound output to test the results)
8 |
9 |
10 | Editing:
11 |
12 | 2-Track deleting
13 | 3-Region deleting
14 | 4-Add dismiss button to list view.
15 | 5-SMR/Amplitude display.
16 | 6-Smart selection using frequency with harmonic factor and SMR threshold.
17 |
18 | Analysis: make info printed to stdout into a form with progress bar
19 |
20 | - label the zoom bars and contrast bar or separate the two zoom bars out of the contrast one. Take out the number on the latter.
21 |
22 |
23 | View menu
24 | Replace Sinusoidal and Noise by a call to a Configuration View Window
25 |
26 | - add Help/Documentation menu item that launches the html documentation
27 |
28 |
29 |
30 | all menus: rethink keyboard commands. several commands do not need a keyboard shortcut, and others need a better letter.
31 |
32 |
--------------------------------------------------------------------------------
/ats/src/atsh/help.c:
--------------------------------------------------------------------------------
1 | /*
2 | HELP.C
3 | Oscar Pablo Di Liscia / Juan Pampin
4 | */
5 | #include "atsh.h"
6 | #include "help.h"
7 |
8 | void help(void)
9 | {
10 | GtkWidget *label, *window, *scrolled_window;
11 |
12 | window = gtk_window_new(GTK_WINDOW_DIALOG);
13 | // set_window_icon(window);
14 | gtk_window_set_title(GTK_WINDOW(window), "Help for ATSH");
15 | gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
16 | gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
17 |
18 | scrolled_window = gtk_scrolled_window_new (NULL, NULL);
19 | gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
20 | gtk_widget_set_usize(GTK_WIDGET(scrolled_window), 500, 500);
21 | gtk_container_add(GTK_CONTAINER(window), scrolled_window);
22 |
23 | label = gtk_label_new(HELP_STR);
24 | gtk_widget_set_usize(GTK_WIDGET(label), 450, 1500);
25 | gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_LEFT);
26 | gtk_label_set_line_wrap (GTK_LABEL(label), TRUE);
27 | gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), label);
28 |
29 | gtk_widget_show_all (window);
30 | }
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/ats/src/atsa/atsa.c:
--------------------------------------------------------------------------------
1 | /* atsa.c
2 | * atsa: ATS analysis implementation
3 | * Oscar Pablo Di Liscia / Pete Moss / Juan Pampin
4 | */
5 |
6 | #include "atsa.h"
7 |
8 | /* main_anal
9 | * =========
10 | * main analysis function
11 | * soundfile: path to input file
12 | * out_file: path to output ats file
13 | * anargs: pointer to analysis parameters
14 | * returns error status
15 | */
16 | int main_anal(char *soundfile, char *ats_outfile, ANARGS *anargs, char *resfile)
17 | {
18 | /* create pointers and structures */
19 | ATS_SOUND *sound = NULL;
20 | FILE *outfile;
21 | /* open output file */
22 | outfile = fopen(ats_outfile, "wb");
23 | if (outfile == NULL) {
24 | printf("\n Could not open %s for writing, bye...\n\n", ats_outfile);
25 | return(-1);
26 | }
27 | /* call tracker */
28 | sound = tracker(anargs, soundfile, resfile);
29 | /* save sound */
30 | if(sound != NULL) {
31 | fprintf(stderr,"saving ATS data...");
32 | ats_save(sound, outfile, anargs->SMR_thres, anargs->type);
33 | fprintf(stderr, "done!\n");
34 | }
35 | else{
36 | /* file I/O error */
37 | return(-2);
38 | }
39 | /* close output file */
40 | fclose(outfile);
41 | /* free ATS_SOUND memory */
42 | free_sound(sound);
43 | return(0);
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/ats/src/sndlib/README:
--------------------------------------------------------------------------------
1 | This directory contains a version of sndlib customized to work with atsa.
2 | The text below comes form the COPYING file distributed with sndlib at:
3 |
4 | http://www-ccrma.satnford.edu/software/snd/sndlib/
5 |
6 | sndlib is a library written by Bill Schottstaedt (bil@ccrma.stanford.edu).
7 | Except where otherwise noted, it is Copyright 1996-2003 The Board of Trustees
8 | of Stanford University.
9 |
10 | The authors hereby grant permission to use, copy, modify, distribute,
11 | and license this software and its documentation for any purpose. No
12 | written agreement, license, or royalty fee is required. Modifications
13 | to this software may be copyrighted by their authors and need not
14 | follow the licensing terms described here.
15 |
16 | IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | POSSIBILITY OF SUCH DAMAGE.
21 |
22 | THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | MODIFICATIONS.
28 |
--------------------------------------------------------------------------------
/ats/src/sndlib/sndlib-config.in:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # borrowed from gsl-config.in
4 |
5 | prefix=@prefix@
6 | exec_prefix=@exec_prefix@
7 | includedir=@includedir@
8 |
9 | usage()
10 | {
11 | cat < atsinfo reads data out of the header of an ATS file.
16 | iatsfile – the ATS number (n in ats.n) or the name in quotes of the analysis file made using ATS. ilocation – indicates which location in the header file to return. The data in the header
20 | gives information about the data contained in the rest of the ATS file. The possible values for ilocation are given in the following list:
21 |
9 |
10 | atsinfo
11 |
12 | idata atsinfo iatsfile, ilocation
13 |
14 | Description
15 | Initialization
18 |
22 |
23 |
33 |
Macros can really improve the legibility of your csound code, I've provided my Macro Definitions below:
37 |
38 |
39 | #define ATS_SAMP_RATE #0# 40 | #define ATS_FRAME_SZ #1# 41 | #define ATS_WIN_SZ #2# 42 | #define ATS_N_PARTIALS #3# 43 | #define ATS_N_FRAMES #4# 44 | #define ATS_AMP_MAX #5# 45 | #define ATS_FREQ_MAX #6# 46 | #define ATS_DUR #7# 47 | #define ATS_TYPE #8#48 | 49 |
atsinfo can be useful for writing generic instruments that will work with many ATS files, even if they have different lengths and different numbers of partials etc. Example 2 is a simple application of this. 50 |
51 |imax_freq atsinfo "cl.ats", $ATS_FREQ_MAX54 |
In the example above we get the maximum frequency value from the ATS file "cl.ats" and store it in imax_freq. We use at Csound Macro (defined above) $ATS_FREQ_MAX, which is equivalent to the number 6
55 | 2. 56 |57 | i_npartials atsinfo p4, $ATS_N_PARTIALS 58 | i_dur atsinfo p4, $ATS_DUR 59 | ktimepnt line 0, p3, i_dur 60 | aout atsadd ktimepnt, 1, p4, 1, i_npartials61 |
In the example above we use atsinfo to retrieve the duration and number of partials in the ATS file indicated by p4. With this info we synthesize the partials using atsadd. Since the duration and number of partials are not "hard-coded" we can use this code with any ats file.
62 | 63 |Alex Norman
65 |
Seattle, Washington
66 |
2004
67 |
14 | kfreq, kamp atsread ktimepnt, ifile, ipartial 15 | 16 | kenergy atsreadnz ktimepnt, ifile, iband 17 |18 |
atsread and atsreadnz read data from an ATS file. atsread returns the amplitude (kamp) and frequency (kfreq) 22 | information of a user specified partial contained in the ATS 23 | analysis file at the time indicated by the time pointer ktimepnt. atsreadnz returns the energy (kenergy) of a user specified noise band (1-25 bands) at the time indicated by the time 24 | pointer ktimepnt. 25 |
26 | 27 |ifile – the ATS number (n in ats.n) or the name in quotes of the analysis file made using ATS.
29 |ipartial / iband – the number of the analysis partial to return the frequency in Hz and amplitude (in the case of atsread) 30 | or the number of the noise band to return the energy data (in the case of atsreadnz). 31 |
32 | 33 |kfreq, kamp – outputs of the atsread unit. These values represent the frequency and amplitude of a specific partial 36 | selected by the user using ipartial. The partials' informations are derived from an ATS analysis. atsread linearly interpolates the 37 | frequency and amplitude between frames in the ATS analysis file; this happens at the k-rate. The output is dependent on the data in the analysis file and the ktimepnt. 38 |
39 |kenergy – output of the atsreadnz unit. At the k-rate the linearly interpolated energy of the noise band indicated in iband is 40 | output. The output is dependent on the data in the analysis file and the ktimepnt. 41 | 42 |
43 |ktimepnt – used for atsread and atsreadnz exactly the same as for pvoc and atsadd. 44 |
45 | 46 | 47 |ktime line 0, p3, 2.5 50 | kfreq, kamp atsread ktime, "clarinet.ats", 2 51 | aout oscili 1000000 * kamp, kfreq, 152 |
Here we're using atsread to get the 2nd partial's frequency and amplitude data out of the clarinet.ats ATS analysis file. 53 | We're 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. 54 |
55 | 56 | 2. 57 |ktime line 2.5, p3, 0 58 | kenergy atsreadnz ktime, "clarinet.ats", 5 59 |60 |
Here we are extracting the noise energy from band 5 in the clarinet.ats ATS analysis file. We're actually reading backwards from 2.5 seconds to the beginning of the analysis file. We could use this to synthesize noise like this:
61 | 62 |anoise randi sqrt(kenergy), 55 63 | aout oscili 4000000000000000000000000, 455, 2 64 | aout = aout * anoise65 |
Function table 2 used in the oscillator is a cosine, which is needed to shift the band limited noise into the correct place in the frequency spectrum. The randi function 66 | creates a band of noise centered about 0 Hz that has a bandwidth of about 110 Hz; multiplying it by a cosine will shift it to be centered at 455 Hz, which is the center frequency of the 5th critical noise band. 67 | This is only an example, for synthesizing the noise you'd be better off just using atsaddnz unless you want to use your own noise synthesis algorithm. 68 | Maybe you could use the noise energy for something else like applying a small amount of jitter to specific partials or for controlling something totally unrelated 69 | to the source sound? 70 |
71 | 72 |Alex Norman (edited from Richard Karpen's pvread documentation)
74 | Seattle, Wash
75 | 2003
76 |
ar atsadd ktimepnt, kfmod, iatsfile, ifn, ipartials[, ipartialoffset, ipartialincr, igatefn]14 |
ar atsaddnz ktimepnt, iatsfile, ifn, ibands[, ibandoffset, ibandincr]15 |
ar atssinnoi ktimepnt, ksinlev, knzlev, kfmod, iatsfile, ipartials[, ipartialoffset, ipartialincr]16 | 17 |
atsadd and atsaddnz are based on pvadd by 20 | Richard Karpen and use files created by Juan Pampin's ATS (Analysis - 22 | Transformation - Synthesis). atssinnoi is based on ATS's 23 | sinnoi synth. atsadd reads from an ATS 25 | analysis file and uses the data to perform additive synthesis using an internal 26 | array of interpolating oscillators. The user supplies the wave table (usually 27 | one period of a sine wave), and can choose which analysis partials will be used 28 | in the re-synthesis. atsaddnz also reads from an ATS 30 | file but it resynthesizes the noise from noise energy data contained in the ATS 31 | file. It uses a modified randi function to create band limited noise and 32 | modulates that with a user supplied wave table (one period of a cosine wave), 33 | to synthesize a user specified selection of frequency bands. Modulating the 34 | noise is required to put the band limited noise in the correct place in the 35 | frequency spectrum. atssinnoi reads data from an ATS data 36 | file and uses the information to synthesize sines and noise together. The 37 | noise energy for each band is distributed equally among each partial that falls 38 | in that band. Each partial is then synthesized, along with that partial's 39 | noise component. Each noise component is then modulated by the corresponding 40 | partial to be put in the correct place in the frequency spectrum. The level of 41 | the noise and the partials are individually controllable. See the ATS webpage for more 43 | info about the sinnoi synthesis. An ATS 45 | analysis differs from a pvanal in that ATS tracks the partials and computes the 46 | noise energy of the sound being analyzed. For more info about ATS analysis 47 | read Juan Pampin's description on the the ATS 49 | web-page.
50 | 51 |ktimepnt – a time pointer for reading through the ats 54 | file
55 | 56 |kfmod – an input for performing pitch transposition or 57 | frequency modulation on all of the synthesized partials, if no fm or pitch 58 | change is desired then use a 1 for this value
59 | 60 |iatsfile – integer or character-string denoting a 61 | control-file derived from ATS analysis of an audio signal. An integer denotes 62 | the suffix of a file ats.m; a character-string (in double quotes) 63 | gives a filename, optionally a full pathname. If not full-path, the file is 64 | sought first in the current directory, then in the one given by the environment 65 | variable SADIR (if defined).
66 | 67 |ifn – table number of a stored function containing a sine 68 | wave for atsadd and a cosine for atsaddnz (see examples below for more 69 | info)
70 | 71 |ipartials / ibands – number of partials or noise bands that 72 | will be used in the resynthesis (the noise has a maximum of 25 bands)
73 | 74 |ipartialoffset / ibandoffset (optional) – is the first 75 | partial or noise band used (defaults to 0).
76 | 77 |ipartialincr / ibandincr (optional) – sets an increment by 78 | which these synthesis opcodes counts up from 79 | ipartialoffset/ibandoffset for ibins components in the 80 | re-synthesis (defaults to 1).
81 | 82 |ksinlev controls the level of the sines in the 83 | atssinnoi ugen. A value of 1 gives full volume sinewaves.
84 | 85 |knzlev controls the level of the noise components in the 86 | atssinnoi ugen. A value of 1 gives full volume noise.
87 | 88 |igatefn (optional) – is the number of a stored function which 89 | will be applied to the amplitudes of the analysis bins before resynthesis takes 90 | place. If igatefn is greater than 0 the amplitudes of each bin will be 91 | scaled by igatefn through a simple mapping process. First, the 92 | amplitudes of all of the bins in all of the frames in the entire analysis file 93 | are compared to determine the maximum amplitude value. This value is then used 94 | create normalized amplitudes as indices into the stored function 95 | igatefn. The maximum amplitude will map to the last point in the 96 | function. An amplitude of 0 will map to the first point in the function. Values 97 | between 0 and 1 will map accordingly to points along the function table. This 98 | will be made clearer in the examples below.
99 | 100 |ktimpnt and kfmod are used in the same way as in 102 | pvoc.
103 | 104 |ktime line 0, p3, 2.5 107 | asig atsadd ktime, 1, "clarinet.ats", 1, 20, 2108 |
In the example above, ipartials is 20 and ipartialoffset 109 | is 2. This will synthesize the 3rd thru 22nd partials in the "clarinet.ats" 110 | analysis file. kmod is 1 so there will be no pitch transformation. Since the 111 | ktimepnt envelope moves from 0 to 2.5 over the duration of the note, 112 | the analysis file will be read from 0 to 2.5 seconds of the original duration 113 | of the analysis over the duration of the csound note, this way we can change 114 | the duration independent of the pitch. 115 | 116 |
117 | 118 | 2. 119 |ktime line 0, p3, 2.5 120 | asig atsaddnz ktime, "clarinet.ats", 2, 25121 |
In the example above we're synthesizing all 25 noise bands from the data 122 | contained in the ATS analysis file called "clarinet.ats", we're using function 123 | table 2, which should be a cosine ie:
124 | 125 |f2 0 4096 9 1 1 90126 | 127 | 3. 128 |
ktime line 0, p3, 2.5 129 | asig atsadd ktime, 1.0125, "clarinet.ats", 1, 20, 0, 2130 |
In the above example we synthesize 20 partials as in example 1 except this 131 | time we're using a ipartialoffset of 0 and ipartialincr of 2, 132 | which means that we'll start from the first partial and synthesize 20 partials 133 | total, skipping every other one (ie. partial 1, 3, 5,...). We've also 134 | increased the pitch of the result (kfmod is set to 1.0125).
135 | 136 | 4. 137 |ktime line 2.5, p3, 0 138 | asig atsaddnz ktime, 1, "clarinet.ats", 2, 1, 24139 | 140 |
Here we synthesize only the 25th noise band (ibandoffset of 24 and 141 | ibands of 1). Also our time pointer is going from 2.5 to 0 over the 142 | duration of the note so we're reading backwards from 2.5 seconds in the 143 | analysis file.
144 | 145 | 5. 146 |ktime line 0, p3, 2.5 147 | asig atssinnoi ktime, 1, 1, 1, "clarinet.ats", 42148 | 149 |
Here we synthesize both the noise and the sinewaves (all 42 partials) 150 | contained in "clarinet.ats" together. The relative volumes of the noise and 151 | the partials are unaltered (each set to 1).
152 | 153 | 6. 154 |ktime line 0, p3, 2.5 155 | knzfade expon 0.001, p3, 2.5 156 | asig atssinnoi ktime, 1, knzfade, 1, "clarinet.ats", 42157 | 158 |
This example here is like example 5 except that we use an envelope 159 | to control knzlev (the noise level). The result of this will be a 160 | clarinet sound that has its noise component fade in over the duration of the 161 | note.
162 | 163 |Alex Norman (an edited version of Richard Karpen's pvadd documentation)
165 | Seattle, Wash
166 | 2004
167 |
168 |
--------------------------------------------------------------------------------
/ats/src/atsa/residual-analysis.c:
--------------------------------------------------------------------------------
1 | /* residual-analysis.c
2 | * atsa: ATS analysis implementation
3 | * Oscar Pablo Di Liscia / Pete Moss / Juan Pampin
4 | */
5 |
6 | #include "atsa.h"
7 |
8 | #define ATSA_RES_MIN_FFT_SIZE 4096
9 | #define ATSA_RES_PAD_FACTOR 2
10 | #define MAG_SQUARED(re, im, norm) (norm * (re*re+im*im))
11 |
12 | /* private function prototypes */
13 | int residual_get_N(int M, int min_fft_size, int factor);
14 | void residual_get_bands(double fft_mag, double *true_bands, int *limits, int bands);
15 | double residual_compute_time_domain_energy(ATS_FFT *fft_struct);
16 | double residual_get_band_energy(int lo, int hi, ATS_FFT *fft_struct, double norm);
17 | void residual_compute_band_energy(ATS_FFT *fft_struct, int *band_limits, int bands, double *band_energy, double norm);
18 |
19 | int residual_get_N(int M, int min_fft_size, int factor)
20 | {
21 | int def_size = factor * M;
22 | while(def_size < min_fft_size) def_size = ppp2(def_size+1);
23 | return(def_size);
24 | }
25 |
26 | void residual_get_bands(double fft_mag, double *true_bands, int *limits, int bands)
27 | {
28 | int k;
29 | for(k=0; k upper bin in */
59 | int k;
60 | double sum = 0.0;
61 | if(lo<0) lo = 0;
62 | if(hi> floor(fft->size * 0.5)) hi = floor(fft->size * 0.5);
63 | for(k = lo ; k < hi ; k++)
64 | #ifdef FFTW
65 | sum += MAG_SQUARED( fft->data[k][0], fft->data[k][1], norm);
66 | #else
67 | sum += MAG_SQUARED( fft->fdr[k], fft->fdi[k], norm);
68 | #endif
69 | return( sum/(double)fft->size );
70 | }
71 |
72 | void residual_compute_band_energy(ATS_FFT *fft, int *band_limits, int bands, double *band_energy, double norm)
73 | {
74 | /* loop trough bands and evaluate energy
75 | we compute energy of one band as:
76 | (N-1)/2
77 | 1/N * sum(|X(k)|^2)
78 | k=0
79 | N=fft size, K=bins in band */
80 | int b;
81 | for(b=0; b
atsbufread ktimepnt, kfmod, iatsfile, ipartials[, ipartialoffset, ipartialincr]13 |
ar atscross ktimepnt, kfmod, iatsfile, ifn, kmylev, kbuflev, ipartials[, ipartialoffset, ipartialincr]14 |
kamp atsinterpread kfreq15 |
kfrq, kamp atspartialtap ipartialnum16 | 17 |
21 | 22 | atsbufread is based on pvbufread by Richard Karpen. 23 | atscross, atsinterpread and 24 | atspartialtap are all dependent on 25 | atsbufread just as pvcross and pvinterp are on pvbufread. 26 | atsbufread reads data from and ATS data file and stores it in 27 | an internal data table of frequency, amplitude pairs. The data stored by an 28 | atsbufread can only be accessed by other unit generators, and 29 | therefore, due to the architecture of Csound, an atsbufread 30 | must come before (but not necessarily directly) any dependent unit generator. 31 | Besides the fact that atsbufread doesn't output any data 32 | directly, it works almost exactly as atsadd. The ugen uses a time 34 | pointer (ktimepnt) to index the data in time, ipartials, 35 | ipartialoffset and ipartialincr to select which partials to 36 | store in the table and kfmod to scale partials in frequency. 37 | 38 |
39 | 40 |41 | 42 | atscross uses data from an ATS analysis file (indicated by 43 | iatsfile) and data from an atsbufread to perform 44 | cross synthesis. atscross uses ktimepnt, 45 | kfmod, ipartials, ipartialoffset and 46 | ipartialincr just like 47 | atsadd . atscross synthesizes a 48 | sine-wave for each partial selected by the user and uses the frequency of that 49 | partial (after scaling in frequency by kfmod) to index the table 50 | created by atsbufread. Interpolation is used to get 51 | in-between values. atscross uses the sum of the amplitude 52 | data from its ATS file (scaled by kmylev) and the amplitude data 53 | gained from an atsbufread (scaled by kbuflev) to 54 | scale the amplitude of each partial it synthesizes. Setting kmylev 55 | to one and kbuflev to zero will make atscross act 56 | exactly like atsadd. Setting kmylev to zero and 57 | kbuflev to one will produce a sound that has all the partials 58 | selected by the atscross ugen, but with amplitudes taken from 59 | an atsbufread. The time pointers of the 60 | atsbufread and atscross do not need to be 61 | the same. 62 | 63 |
64 | 65 |66 | 67 | atsinterpread takes a frequency value (kfreq in Hz). 68 | This frequency is used to index the data of an atsbufread. 69 | The return value is an amplitude gained from the atsbufread 70 | after interpolation. atsinterpread allows a user to 71 | determine the frequency envelope of any atsbufread. This 72 | data could be useful for an number of reasons, one might be performing cross 73 | synthesis of data from an ATS file and non ATS data. 74 | 75 |
76 | 77 |78 | 79 | atspartialtap takes a partial number and returns a frequency, 80 | amplitude pair. The frequency and amplitude data comes from an 81 | atsbufread opcode. This is more restricted version of atsread, since each 83 | atsread opcode has its own independent time pointer, and 84 | atspartialtap is restricted to the data given by an 85 | atsbufread. Its simplicity is its attractive feature. 86 | 87 |
88 | 89 |ktimepnt – a time pointer for reading through the ATS 92 | file
93 | 94 |kfmod – an input for performing pitch transposition or 95 | frequency modulation on all of the synthesized partials, if no fm or pitch 96 | change is desired then use a 1 for this value
97 | 98 |iatsfile – integer or character-string denoting a 99 | control-file derived from ATS analysis of an audio signal. An integer denotes 100 | the suffix of a file ATS.m; a character-string (in double quotes) 101 | gives a filename, optionally a full pathname. If not full-path, the file is 102 | sought first in the current directory, then in the one given by the environment 103 | variable SADIR (if defined).
104 | 105 |ifn – table number of a stored function containing a sine 106 | wave for atsadd and a cosine for atsaddnz (see examples below for more 107 | info)
108 | 109 |ipartials / ibands – number of partials or noise bands that 110 | will be used in the re-synthesis (the noise has a maximum of 25 bands)
111 | 112 |ipartialoffset / ibandoffset (optional) – is the first 113 | partial or noise band used (defaults to 0).
114 | 115 |ipartialincr / ibandincr (optional) – sets an increment by 116 | which these synthesis opcodes counts up from 117 | ipartialoffset/ibandoffset for ibins components in the 118 | re-synthesis (defaults to 1).
119 | 120 |kmylev scales the atscross component of the frequency spectrum 121 | applied to the partials from the ATS file indicated by the 122 | atscross opcode. The frequency spectrum information comes 123 | from the atscross ATS file. A value of 1 (and 0 for kbuflev) gives the same results as 124 | atsadd.
125 | 126 |kbuflev scales the atsbufread component of the frequency spectrum 127 | applied to the partials from the ATS file indicated by the 128 | atscross opcode. The frequency spectrum information comes 129 | from the atsbufread ATS file. A value of 1 (and 0 for kmylev) 130 | results in partials that have frequency information from the ATS file given by 131 | the atscross, but amplitudes imposed by data from the ATS file 132 | given by atsbufread
133 | 134 |kfreq is a frequency value (given in Hertz) used by 135 | atsinterpread as in index into the table produced by an 136 | atsbufread
137 | 138 |ipartialnum indicates the partial that the 139 | atspartialtap opcode should read from an 140 | atsbufread.
141 | 142 |ktimpnt and kfmod are used in the same way as in 144 | pvoc.
145 | 146 |ktime line 0, p3, 2.4 149 | ktime2 line 0, p3, .5 150 | kline expseg 0.001, .9, 1, p3-.9, 1 151 | kline2 expseg .001, p3, 1 152 | atsbufread ktime2, 1, "crt.ats", 20 153 | aout atscross ktime, 1, "cl.ats", 1, kline, .001* (1 - kline2), 42154 |
155 | This example performs cross synthesis using two ATS files, crt.ats and 156 | cl.ats. The result of this will be a sound that starts out with the shape 157 | (in frequency) of crt.ats, and ends with the shape of cl.ats. All the 158 | sine-wave frequencies come from cl.ats. The kbuflev value is scaled 159 | because the energy produced by applying crt.ats's frequency spectrum to 160 | cl.ats's partials is very large. Notice also that the time pointers of the 161 | atsbufread (crt.ats) and atscross (cl.ats) need not have the same value, this 162 | way you can read through the two ATS files at different rates. 163 |
164 | 165 | 2. 166 |ktime line 0, p3, 2.4 167 | atsbufread ktime, 1, "cl.ats", 42 168 | kamp atsinterpread p4 169 | aosc oscili kamp, p4, 1 170 |171 |
172 | This example shows how to use atsinterpread. Here a frequency is given by 173 | the score (p4) and this frequency is given to an atsinterpread (with a 174 | corresponding atsbufread). The atsinterpread uses this frequency to output a 175 | corresponding amplitude value, based on the atsfile given by the atsbufread 176 | (cl.ats in this case). We then use that amplitude to scale a sine-wave that 177 | is synthesized with the same frequency (p4). You could extend this to 178 | include multiple sine-waves. This way you could synthesize any reasonable 179 | frequency (within the low and high frequencies of the indicated ATS file), 180 | and maintain the shape (in frequency) of the indicated atsfile (given by the 181 | atsbufread). 182 |
183 | 184 | 3. 185 |ktime line 0, p3, 2.4 186 | atsbufread ktime, 1, "crt.ats", 20 187 | kfreq1, kamp1 atspartialtap 1 188 | kfreq2, kamp2 atspartialtap 10 189 | kfreq3, kamp3 atspartialtap 20190 |
191 | This example here uses an atspartialtap, and an atsbufread to read partials 192 | 1, 10 and 20 from crt.ats. These amplitudes and frequencies could be used to 193 | re-synthesize those partials, or something all together different. 194 |
195 | 196 | 197 |Alex Norman (an edited version of Richard Karpen's pvadd documentation)
199 | Seattle, Wash
200 | 2004
201 |
202 |
--------------------------------------------------------------------------------
/icmc-paper/chicago.sty:
--------------------------------------------------------------------------------
1 | % -*- LaTeX -*-
2 | %%% ====================================================================
3 | %%% @LaTeX-style-file{
4 | %%% author = "Glenn Paulley",
5 | %%% version = "4",
6 | %%% date = "31 August 1992",
7 | %%% time = "09:42:44 199",
8 | %%% filename = "chicago.sty",
9 | %%% address = "Data Structuring Group
10 | %%% Department of Computer Science
11 | %%% University of Waterloo
12 | %%% Waterloo, Ontario, Canada
13 | %%% N2L 3G1",
14 | %%% telephone = "(519) 885-1211",
15 | %%% FAX = "(519) 885-1208",
16 | %%% checksum = "44674 264 1050 10394",
17 | %%% email = "gnpaulle@bluebox.uwaterloo.ca",
18 | %%% codetable = "ISO/ASCII",
19 | %%% keywords = "",
20 | %%% supported = "yes",
21 | %%% abstract = "Contains the LaTeX style command definitions
22 | %%% for the Chicago BibTeX styles chicago.bst and
23 | %%% chicagoa.bst. For details, see below.",
24 | %%% docstring = "The checksum field above contains a CRC-16
25 | %%% checksum as the first value, followed by the
26 | %%% equivalent of the standard UNIX wc (word
27 | %%% count) utility output of lines, words, and
28 | %%% characters. This is produced by Robert
29 | %%% Solovay's checksum utility.",
30 | %%% }
31 | %%% ====================================================================
32 | %
33 | % chicago.sty: Style file for use with bibtex style chicago.bst, for
34 | % bibliographies formatted according to the 13th Edition of the Chicago
35 | % Manual of Style.
36 | %
37 | % 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst',
38 | % with lots of tweaking to make it look like APA style, along with tips
39 | % from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
40 | % newapa.sty formed the basis of this style, chicago.sty. Author-date
41 | % references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst
42 | % supports annotations.
43 | %
44 | % Version 4 (August, 1992):
45 | % - fixed chicago.bst and chicagoa.bst to handle long author lists in
46 | % sorting
47 | % - fixed chicago.bst and chicagoa.bst so that missing page numbers in
48 | % ``article'' entries are handled correctly
49 | % - modified chicago.sty to format entries with 2nd and subsequent lines
50 | % indented.
51 | %
52 | % Citation format: (author-last-name year)
53 | % (author-last-name and author-last-name year)
54 | % (author-last-name et al. year)
55 | % (author-last-name)
56 | % author-last-name
57 | % author-last-name (year)
58 | % (author-last-name and author-last-name)
59 | % (author-last-name et al.)
60 | % (year) or (year,year)
61 | % year or year,year
62 | %
63 | % Reference list ordering: alphabetical by author or whatever passes
64 | % for author in the absence of one.
65 | %
66 | % This BibTeX style has support for abbreviated author lists and for
67 | % year-only citations. This is done by having the citations
68 | % actually look like
69 | %
70 | % \citeauthoryear{full-author-info}{abbrev-author-info}{year}
71 | %
72 | % The LaTeX style has to have the following (or similar)
73 | %
74 | % \let\@internalcite\cite
75 | % \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
76 | % \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
77 | % \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
78 | % \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
79 | % \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
80 | %
81 | % -------------------------------------------------------------------------
82 | % This file implements citations for the ``chicago'' bibliography style.
83 | % Place it in a file called chicago.sty in the TeX search path.
84 | %(Placing it in the same directory as the LaTeX document should also work.)
85 | %
86 | % This file is a modification of the ``newapa'' LaTeX style,
87 | % originally adapted by Steven Spencer from the ``apalike'' LaTeX style.
88 | % It was originally modified by Stephen N. Spencer, with further
89 | % modifications by Young U. Ryu.
90 | %
91 | % The ``chicago'' BibTeX bibliography style creates citations with labels:
92 | % \citeauthoryear{author-info}{abbrev. author-info}{year}
93 | %
94 | % These labels are processed by the following LaTeX commands:
95 | %
96 | % \cite{key}
97 | % which produces citations with full author list and year.
98 | % eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985)
99 | % \citeNP{key}
100 | % which produces citations with full author list and year, but without
101 | % enclosing parentheses:
102 | % eg. Brown 1978; Jarke, Turner and Stohl 1985
103 | % \citeA{key}
104 | % which produces citations with only the full author list.
105 | % eg. (Brown; Jarke, Turner and Stohl)
106 | % \citeANP{key}
107 | % which produces citations with only the full author list, without
108 | % parentheses eg. Brown; Jarke, Turner and Stohl
109 | % \citeN{key}
110 | % which produces citations with the full author list and year, but
111 | % can be used as nouns in a sentence; no parentheses appear around
112 | % the author names, but only around the year.
113 | % eg. Shneiderman (1978) states that......
114 | % \citeN should only be used for a single citation.
115 | % \shortcite{key}
116 | % which produces citations with abbreviated author list and year.
117 | % \shortciteNP{key}
118 | % which produces citations with abbreviated author list and year.
119 | % \shortciteA{key}
120 | % which produces only the abbreviated author list.
121 | % \shortciteANP{key}
122 | % which produces only the abbreviated author list.
123 | % \shortciteN{key}
124 | % which produces the abbreviated author list and year, with only the
125 | % year in parentheses. Use with only one citation.
126 | % \citeyear{key}
127 | % which produces the year information only, within parentheses.
128 | % \citeyearNP{key}
129 | % which produces the year information only.
130 | %
131 | % Abbreviated author lists use the ``et al.'' construct.
132 | %
133 | % `NP' means `no parentheses'.
134 | %
135 | % This LaTeX style file must be used with the ``chicago'' or ``chicagoa''
136 | % (annotated chicago style) BibTeX styles.
137 | %
138 | \typeout{Using Chicago Manual of Style bibliography: 31 August 1992}
139 | %
140 | % -------------------------------------------------------------------------
141 | %
142 | % Citation macros.
143 | %
144 | \let\@internalcite\cite
145 | %
146 | \def\cite{\def\@citeseppen{-1000}%
147 | \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
148 | \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
149 | \def\citeNP{\def\@citeseppen{-1000}%
150 | \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
151 | \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
152 | \def\citeN{\def\@citeseppen{-1000}%
153 | \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
154 | \def\citeauthoryear##1##2##3{##1 (##3}\@citedata}
155 | \def\citeA{\def\@citeseppen{-1000}%
156 | \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
157 | \def\citeauthoryear##1##2##3{##1}\@internalcite}
158 | \def\citeANP{\def\@citeseppen{-1000}%
159 | \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
160 | \def\citeauthoryear##1##2##3{##1}\@internalcite}
161 | %
162 | \def\shortcite{\def\@citeseppen{-1000}%
163 | \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
164 | \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
165 | \def\shortciteNP{\def\@citeseppen{-1000}%
166 | \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
167 | \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
168 | \def\shortciteN{\def\@citeseppen{-1000}%
169 | \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
170 | \def\citeauthoryear##1##2##3{##2 (##3}\@citedata}
171 | \def\shortciteA{\def\@citeseppen{-1000}%
172 | \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
173 | \def\citeauthoryear##1##2##3{##2}\@internalcite}
174 | \def\shortciteANP{\def\@citeseppen{-1000}%
175 | \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
176 | \def\citeauthoryear##1##2##3{##2}\@internalcite}
177 | %
178 | \def\citeyear{\def\@citeseppen{-1000}%
179 | \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
180 | \def\citeauthoryear##1##2##3{##3}\@citedata}
181 | \def\citeyearNP{\def\@citeseppen{-1000}%
182 | \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
183 | \def\citeauthoryear##1##2##3{##3}\@citedata}
184 |
185 | %
186 | % \@citedata and \@citedatax:
187 | %
188 | % Place commas in-between citations in the same \citeyear, \citeyearNP,
189 | % \citeN, or \shortciteN command.
190 | % Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list.
191 | %
192 | \def\@citedata{%
193 | \@ifnextchar [{\@tempswatrue\@citedatax}%
194 | {\@tempswafalse\@citedatax[]}%
195 | }
196 |
197 | \def\@citedatax[#1]#2{%
198 | \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
199 | \def\@citea{}\@cite{\@for\@citeb:=#2\do%
200 | {\@citea\def\@citea{, }\@ifundefined% by Young
201 | {b@\@citeb}{{\bf ?}%
202 | \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
203 | {\csname b@\@citeb\endcsname}}}{#1}}%
204 |
205 | % don't box citations, separate with ; and a space
206 | % also, make the penalty between citations negative: a good place to break.
207 | %
208 | \def\@citex[#1]#2{%
209 | \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
210 | \def\@citea{}\@cite{\@for\@citeb:=#2\do%
211 | {\@citea\def\@citea{; }\@ifundefined% by Young
212 | {b@\@citeb}{{\bf ?}%
213 | \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
214 | {\csname b@\@citeb\endcsname}}}{#1}}%
215 |
216 | % (from apalike.sty)
217 | % No labels in the bibliography.
218 | %
219 | \def\@biblabel#1{}
220 |
221 | % (from apalike.sty)
222 | % Set length of hanging indentation for bibliography entries.
223 | %
224 | \newlength{\bibhang}
225 | \setlength{\bibhang}{2em}
226 |
227 | % Indent second and subsequent lines of bibliographic entries. Stolen
228 | % from openbib.sty: \newblock is set to {}.
229 |
230 | \newdimen\bibindent
231 | \bibindent=1.5em
232 | \@ifundefined{refname}%
233 | {\@ifundefined{chapter}%
234 | {\newcommand{\refname}{References}}%
235 | {\newcommand{\refname}{Bibliography}}%
236 | }%
237 | {}%
238 | \@ifundefined{chapter}%
239 | {\def\thebibliography#1{\section*{\refname\@mkboth
240 | {\uppercase{\refname}}{\uppercase{\refname}}}\list
241 | {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
242 | \leftmargin\labelwidth
243 | \advance\leftmargin\labelsep
244 | \advance\leftmargin\bibindent
245 | \itemindent -\bibindent
246 | \listparindent \itemindent
247 | \parsep \z@
248 | \usecounter{enumi}}
249 | \def\newblock{}
250 | \sloppy
251 | \sfcode`\.=1000\relax}}
252 | {\def\thebibliography#1{\chapter*{\refname\@mkboth
253 | {\uppercase{\refname}}{\uppercase{\refname}}}\list
254 | {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
255 | \leftmargin\labelwidth
256 | \advance\leftmargin\labelsep
257 | \advance\leftmargin\bibindent
258 | \itemindent -\bibindent
259 | \listparindent \itemindent
260 | \parsep \z@
261 | \usecounter{enumi}}
262 | \def\newblock{}
263 | \sloppy
264 | \sfcode`\.=1000\relax}}
265 |
--------------------------------------------------------------------------------