Appendix C: Latin Rhythms

s.boot;

(

//Tom

a = Buffer.read(s, “/Users/elliottgrabill/Documents/Paper Documents/Math/OER Files/Tom.wav”

);

//Bass Drum

b = Buffer.read(s, “/Users/elliottgrabill/Documents/Paper Documents/Math/OER Audio Files/Bass Drum.wav”

);

// Cowbell 1

c = Buffer.read(s, “/Users/elliottgrabill/Documents/Paper Documents/Math/OER Audio Files/Cowbell 1.wav”

);

// Cowbell 2

d = Buffer.read(s, “/Users/elliottgrabill/Documents/Paper Documents/Math/OER Audio Files/Cowbell 2.wav”

);

//Tambourine

e = Buffer.read(s, “/Users/elliottgrabill/Documents/Paper Documents/Math/OER Audio Files/Tambourine.wav”

);

// Snare

f = Buffer.read(s, “/Users/elliottgrabill/Documents/Paper Documents/Math/OER Audio Files/Snare.wav”

);

SynthDef(“normal”, {

arg amp = 1, bufnum = 0, rate = 1.066666667, loop = 0, ffreq = 1000, rel = 10;

var snd;

var env = Env.new([0, 5, 1, 0], [0.01, 16, 6],[-5, 0, 3]);

var envgen = EnvGen.ar(env, doneAction: 2);

snd = PlayBuf.ar(

numChannels: 2,

bufnum: bufnum,

rate: rate,

loop: loop

) * envgen * amp;

Out.ar([0, 1], snd);

}

).add;

~mySynth = Synth(“normal”, [\bufnum, a, \amp, 0.1, \rel, 10]);

)

// EXAMPLE 1

// SIMPLE

~drum = Pbind(

\instrument, “normal”,

\bufnum, a,

\dur, Pseq([

1, 1, 0.5, 0.5, 1,

2, 1, 1

], 15),

\rate, 1

).play;

// EXAMPLE 2

// CHA CHA

t = TempoClock(120/60);

{

~cowbell = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 1, 1, 1

], 5),

\rate, 1

).play(t);

~drum = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1, 0.5, 0.5, 1, 0.5, 0.5

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 3

// RUMBA

t = TempoClock(184/60);

{

~cowbell = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 0.5, 1, 1, 0.5,

1, 1, 0.5, 1, 0.5

], 5),

\rate, 1

).play(t);

~drum = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1.5, 2, 1.5,

1, 2

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1.5, 2.5,

4

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 4

// MAMBO

t = TempoClock(184/60);

{

~cowbell = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 0.5, 1, 0.5, 0.5, 0.5,

1, 1, 0.5, 1, 0.5

], 5),

\rate, 1

).play(t);

~drum = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1.5, 1.5, 2,

1, 2

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1.5, 1.5, 2.5,

1.5, 1,

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 5

// NEW YORK MOZAMBIQUE

t = TempoClock(184/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 1, 0.5, 1, 1,

0.5, 1, 0.5, 1, 0.5

], 5),

\rate, 1

).play(t);

~drum = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

3.5, 2,

1.5, 1

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

7.5, 0.5

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 6

// SONGO

t = TempoClock(144/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5

], 5),

\rate, 1

).play(t);

~drum = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1, 1.5, 1, 0.5

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1.5, 1.5, 1

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 7

// NANIGO

t = TempoClock(144/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 1, 0.5, 1,

0.5, 0.5, 0.5, 0.5, 0.5

], 5),

\rate, 1

).play(t);

~drum = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1.5, 1.5,

1.5, 1.5

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 8

// MOZAMBIQUE

t = TempoClock(184/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 1, 0.5, 1, 1,

0.5, 1, 0.5, 1, 0.5

], 5),

\rate, 1

).play(t);

~cowbell1 = Pbind(

\instrument, “normal”,

\bufnum, d,

\dur, Pseq([

1.5, 1.5, 2.5,

1.5, 1

], 5),

\rate, 1

).play(t);

~cowbell2 = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

2, 4,

2

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

2, 4,

2

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 8

// SALSA

t = TempoClock(108/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

0.5, 0.5, 0.25, 0.5, 0.25,

0.5, 0.25, 0.5, 0.25, 0.25, 0.25

], 5),

\rate, 1

).play(t);

~drum = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

0.5, 0.5, 1,

0.75, 0.75, 0.5

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

0.75, 2, 0.75, 0.5

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 9

// SAMBA

t = TempoClock(182/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,

0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5

], 5),

\rate, 1

).play(t);

~cowbell = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1, 1.5, 1, 1,

1, 0.5, 1, 1

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1.5, 0.5, 1.5, 0.5,

1.5, 0.5, 1.5, 0.5

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 10

// BOSSA NOVA

t = TempoClock(182/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 1, 1, 1,

1, 1, 1, 1

], 5),

\rate, 1

).play(t);

~cowbell = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1.5, 1.5, 2,

1.5, 1.5

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1.5, 0.5, 1.5, 0.5,

1.5, 0.5, 1.5, 0.5

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 11

// BAIAO

t = TempoClock(182/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1.5, 0.5, 1.5, 0.5,

1.5, 0.5, 1.5, 0.5

], 5),

\rate, 1

).play(t);

~cowbell = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

0.5, 0.5, 1.5, 0.5, 1.5,

0.5, 2, 1

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1.5, 1.5, 1,

1.5, 1.5, 1

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 12

// PARTIDO ALTO

t = TempoClock(108/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

0.5, 1.5, 0.5, 0.5, 1,

1, 1, 0.5, 0.5, 1

], 5),

\rate, 1

).play(t);

~cowbell = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

1, 3.5,

2.5, 1

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

2.5, 1, 2.5,

1, 1

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 13

// BATUCADA

t = TempoClock(182/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, a,

\dur, Pseq([

1, 2, 2,

2, 1

], 5),

\rate, 1

).play(t);

~cowbell1 = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1.5, 0.5, 1.5, 0.5,

1.5, 0.5, 1.5, 0.5

], 5),

\rate, 1

).play(t);

~cowbell2 = Pbind(

\instrument, “normal”,

\bufnum, c,

\dur, Pseq([

2, 1.5, 1,

1, 0.5, 2

], 5),

\rate, 1

).play(t);

~cowbell2 = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5,

0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5,

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 14

// BEGUINE

t = TempoClock(144/60);

{

~snare = Pbind(

\instrument, “normal”,

\bufnum, f,

\dur, Pseq([

0.5, 1, 1, 1, 0.5

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

2, 1, 1

], 5),

\rate, 1

).play(t);

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

1, 1, 1, 1

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 15

// TANGO

t = TempoClock(108/60);

{

~snare = Pbind(

\instrument, “normal”,

\bufnum, f,

\dur, Pseq([

1, 1, 1, 2,

1, 1, 1

], 5),

\rate, 1

).play(t);

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

1, 1, 1, 1,

2, 1, 1

], 5),

\rate, 1

).play(t);

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

3.5, 0.25, 0.25, 3.5, 0.25, 0.25

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 15

// BOLERO

t = TempoClock(96/60);

{

~snare = Pbind(

\instrument, “normal”,

\bufnum, f,

\dur, Pseq([

0.5, 0.166667, 0.166667, 0.166666,

0.5, 0.166667, 0.166667, 0.166666,

0.5, 0.5,

0.5, 0.166667, 0.166667, 0.166666,

0.5, 0.166667, 0.166667, 0.166666,

0.166667, 0.166667, 0.166666, 0.166667, 0.166667, 0.166666

], 5),

\rate, 1

).play(t);

}.fork(t);

// EXAMPLE 16

// REGGAE

t = TempoClock(120/60);

{

~tambourine = Pbind(

\instrument, “normal”,

\bufnum, e,

\dur, Pseq([

0.66667, 0.33333, 0.66667, 0.33333,

0.66667, 0.33333, 0.66667, 0.33333

], 5),

\rate, 1

).play(t);

2.wait;

~bassdrum = Pbind(

\instrument, “normal”,

\bufnum, b,

\dur, Pseq([

4

], 5),

\rate, 1

).play(t);

}.fork(t);

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

The Mathematics of Rhythm Copyright © by Elliott Grabill is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book