MM – Koji Kondo’s Zelda’s select theme.

This one plays the select theme from The Legend of Zelda.

Original Music by Koji Kondo / Nintendo.

This can be useful to teach how to compose using Pbinds.

//MM Zelda select theme. 2020 Matias Monteagudo. Original music by Koji Kondo, NINTENDO.

//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.

((
SynthDef(\FreeVerb2x2, { |out, mix = 0.25, 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,0.8], addAction:\addToTail);
)

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

//The Synth.
(
SynthDef(\tri, {
	|gate=1, amp=1, freq=200, panpos=0, envdur=1|
	var sig, pan;
	sig=LFTri.ar(freq,0,EnvGen.ar(Env.perc(0.001,envdur,amp,-15),gate,doneAction:2));
		pan=Pan2.ar(sig,panpos,1);
		Out.ar(0,pan)
}).add
)

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

//Start song. Note the Pseq at the bottom. Phrase1 comes first then Phrase2 joins in. Then both play infinitely until var "~lane1" and "~lane2" are stopped.
//In this case, each value or rest represents a 16th note.
//Note the empty phrase is set to play 1 time instead of "inf"

(
TempoClock.tempo=80/60;
//Phrase 1
(
~p1=Pbindef(\a, \instrument, \tri, \gate,1, \envdur,1.8, \amp,0.3, \panpos, 0.5,  \dur,0.25, \scale, Scale.chromatic, \octave,7,
	\degree, Pseq([
		10,3,-1,-4, 8, 3,-1,-4, 7, 3,-1,-4, 8, 3,-1,-4, //Bar1
		8,1,-2,-6,6,1,-2,-6,5,1,-2,-6,6,1,-2,-6, //Bar2
		6,-1,-4,-7,5,-1,-4,-7,4,-1,-4,-7,5,-1,-4,-7, //Bar3
		5,-2,-6,-9,3,-2,-6,-9,2,-2,-6,-9,3,-2,-6,-9, //Bar4
		10,3,-1,-4, 8, 3,-1,-4, 7, 3,-1,-4, 8, 3,-1,-4, //Bar5
		11,4,1,-5,10,4,1,-5,9,4,1,-5,10,4,1,-5, //Bar6
		13,3,-1,-4,11,3,-1,-4,10,3,-1,-4,11,3,-1,-4, //Bar7
		10,3,-1,-7,8,3,-1,-7,6,3,-1,-7,5,3,-1,-7 //Bar8
		],inf),
));
//Phrase2
(
~p2=Pbindef(\b, \instrument, \tri, \gate,1, \envdur,4, \amp,0.5, \panpos, -0.5, \dur,0.25, \scale, Scale.chromatic, \octave,4,
	\degree, Pseq(#[
		-1,11,15,22,rest,rest,rest,rest,
		rest,11,22,20,25,22,20,15,
		-2,10,13,20,rest,rest,rest,rest,
		-2,rest,20,18,25,20,18,15,
		-4,8,11,18,rest,rest,rest,rest,
		-4,8,18,17,20,17,13,11,
		-6,6,10,17,rest,rest,rest,rest,
		-6,6,17,15,20,18,25,23,
		-1,11,15,22,rest,rest,rest,rest,
		-1,11,22,20,27,22,20,15,
		-2,10,13,25,rest,rest,rest,rest,
		3,15,25,22,28,27,25,22,
		-4,8,15,23,rest,rest,rest,rest,
		-4,8,23,22,25,23,20,15,
		1,13,20,23,rest,rest,rest,rest,
		1,13,23,20,29,27,32,29,
		],inf),
));
//Empty phrase.
(
~ep=Pbindef(\c, \dur,0.25,
	\degree, Pseq(#[
		rest
		],128),
));

(
~lane1=Pseq([~p1],inf).play;
~lane2=Pseq([~ep,~p2],inf).play;
)
)

//Stop song.

(
~lane1.stop;
~lane2.stop;
)
Author
418 PM
  • Platform:
  • Category: Composition Game
  • Revision: 1.0
  • License: GNU General Public License family
  • Views: 167
  • Modified: 5 months ago
Chat about this patch on Discord!
Appreciate 1

Leave a Reply