File: tapiir.txt

package info (click to toggle)
tapiir 0.6-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 568 kB
  • ctags: 301
  • sloc: cpp: 1,557; makefile: 84
file content (220 lines) | stat: -rw-r--r-- 11,851 bytes parent folder | download | duplicates (3)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220


                       TTAAPPIIIIRR,, AA SSOOFFTTWWAARREE MMUULLTTIITTAAPP DDEELLAAYY


                                Maarten de Boer
                             Audiovisual Institute
                            Pompeu Fabra University
                               Barcelona, Spain
                              _m_d_e_b_o_e_r_@_i_u_a_._u_p_f_._e_s

AABBSSTTRRAACCTT

The use of delays is one of the oldest techniques for effects processing and
electro-acoustic composition_[_1_]. Originally, tape-loops were used to create
effects of echo and reverb. Nowadays, most hardware effect processors provide
digital implementations. These have a clearly superior sound-quality compared
to tape-delays, but also imply some restrictions. Delay-length is limited by
the internal memory, and delay time accuracy is often sacrificed for
computational efficiency or even deliberately restricted for user-interfacing.

This paper presents a dedicated software implementation of a flexible multi-
delay, that aims to combine flexibility and high accuracy with high quality
audio and usability. At the same time, several important issues in software
effect processing will be addressed.

This article appears in Proceedings of the COST G-6 Conference on Digital Audio
Effects (DAFX-01), Limerick, Ireland, December 6-8, 2001

HHIISSTTOORRYY

Before the use of digital delays, echo facilities were provided by tape delay
systems, which often were modified conventional tape recorders. Tape recorders
have three heads, a erase, a record and a playback head. The echo effect was
obtained by playing back the signal that was being recorded immediately. The
time interval between record and playback was determined by the distance
between the two heads and the speed of the tape.

                             Figure 1. Tape delay.


More complicated effects could be reached by the use of feedback - passing the
output from the playback head back into the recording channel through a
feedback level control - and the use of multiple playback heads, placed in a
row at different positions along the tape. The studio of Cologne was equiped
with such a device, and Schaeffer's Morphophone is another example. The use of
tape delays has been used widely and for a long period of time by electro-
acoustic composers, both in electronic pieces andmusique concrte. Another
process involving tape recordings is the use of tape loops, which could be used
to infinitely repeat a sound or phrase. Steve Reich'sIts Gonna Rain (1965) is
one of the most known examples, and uses this technique in extremis. A musical
experience is created by playing two tape loops of the same recording with a
slightly different length, where the effect starts of as phasing, and than
gradually changes into echo.

These techniques were not only used in studio recordings, but also for live
performances. Stockhausen'sSolo (1966) is a work for a melody instrument and a
complex tape feedback system, where four assistents control six playback heads
along a tape of several feet length. Outback is played back on speakers and fed
back into the tape.

A direct descendent of the Morphophone, the Copycat, could be used to create
more complex echo effects and even reverbation, with the use of five playbacks
placed on a tapeloop to produce irregular patterns of delays.

One would expect that digital techniques made these tape techniques obsolete.
This is often the case, as standard digital effects processors provide delays,
echo's and reverbation. However, they also have limitations, which makes them
less flexible than the tape delays, and which even inhibit some of the
techniques described above.

TTAAPPIIIIRR

DDeessccrriippttiioonn

TAPIIR internal processing modules consist of six delay-lines, each with a
mixer at it's input and a gain control at it's output, and a stereo output
mixer. Stereo input from an external source, typically a musical instrument, is
routed to all input mixers. In addition to this, the output of each delay line
is also routed to the input mixers of all delay lines, including itself. Figure
1 shows the diagram of TAPIIR's internals.

This cross-feeding of audio signals throughout the system of delay-lines and
mixers, allows the user to create a very large variety of stereo delay effects.
Very simple echos or ping-pong effects can be achieved easily, but more complex
effects such as early reflection echo's, reverbs, complex rhythmic and
arrhythmic patterns and even Karplus-Strong like synthesis is also possible. It
is important to observe, that these more complex effects are only possible by
using sample accurate processing.

                        Figure 2. TAPIIR flow diagram.

SSaammppllee aaccccuurraaccyy

Conventional hardware effect processors are often rather limited in the lenght
of there delay-lines. It is unusual to encounter accuracy higher than 1 msec,
and even 10 msec is used frequently, and maximum delay-lenght are limited as
well.

Obviously, this limitation in hardware effect processors is deliberate, both
out of technical concerns or marketing. Most users are not interested in higher
accuracy, and the standard user interface of hardware effects processors -
buttons or at the most an alpha-dial - would make it a painful job to adjust.
Also, one can imagine that lower accuracy means less computational cost, and
therefore lower overall cost of the effect processing hardware.

For advanced users however, this limitation can be annoying. Of course, many of
the effects obtained with very short delay times, such as reverb or filtering,
are usually also implemented in the same hardware, but it can be very
interesting to combine all these with longer delay-time effects; it would be
necessary to use several processors connected together to do this.

The implementation of TAPIIR, however, is sample accurate. This means that
extremely short delay times can be used, 0.023 msec when using a sample-rate of
44100 Hz. In addition to this fine control over delay-lengths, the sample
accuracy is also implented for feedback and even cross-feeding between the
various delay-lines, This is achieved by the fact that the internal processing
core of TAPIIR is written in such a way, that the input and output values of
the delay-lines and mixers are passed on 1 at a time, instead of buffer-by-
buffer.

FFiilltteerriinngg wwiitthh ddeellaayyss

Obviously, the effects obtained by sample accurate processing of delay-lines go
far beyond the simple echo effects. This includes the creation of FIR filters
and - using feedback - IIR filters (this has been the inspiration for the name
TAPIIR). In these cases, the mixer gains function as filter coefficients. This
means that TAPIIR can efficiently be used for filtering, with flexible filter
design. In a future version, TAPIIR could contain a pole/zero editor that
automatically sets the mixer values to create the corresponding filter.

The maximum delay-length that can be achieved is only limited by the physical
RAM memory of the system TAPIIR runs on. To give an example, with 32 MB of free
memory, a total delay-length of more than 6 minutes can be used. While this
might seem rather useless for normal effect processing, it clearly has musical
applications. Several compositions have been written that make use of long
delay times. Originally performed with the use of tape-delays, they could take
great profit of the use of digital techniques for sound quality. The use of
hard disk space with sufficient fast access would take away time limitation
even more.

DDeellaayy--lleennggtthh ccoonnttrrooll

The graphical user interface of TAPIIR allows the user to take full advantage
of the delay-length accuracy, but at the same time it tries to maintain user-
friendly and manageable, by offering value-sliders for larger scales as well.
Delay-time can be entered in time in seconds in number of samples. Sliders
control the digits of the delay-length, with an accuracy of 5 decimals. An
additional feature is the use of tempo/signature. In that case, delay-length in
not represented in seconds, but in beats, and the sliders control the
subdivision of beats according to the signature. Obviously, in many
circumstances this representation is a lot more useful, in a musical sense,
than time in seconds.

                 Figure 3. Screenshot of TAPIIR delay control

SSiinnggllee ppuurrppoossee vveerrssuuss fflleexxiibbiilliittyy

It is perfectly possible to implement a similar application with one of the
many modular digital audio processing applications that available, such
asjMax,Reaktor, orWaveWarp_[_2_]. However, for many users an out-of-the-box
dedicated application might be a better choice. Also, most modular approaches
imply the use of buffered calculation, which means they do not allow the sample
accuracy discussed above.

The system requirements of TAPIIR have been kept very low, being a single-
purpose application. This makes it perfectly possible to run TAPIIR in
combination with other applications.

LLooww--llaatteennccyy

For real-time effect processing it is very important that the input/output
latency is small; If the latency is to long it becomes noticeable, and the
produced sound is constantly delayed by the I/O. This is very annoying and it
even obstructs proper instrumental performance, especially in the case for many
delay-based effects, such as creating loops and playing on top of them.

TAPIIR has been implemented on the Linux operating system. Low-latency is a hot
issue among many Linux audio developers. Even though Linux is not a true Real-
time operating system, it is very suitable for applications that have high
scheduling requirements. The multitasking facilities allow time critical tasks
such as audio input, output and processing, to be separated from less critical
tasks such as file i/o and graphical user interfacing. Linux has not been
designed with low-latency audio applications in mind, and the standard time
slicing shows this. However, and here we see one of the advantages of open-
source software, a patch has been written for the Linux kernel to greatly
improve this - you can achieve consistent worse-case scheduling latencies of
0.5 milliseconds on a 500MHz machine _[_3_]_[_4_].

Linux can be considered the operating system of choice for applications such as
TAPIIR. The other way around, TAPIIR is a nice demonstration application of
Linux' Real-time effect processing capabilities.

IImmpplleemmeennttaattiioonn

TAPIIR has been written with the ALSA_[_5_] audio library and the FLTK_[_6_] GUI
library. MIDI interaction is being implemented. TAPIIR is freely available
under the GNU GPL.

The author hopes that TAPIIR will be used by composers and performers, and that
is can facilitate the performance of existing works which otherwise would be
difficult to accomplish.

RREEFFEERREENNCCEESS

  1.
     Manning, P.,Electronic & Computer Music, Clarendon Press, Oxford, 1993.
  2.
     Jafry, Y.,A Modular Real-time PC-based Audio Processing Tool, Proc.
     Conference on Digital Audio Effects (DAFX-00), Verona, Italy, 2000.
  3.
     Morton, A.,Linux Scheduling Latency, _h_t_t_p_:_/_/_w_w_w_._z_i_p_._c_o_m_._a_u_/_~_a_k_p_m_/_l_i_n_u_x_/
     _s_c_h_e_d_l_a_t_._h_t_m_l
  4.
     Linux Audio Development homepage, _h_t_t_p_:_/_/_w_w_w_._l_i_n_u_x_d_j_._c_o_m_/_a_u_d_i_o_/_l_a_d_/
  5.
     Advanced Linux Sound Architecture, _h_t_t_p_:_/_/_w_w_w_._a_l_s_a_-_p_r_o_j_e_c_t_._o_r_g
  6.
     FLTK homepage, _h_t_t_p_:_/_/_w_w_w_._f_l_t_k_._o_r_g