MM – Non symmetric live coding example.

A small example of non symmetrical patterns and how to lay down multi-pattern compositions for live use. (my style)

It covers Pbinds and also Pdefn so you can variate patterns on the fly without having to restart the Pbinds.


In the context of a live concert, with different and better SynthDefs (samples maybe?):

Imagine someone playing e-violin with delay and you’ll have something Jean-Luc Ponty style.

Add a small choir making repeated notes forming a chord and it will sound like something from Steve Reich’s “Desert Music”.

You get the idea.

//MM Non symmetric live coding example. 2020 Matias Monteagudo.

//My interface options. Change at will.

(
Server.local.options.device = "ASIO : ASIO PreSonus FireStudio";
Server.local.options.sampleRate=48000;
Server.local.options.hardwareBufferSize=128;
)

//Add reverb first.

(
~rev.free;
(
SynthDef(\FreeVerb2x2, { |out, mix = 0.22, room = 0.15, damp = 0.5, amp = 1.0|
    var signal;
    signal = In.ar(out, 2);
    ReplaceOut.ar(out,
        FreeVerb2.ar( // FreeVerb2 - true stereo UGen
            signal[0], // Left channel
            signal[1], // Right Channel
            mix, room, damp, amp
        )
    ); // same params as FreeVerb 1 chn version
}).add;
);
~rev = Synth(\FreeVerb2x2, [\outbus, 0,\room,1], addAction:\addToTail);
)

~rev.free;//Stop reverb if you want.

//The Synth. Simple "bell" style sound.
(
SynthDef(\tri, {
	|gate=1, amp=1, freq=200, panpos=0, envdur=4|
	var sig1,sig2,pan;
	sig1=LFTri.ar(freq-2.5,0,EnvGen.ar(Env.perc(0.001,envdur,amp,-15),gate,doneAction:2));
	sig2=LFTri.ar(freq+2.5,0,EnvGen.ar(Env.perc(0.001,envdur,amp,-15),gate,doneAction:2));
	pan=Balance2.ar(sig1,sig2,panpos,1);
	Out.ar(0,pan)
}).add
)

Synth(\tri, [\panpos, 0])

//Set tempo.
TempoClock.tempo=80/60;

//Phrases.
//Note that uneven phrases yields overlapping at different positions. (Steve Reich's "out of phase" style music)

//Let's start by defining things first. (all play/stop buttons are at the bottom)

//Phrase 1
(
Pdefn(\p1degree, Pseq([5,3,-1,-4,8,3,1,6,3,10,3],inf));//By defining what an argument is, such as "what is \p1degree" in this line you can vary them later on the fly without restarting the Pbind.
Pdefn(\p1dur, 0.25);//Same here.
(
~p1=Pbindef(\a, \instrument, \tri, \gate,1, \envdur,1.8, \amp,0.2, \panpos, 0.7, \scale, Scale.chromatic, \octave,6, \ctranspose, 2,
	\degree, Pdefn(\p1degree), //Here you put your definition proxy. Here you say "\degree is equal to what I stated above"
	\dur, Pdefn(\p1dur) //Same here.
));
)

// Original phrases. I like to put original phrases here (the exact ones defined at the begining) so I can go back to them without having to restart the Pbind.
Pdefn(\p1degree, Pseq([5,3,-1,-4,8,3,1,6,3,10,3],inf));
Pdefn(\p1dur, 0.25);
//Variations
Pdefn(\p1degree, Prand([5,3,-1,-4,8,3,1,6,3,10,3],inf)); //Here you say, "In the above Pbind, now \degree is this"
Pdefn(\p1dur, 0.125); //Same here.

//Phrase 2
(
Pdefn(\p2degree, Pseq(#[5,8,15,20,22,23,20,22,25],inf));
(	
~p2=Pbindef(\b, \instrument, \tri, \gate,1, \envdur,2, \amp,0.3, \panpos, -0.7, \dur,0.25, \scale, Scale.chromatic, \octave,4, \ctranspose, 2,
			\degree, Pdefn(\p2degree)
));
)
//Original phrase.
Pdefn(\p2degree, Pseq(#[5,8,15,20,22,23,20,22,25],inf));
// Variation
Pdefn(\p2degree, Prand(#[5,8,15,20,22,23,20,22,25],inf));

//Phrase 3
//Note the different duration on the first two notes.
(
Pdefn(\p3degree, Pseq(#[18,20,8,11,13,15,17,11,10],inf));
Pdefn(\p3dur, Pseq([0.25,0.25,0.5,0.5,0.5,0.5,0.5,0.5,0.5],inf));
(
~p3=Pbindef(\c, \instrument, \tri, \gate,1, \envdur,2, \amp,0.3, \panpos, 0, \scale, Scale.chromatic, \octave,3, \ctranspose, 2,
			\degree, Pdefn(\p3degree),
			\dur, Pdefn(\p3dur),
));
)
//Original phrase. //Note you can evaluate many at once. (by using brackets or selecting the lines manually)
(
Pdefn(\p3degree, Pseq(#[18,20,8,11,13,15,17,11,10],inf));
Pdefn(\p3dur, Pseq([0.25,0.25,0.5,0.5,0.5,0.5,0.5,0.5,0.5],inf));
)
//Variation
(
Pdefn(\p3degree, Prand(#[18,20,8,11,13,15,17,11,10]+12,inf));
Pdefn(\p3dur, Prand([0.25,0.25,0.5,0.5,0.5,0.5,0.5,0.5,0.5],inf));
)

//Phrase 4
//Note notes and durations don't need to be equal.
(
Pdefn(\p4degree, Pseq(#[18,20,8,11,13,15,17,11,10],inf));
Pdefn(\p4dur, Pseq([1,1,1,0.5,0.25,0.125,0.125,0.25,0.25],inf));

(
~p4=Pbindef(\d, \instrument, \tri, \gate,1, \envdur,0.4, \amp,1.3, \panpos, 0, \scale, Scale.chromatic, \octave,2, \ctranspose, 2,
			\degree, Pdefn(\p4degree),
			\dur, Pdefn(\p4dur),
));
)
// Original phrase
(
Pdefn(\p4degree, Pseq(#[18,20,8,11,13,15,17,11,10],inf));
Pdefn(\p4dur, Pseq([1,1,1,0.5,0.25,0.125,0.125,0.25,0.25],inf));
)
//Variation
(
Pdefn(\p4degree, Pseq(#[18,20,8,11,13,15,17,11,10].mirror,inf));
Pdefn(\p4dur, Prand([1,1,1,0.5,0.25,0.125,0.125,0.25,0.25],inf));
)

//Phrase 5
(
Pdefn(\p5degree, Pseq(#[20,17,13,18,15,11,17,13,10,15,11,8,6],inf));
Pdefn(\p5dur, 0.75);
(	
	~p5=Pbindef(\e, \instrument, \tri, \gate,1, \envdur,8, \amp,0.07, \scale, Scale.chromatic, \octave,7, \ctranspose, 2,
		\degree, Pdefn(\p5degree),
		\panpos, Pwhite(-1,1),
		\dur, Pdefn(\p5dur),
));
)
(
//Original phrase.
Pdefn(\p5degree, Pseq(#[20,17,13,18,15,11,17,13,10,15,11,8,6],inf));
Pdefn(\p5dur, 0.75);
)
//Variation.
(
Pdefn(\p5degree, Prand(#[20,17,13,18,15,11,17,13,10,15,11,8,6],inf));
Pdefn(\p5dur, 0.25);
)

//Phrase 6
(
Pdefn(\p6degree,  Pseq(#[20,17,13,18,15,11,17,13,10,15,11,8,6],inf));
Pdefn(\p6dur, 1.25);
(
~p6=Pbindef(\f, \instrument, \tri, \gate,1, \envdur,8, \amp,0.07, \scale, Scale.chromatic, \octave,6, \ctranspose, 2,
	\degree, Pdefn(\p6degree),
	\panpos, Pwhite(-1,1),
	\dur, Pdefn(\p6dur)
));
)
//Original phrase.
(
Pdefn(\p6degree,  Pseq(#[20,17,13,18,15,11,17,13,10,15,11,8,6],inf));
Pdefn(\p6dur, 1.25);
)
// Variation.
(
Pdefn(\p6degree,  Prand(#[20,17,13,18,15,11,17,13,10,15,11,8,6],inf));
Pdefn(\p6dur, Prand([1.75, 1.25, 0.25, 0.5],inf));
)

//Start patterns one by one. You don't need to start them in order.

~p1.play;
~p2.play;
~p3.play;
~p4.play;
~p5.play;
~p6.play;

//Stop patterns. Same thing.

~p1.stop;
~p2.stop;
~p3.stop;
~p4.stop;
~p5.stop;
~p6.stop;
Author
391 PM
  • Platform:
  • Category: Composition Sequencer
  • Revision: 1.0
  • License: GNU General Public License family
  • Views: 227
  • Modified: 4 months ago
Chat about this patch on Discord!
Appreciate

Leave a Reply