Andrea Valle, SampComp - Sample Based Techniques For Algorithmic Composition
Andrea Valle, SampComp - Sample Based Techniques For Algorithmic Composition
Andrea Valle, SampComp - Sample Based Techniques For Algorithmic Composition
Andrea Valle
StudiUm/CIRMA - Università di Torino
andrea.valle@unito.it
4
1 73
X X # X X X X X X X X X X X # X nX X # X nX # X nX X
& 4 X #X X X #X X X
72
X # X X nX
71
0.6
70
69
0.2 68
67
66
-0.2 65
64 3
& X #X X X X #X
63
X X #X X
-0.6
X X X X X X
62
61
-1 60
0 24 48 0 12 24 36 48
7 X X X X XJ X X Xj X X X
&8X
1 73
#X X X #X X j
X
72
71
0.6
70
69
0.2 68
67
66
-0.2
X X XJ
65
&X X X X X Xj
4
X X X X X
64
#X X X j
X
63
-0.6
62
61
-1 60
0 24 48 0 4 8 12 16
#X X X X X
7
3 # XJ . Xj. XJ . XJ .
Figure 6. Transcription in music notation of Figure 5 (1
& 8 Xj. j
X. #j
X. Xj. semiquaver per sample).
# Xj. # XJ . # Xj.
5
0.6 0.6
0.2 0.2
-0.2 -0.2
0 20 40 60 80 100 0 20 40 60 80 100
1 73
72
71
0.6
70
0.2 68
67
66
5 X #X X #X #X
&4 X X X X X # X nX X #X
1 73
X
72
71
0.6
70
69
0.2 68
67
66
4
& X X X X X X X X X X
-0.2 65
64
63
-0.6
62
61
-1 60
0 20 40 60 80 100 0 5 10 15
Figure 5. 5 cycles of a sinusoidal signal (left); requantized Figure 8. Transcription in music notation of Figure 7 (1
version (right). semiquaver per sample).
19 XkX.. XJ # XJ # XJ . X XK nX .. XJ XJ # Xj. # X
& 16 # Xj. # X Xk# X .. nXj Xj
1 73
72
71
0.6
70
69
0.2 68
67
66
-0.2 65
64
63
-0.6 4
Xk X .. Xj Xj # Xj.
62
0 20 40 60 80 100 0 20 40 60 80 100
# X X # X X X X X X X X nX X X X # X X X X X X # X X X X X X # X X X X X X X X X X X X X X
3 0.2 68
&
67
66
-0.2 65
64
63
-0.6
62
61
# X X # X X X X nX X X X X X X X # X X X X nX X
-1 60
5
&
0 20 40 60 80 100 120 140 160 0 11 22 33 44 55 66 77 88 99 110 121 132 143 154 165
X X X nX # X nX X X # X X X nX # X X X # X nX # X X X X X # X nX X X X X X
3
& #X
polyphony (the melodic contour is more clearly displayed
by Figure 9, right). X X
X X
& X X # X X X X X # X nX X X X X nX X # X X X X X X # X nX X X X nX X X X
5
In the previous discussion, a fixed resampling rate for
src has been assumed. While fixed sampling frequency is
X X X X # X # X nX X nX X X X X X X X
7
& X X X X # X # X nX X X nX X X X X X
a standard technique in DSP, SampComp techniques may
benefit from non standard approaches. In this regard, vari- X
able sampling can be applied to a src signal. In electronics, X X X
9
a Sample & Hold circuit polls the signal, extracts the value, & X X # X# X nX X nX X X X X X X X X X # X# X nX X nX X X X X X X X X X # X # XnX Xk
and keeps it until a new polling is asked for [13]. The next
example is based on a Sample & Hold algorithm that polls
the source signal src according to a sequence of variable Figure 13. Transcription in music notation of Figure 12 (1
sample intervals instead of a constant rate. Figure 11 is semiquaver per sample).
Pf
q»96
4
4 A
m 0 n 0 n >0 n0 n0 B
n 0 b >0 b 0 D D O
B > A
n0 n0 n 0 n 0 n >0 n0 b 0 bB0
1 D
b0 n0 n0 E E Bœ n0 b0
ˆ S n0 n0 m0 n0 n0 n0 ‰ n0 m0 m0 m0 S
Guit Œ ‰ Œ Œ ‰
3 3 3 3
P
3 3
3 q»150 4 3 4 3 4
1
4 X
1 4 X
4 4 4 Z 4
1
> L >Z > s Z X > s 8 > s s
Vno i ‰ m0 ‰ S Œ ‰ m0 ‰ n0 s Œ . n >0 m 0 Œ . n >0 0 ‰ 0 Œ¿ m 0 Œ . ‰ n0 Ó n >0 ‰
S S > n0 S >
0.8 >
Jƒ Ksempre
3 X
0.6 n >0
8 legno batt. Z n >0 Z
Vla X >
¿ ‰ nœ n’ ‰ ‰ s n >0 ‰ S ‰ ‰ S ‰ s Œ. s Œ i Ó ‰
0.4 S fl . n >0 S n >0 n0 n flœ n ’.
ç Jƒ Ksempre 0
0.2 Y 2
0 8 8 8 Y
f
8
b >0
> s µ >œ µœ ‰ 8
> >¿ ‰ ‰ µ >œ
Y 2
0 Vc ¿ ‰ S Œ. n >0 ‰ ‰ S Ó ‰ Ó s ‰ ‰ s Ó s ‰
S S S S b >0
œ 0 µ >œ µ >œ
ç Jƒ Ksempre
-0.2 8 0 8 8
-0.4
-0.6
-0.8
Figure 18. Beginning and ending measures from the in-
-1 strumental score of Daripessus Yantillipicus.
0 50 100 150 200 250 300 350 400
The cycle is made up of four pieces (Regnum animale, Reg- tion data structures by exporting PostScript code, following the approach
discussed before. From top to bottom, the names of the devices are:
num vegetabile, Regnum lapideum, Fossilia) and integrates girodisco1, girodisco2, girodisco3, molatore1, molatore2, molatore3,
various instrumental ensembles with real-time, computer- molatore4, armonica1, armonica2, armonica3, zampogno1, zampogno2,
zampogno3, zampogno4, radio1, radio2, radio3, segopiatto1, segopiatto2,
segopiatto3, segopiatto4, spremoagrume, rasoio, meshugghello, lampad-
4 http://debussy.music.ubc.ca/NoteAbility/ ina.
4 q»150
4 Z
n œ. ‰ . . . . . n œ. ! n œ. ‰ . .
‰ n k œœ .
1
‰ . nœ Ó
1
Fl i Œ ! nœ ‰ nœ ! ‰ Œ ! nœ ! nœ ‰ Œ Ó
SS SS SS SS SS SS SS SS
0.8 ∏ p f F ø
.5 5
. 5
. . 5
0.6
Ob i Œ Bœ Œ Ó Bœ Œ. Bœ ‰ Ó i ‰ Bœ Œ . Ó
S S S S
0.4 p P F
3
. 89
‰ m l œœ ..
lœ
0.2
Cl i Ó Œ S Œ i Ó w
w
p
0 ø
con Sordina
1 1 s
Œ. ! n œs ‰ n œs ‰ .
-0.2 ss ss ss ss ss ss ss s s
nœ ! ! nœ ‰ Œ nœ ‰ nœ Œ nœ ‰ nœ ! nœ ! nœ Ó
s
Vno i
-0.4 ∏ F π P ∏ π f π
con Sordina
3 3 3 3 3 3 3 3 3 3 3
1 s s s s s s s s s
-0.6
Vla i ‰ mœ ‰ ‰ mœ ‰ Œ mœ Œ Œ mœ mœ mœ ‰ mœ ‰ mœ ‰ mœ mœ ‰ mœ mœ Ó mœ Œ Œ mœ Œ ‰ mœ ‰ Œ
F f F p F ∏ P π Ff P ∏
-0.8
5 5
W s h
..
con Sordina 2 s Ó s Ó 2
-1 Vc i Ó Ó i ‰ n n 0œ
1 Bœ Bœ
p π 0 ø
0 0.25 0.5 0.75 1
Figure 19. Audio sample (1 second) used as a source sig- Figure 21. Beginning measures from the instrumental
nal for Ismiosia Papanabuis. score of Ismiosia Papanabuis.
VII: Ismiosia papanabuis both the PWM and the audio signal are one-dimensional.
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90
fischietta
sirenetto1
While in previous examples, all devices were treated as
ocarino1
zampogno7 operating in a binary mode, such a PWM control signal
zampogno6
zampogno5
zampogno4
can be directly generated via SampComp techniques. The
zampogno3
zampogno2
zampogno1
following two examples are from Regnum vegetabile too.
trombo9
trombo7
trombo5
The average filtering technique is used in the piece Ario-
trombo3
trombo1 lactus usteginsiphillemena with a different approach. In
trombo2
trombo4
trombo6
the piece, filtering is used to manage the delivery of elec-
trombo8
trombo10
armonica1
tric current to group of devices, thus properly implement-
armonica2
armonica3
armonica4
ing a Karplus-Strong-like algorithm that simulates an at-
armonica5
armonica6
tack/resonance acoustic model to generate 8-bit PWM sig-
armonica7
ocarino2
sirenetto2
nals. Figure 22 reproduces the visualisation score for ma-
ancetto
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 chines. In this case, the averaging filter is used to directly
control the values sent by Arduino’s PWM circuitry to de-
vices. Finally, the same approach is at play in the piece Re-
Figure 20. Visualisation score for electromechanical de-
ocerantroma phenaudi. PWM signals for devices are ob-
vices in Ismiosia Papanabuis.
tained by applying the previously introduced technique of
the inverted sinusoid with impulse replacement, yielding
spective. In this case, a short audio fragment is mapped to activation patterns made up of a continuous behaviour
directly onto events, like in Daripessus. The 1-second au- with short spikes (as can be clearly seen in Figure 23).
dio sample (Figure 19) is taken from the recording of an
electroacoustic improvisation made by the author and Si- 5. CONCLUSIONS
mone Pappalardo, and it has been chosen both as a formal
model for composition because of its temporal behaviour Audioparity can be seen as a musical aesthetics meta-cate-
and as a homage to Pappalardo, a frequent collaborator of gory that groups together many historically and technically
both composers. The only operation performed by Map- different approaches to composition, that share a common
Func is the quantization from values in the audio signal to interest in sound as a starting point for music creation.
indices representing the selected devices in a ranked list. Thus, SampComp can be seen as an audioparous approach,
Figure 20 6 shows the visualisation score for devices. De- provided that sound as as a starting point is not considered
vice activations describe a single melodic contour, follow- neither in perceptual nor in acoustic terms, rather in rela-
ing the imported waveform (compare Figure 19 and Figure tion to its technological implementation as a digital audio
20). In the piece, the same principle is applied to acous- signal. This allows to profit from two mutually related as-
tic instruments, so that the overall composition is properly pects. On one side, the digital encoding of information
a hochetus (if attacks, rather that durations, are taken into allows a continuous transition from the sample level to the
account), as Figure 21 shows. event one, due to the common numerical format. On the
As discussed, the electromechanical devices (in case other one, by taking into account digital audio signals, a
of DC motors) expose as a control interface for their be- large corpus of knowledge is available to experimentation
haviour a single parameter, the 8-bit value addressable for from the DSP theoretical domain. In short, the audio signal
PWM signals. In this sense, they fit the audio signal, as is taken into account as an abstract cognitive form to de-
scribe time patterns. Hence, the possible interest of Samp-
6 From top to bottom, devices are: fischietta, sirenetto1, ocarino1,
zampogno7, zampogno6, zampogno5, zampogno4, zampogno3, zam- Comp techniques, which use can be further expanded and
pogno2, zampogno1, trombo9, trombo7, trombo5, trombo3, trombo1, not necessarily limited to pitch contour generation: as an
trombo2, trombo4, trombo6, trombo8, trombo10, armonica1, armonica2,
armonica3, armonica4, armonica5, armonica6, armonica7, ocarino2, example, to manage the harmonic level or, as discussed in
sirenetto2, ancetto. the last section, to generate time forms for generic sound