In my last blog I looked at the possibility of live Jamming with SuperCollider. I explained that you can use sections of code and Logic and create my rhythm, lead, melody and even drum parts of a piece of music. With the clever use of Ppar and Pdefs elaborate groups of code can be simplified brought together and played all at the same time.
Lets look at Pdefs, this stands for ‘Pattern define’ and it summarises the code you write out into a single word.
Example of a Pdef:
Pdef(\example, Pbind( *************).play
This means that everytime I want to play the code specified above between the Pbind brackets I need only write Pdef(\example).play this can be very handy when simplifying large groups of code and makes it ever easier when sequencing it all.
Ppar stands for “Pattern Parrallel” and basically allows you to run 2 or more Pdefs at the same time.
Example of a Ppar:
Ppar([Pdef(\example), Pdef(\example2), Pdef(\example3)],1).play
Notice how the Ppar contains 3 different Pdefs and they are written in a list using the [] square brackets this means that every thing contained within this list will play together, the number 1 at the end represents how many times I want the sequence to play through in this case once. With code shown in my previous blog the sequences have infinite written as “inf” number of \degrees this means the Pattern will play each chosen \degree simultaneously infinitely but this does not always have to be I could ask the sequence of \degrees to play through once or twice and so on. If I had chosen each part to play once through then using this Ppar it will ask all 3 examples to play once through each in unison.
This brings me over to ++ these two plus symbols are SC’s way of separating parts in a composition a means of sequencing all the different tracks and creating a composition.
Example of ++
(
(Ppar([Pdef(\example), Pdef(\example2), Pdef(\example3)],1)
++
Ppar([Pdef(\example), Pdef(\example3)],1)
).play
)
So the first group of Pdefs will each play through once when each track has finished the second group of Pdefs will begin and play through once the list can go on as long as you like. Through this you can easily create Intro, Verse 1, Verse 2, Chorus parts etc etc which all look presentable easy to read and can easily be changed at the click of a mouse.
0 Responses to “A look @ Ppars, Pdefs and ++”