OpenMusic Tutorials
Prev| Chapter 10. Using Musical Objects I| Next
Tutorial 31: Working with lists II
Grouping lists
Topics
Using group-list
to create chords based on a density
contour.
Key Modules Used
BPF, bpf-sample
, group-
list
, om-round
, om-scale/sum
The Concept:
Here we use bpf-sample
as we did in Tutorial
21 to transform a BPF into
values. This time, however, the values of the BPF
will represent the density of chords, not the notes. We use the group-
list
function, demonstrated in the previous tutorial, to
break down a master Chord object into a list of
Chords following the density contour of the
BPF.
The Patch:
Here’s a schematic of the patch:
The input (D) will decide how many child Chords we want to create. In the example, we take 7 samples of the BPF in the range of x-axis values between 10 and
- We will ultimately use
group-list
to split the master Chord apart. The problem is that the values of the samples of the BPF total many more notes than are available in the Chord. We need to scale this list of samples, but not as we’ve scaled things in the past, because it is not the bounds of the series we are concerned with but the sum. We use a different function,om-scale/sum
, which adjusts the series of samples so that their sum is equal to the number of elements in the master Chord.
The next problem is that group-list
needs a list of whole
numbers to determine how many notes it will put in each group. We solve this
by rounding the list off with om-round
. The result is that
the master Chord is broken up into a series of elements with
densities based on the BPF, which you can verify
by drawing a new figure in the BPF editor.
Prev | Home | Next |
---|---|---|
Tutorial 30: Working with lists I | Up | The Maquette |