You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
709 B
Plaintext
34 lines
709 B
Plaintext
(
|
|
{
|
|
var primes, interval, seq;
|
|
// Define a list of prime numbers
|
|
primes = [2, 3, 5, 7, 11, 13, 17, 19];
|
|
|
|
// Use primes to define a rhythmic pattern
|
|
seq = Pseq(primes, inf); // Repeat indefinitely
|
|
|
|
// Trigger a note every prime number of beats
|
|
Pbind(
|
|
\freq, 60.midicps,
|
|
\dur, seq,
|
|
\amp, 0.1
|
|
).play;
|
|
}.fork;
|
|
)
|
|
|
|
|
|
(
|
|
{
|
|
var primes, pitchSeq, sig;
|
|
primes = [2, 3, 5, 7, 11]; // List of primes
|
|
pitchSeq = Pseq(primes, inf).collect { |prime| 60 + prime }; // Map primes to pitch offsets
|
|
|
|
// Create a sequence of pitches based on the primes
|
|
Pbind(
|
|
\freq, pitchSeq.midicps,
|
|
\dur, 0.5,
|
|
\amp, 0.1
|
|
).play;
|
|
}.fork;
|
|
)
|