From 8e6194071e1610df55a436300687e93d34bb6129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Pluta?= Date: Fri, 20 Sep 2019 14:56:25 +0200 Subject: [PATCH] Add new example: Praeludium C Major - J. S. Bach --- examples/bach_prelude_c.mus | 198 ++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 examples/bach_prelude_c.mus diff --git a/examples/bach_prelude_c.mus b/examples/bach_prelude_c.mus new file mode 100644 index 0000000..1e977fa --- /dev/null +++ b/examples/bach_prelude_c.mus @@ -0,0 +1,198 @@ +println("Praeludium C Major"); +println("Acht kleine Praeludien und Fugen"); +println("Johann Sebastian Bach"); + +config = { + overtones -> flat([0.5, 0.3, 5^0.0, 0.1, 3^0.0, 0.05, 0.0, 0.03, 0.0, 0.0, 0.01, 5^0.0, 0.005, 3^0.0, 0.002, 0.0, 0.001]), + decay -> 2, + attack -> 0, + tuning -> 432 +}; + +s1 = [16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @h:16, @c5:16, @e, 4]; +s2 = [16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @h:16, @c5:16, @a:16, @f:16, @e:16, @f:16, @c:16, @f:16, @e:16, @f:16]; +s3 = [@d:16, @d5:16, @c5:16, @d5:16, @a:16, @d5:16, @c5:16, @d5:16, @h:16, @g:16, @f#:16, @g:16, @d:16, @g:16, @f#:16, @g:16]; +s4 = [@e:16, @e5:16, @d5:16, @e5:16, @h:16, @e5:16, @d5:16, @e5:16, @c5:16, @a:16, @g#:16, @a:16, @e:16, @a:16, @g#:16, @a:16]; + +s5 = flat(2 ^ [@c5, @f#, @e, @f#], 2 ^ [@h, @g, @f#, @g]) as n ^ n.withDuration(16); +s6 = flat(2 ^ [@h, @e, @d, @e], 2 ^ [@a, @f#, @e, @f#]) as n ^ n.withDuration(16); +s7 = flat(2 ^ [@a, @d, @c, @d], 2 ^ [@g, @e, @d, @e]) as n ^ n.withDuration(16); +s8 = flat(2 ^ [@g, @c#, @h3, @c#], 2 ^ [@f#, @d, @c#, @d]) as n ^ n.withDuration(16); + +s9 = [@g, @f#, @g, @d, @a, @g, @a, @d, @h, @a, @h, @d, @c5, @h, @c5, @d] as n ^ n.withDuration(16); +s10 = [@d5:4d, @d5:8, @e5:16, @g5:16, @d5:16, @g5:16, @c5:16, @g5:16, @h:16, @g5:16]; +s11 = [@a, 8, @h:8, @c5:16, @d5:16, @h:16, @c5:16, @a:8d, @g:16]; +s12 = [@g, 4, 2]; + +S1 = s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + +# +a1 = [2, 16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @h:16, @c5:16]; +a2 = [@g, 8, @c5:8, @c5, 4]; +a3 = [@a, 8, @d5:8, @d5, 4]; +a4 = [@h, 8, @e5:8, @e5, 4]; + +a5 = 8 ^ @d5:8; +a6 = 8 ^ @c5:8; +a7 = 8 ^ @h:8; +a8 = 8 ^ @a:8; +a9 = [@h, @a, @g, @a]; +a10 = [@h:16, @d5:16, @e5:16, @f#5:16, @h5:8, @g5:8, @g5:2]; +a11 = [@g5:8, @f#5:16, @e5:16, @f#5:8, @g5:8, @a5:8, @g5:8, @d5]; +a12 = [@d5, 4, 2]; + +A1 = transpose(-12, a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12); + +# +t1 = [1]; +t2 = [@e, 8, @g:8, @a, 4]; +t3 = [@f#, 8, @a:8, @h, 4]; +t4 = [@g#, 8, @h:8, @c5, 4]; +t5 = (4 ^ @a:8) + (4 ^ @h:8); +t6 = (4 ^ @g:8) + (4 ^ @a:8); +t7 = (4 ^ @f#:8) + (4 ^ @g:8); +t8 = (4 ^ @e:8) + (4 ^ @f#:8); +t9 = [@e, @f#, @g, @f#]; +t10 = [@g, @g5:8, @h:8, @c5:8, @h:8, @a:8, @g:8]; +t11 = [@d5, 8, @d5:8, @d5:8, @d5:8, @d5]; +t12 = [@h, 4, 2]; + +T1 = transpose(-12, t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10 + t11 + t12); + +# +b_ = 10 ^ 1; +b11 = [2, 8, @g3, @f#3:8]; +b12 = [16, @g3:16, @f#3:16, @g3:16, @d3:16, @g3:16, @f#3:16, @g3:16, @g2, 4]; + +B1 = b_ + b11 + b12; + +# +p1 = [@c:1]; +p2 = [@c, 8, @e:8, @f, 4]; +p3 = [@f#, 8, @f#:8, @g, 4]; +p4 = [@g#, 8, @g#:8, @a, 4]; +p5 = (4 ^ @d:8) + (4 ^ @g:8); +p6 = (4 ^ @c:8) + (4 ^ @f#:8); +p7 = (4 ^ @h3:8) + (4 ^ @e:8); +p8 = (4 ^ @a3:8) + (4 ^ @d:8); +p9 = [@d:1]; +p10 = [@d, 4, 2]; +p11 = [4, 8, @g:8, @f#:8, @g:8, @d]; +p12 = [@g3, 4, 16, @g:16, @f:16, @g:16, @e:16, @g:16, @d:16, @g:16]; + +P1 = transpose(-12, p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + p9 + p10 + p11 + p12); + +PART1 = wave(config, S1, A1, T1, B1, P1); + +####### + +s1 = [16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @h:16, @c5:16, @a, 4]; +s2 = [16, @h:16, @a:16, @h:16, @f:16, @h:16, @a:16, @h:16, @g#, 4]; +s3 = flat([2 ^ [@a, @e, @d, @e], 2 ^ [@g#, @d, @c, @d]]) as n ^ n.withDuration(16); +s4 = flat([2 ^ [@a, @e, @d, @e], 2 ^ [@h, @g#, @f#, @g#]]) as n ^ n.withDuration(16); + +s5 = [@c5, @h, @c5, @d5, @h, @a, @h, @c5] as n ^ n.withDuration(8); +s6 = [@a:8, @g#:8, @a:8, @h:8, @g#:8, @e:8, @c5]; +s7 = [@h:8, @a:8, @g#:8d, @a:16, @a, 4]; +s8 = [16, @e5:16, @d5:16, @e5:16, @h:16, @e5:16, @d5:16, @e5:16, @c5, 4]; +s9 = [16, @g5:16, @f5:16, @g5:16, @d5:16, @g5:16, @f5:16, @g5:16, @e5:16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @h:16, @c5:16]; + +s10 = [@e, 4, 16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @h:16, @c5:16]; +s11 = flat(2 ^ [@a:16, @f:16, @e:16, @f:16], [16, @d5:16, @c5:16, @d5:16, @a:16, @d5:16, @c5:16, @d5:16]); +s12 = flat(2 ^ [@h:16, @g:16, @f#:16, @g:16], [16, @e5:16, @d5:16, @e5:16, @h:16, @e5:16, @d5:16, @e5:16]); +s13 = flat(2 ^ [@c5:16, @a:16, @g#:16, @a:16], [16, @g5:16, @f5:16, @g5:16, @d5:16, @g5:16, @f5:16, @g5:16]); + +s14 = [@e, @g, @e, @g, @f, @a, @f, @a, @d, @f, @d, @f, @e, @g, @e, @g] as n ^ n.withDuration(16).withOctave(5); +s15 = [@c5:16, @e5:16, @c5:16, @e5:16, @d5:16, @f5:16, @d5:16, @f5:16, @h:16, @g:16, @a:16, @h:16, @c5]; +s16a = [@c5, @h, @c5, 4]; +s16b = [@c5, @h, @c5:2]; + +S2 = s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + s15; + +# +a1 = [@g, 4, @f5, 4]; +a2 = [@f, 4, @e5, 4]; +a3 = flat(2 ^ [@c, @c5, @h, @c5], 2 ^ [@e, @e5, @d5, @e5]) as n ^ n.withDuration(16); +a4 = flat(2 ^ [@c, @c5, @h, @c5], 2 ^ [@e, @e5, @d5, @e5]) as n ^ n.withDuration(16); + +a5 = [@a, @c5, @g#, @c5, @a, @c5, @f#, @d5, @g, @d5, @f#, @d5, @g, @d5, @e, @e5] as n ^ n.withDuration(16); +a6 = [@f:16, @c5:16, @e:16, @c5:16, @f:16, @c5:16, @d:16, @h:16, @h, 8, @a5:8]; +a7 = [@f5, @e, @e, 4]; +a8 = (4 ^ @e5:8) + [@e5, 4]; +a9 = (4 ^ @d5:8) + [@c5, 4]; + +a10 = [16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @h:16, @c5:16, @c5, 8, @c5:8]; +a11 = (4 ^ @c5:8) + [@d, 8, @d:8]; +a12 = (4 ^ @d5:8) + [@e, 8, @e:8]; +a13 = (4 ^ @e5:8) + [@g5, 8, @g5:8]; +a14 = [@c, @e, @c, @e, @c, @f, @c, @f, @h3, @d, @h3, @d, @h3, @e, @h3, @e] as n ^ n.withDuration(16).withOctave(5); +a15 = [@a:16, @c5:16, @a:16, @c5:16, @a:16, @d5:16, @a:16, @d5:16, @g:2]; +a16a = [@g:2, @c, 4]; +a16b = [@g:2, @g:2]; + +A2 = transpose(-12, a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12 + a13 + a14 + a15); + +# +t1 = [@e, 4, 16, @f:16, @e:16, @f:16, @c:16, @f:16, @e:16, @f:16]; +t2 = [@d, 4, 16, @e:16, @d:16, @e:16, @h3:16, @e:16, @d:16, @e:16]; +t3 = [1]; +t4 = [1]; + +t5 = [1]; +t6 = [2, @e, 8, @e5:8]; +t7 = [2, 16, @a:16, @g#:16, @a:16, @e:16, @a:16, @g#:16, @a:16]; +t8 = (4 ^ @h:8) + [16, @h:16, @g#:16, @a:16, @e:16, @a:16, @g#:16, @a:16]; +t9 = (4 ^ @h:8) + [@g, 4]; + +t10 = [2, @g, 8, @g:8]; +t11 = (4 ^ @a:8) + [@a, 8, @a:8]; +t12 = (4 ^ @h:8) + [@h, 8, @h:8]; +t13 = (4 ^ @c5:8) + [@d5, 8, @d5:8]; + +t14 = [1]; +t15 = [2, @d5, 16, @e5:16, @d5:16, @c5:16]; +t16a = [@g5:4d, @f:8, @g ,4]; +t16b = [@g5:4d, @f:8, @e:2]; + +T2 = transpose(-12, t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10 + t11 + t12 + t13 + t14 + t15); + +# +b_1 = 6 ^ 1; +b7 = [@d5:8, @c5:8, @h, @c5, 4]; +b_2 = 8 ^ 1; +b16a = [@d:2, @e, 4]; +b16b = [@d:2, @e:2]; + +B2 = transpose(-12, b_1 + b7 + b_2); + +# +p1 = [@c, 4, @f, 4]; +p2 = [@h3, 4, @e, 4]; +p3 = [@c, 4, @h3, 4]; +p4 = [@c, 4, @e, 4]; + +p5 = [@a, 4, 2]; +p6 = [2, 4, 8, @a:8]; +p7 = [@d, @e, @a3, 4]; +p8 = (4 ^ @g#3:8) + [@a3, 4]; +p9 = (4 ^ @h3:8) + [@c, 4]; + +p10 = [2, @c, 8, @e:8]; +p11 = (4 ^ @f:8) + [@f#, 8, @f#:8]; +p12 = (4 ^ @g:8) + [@g#, 8, @g#:8]; +p13 = (4 ^ @a:8) + [@h, 8, @h:8]; + +p14 = [@c5, @a, @h, @g]; +p15 = [@a, @f, @g:2]; +p16a = [@g:2, 16, @c5:16, @h:16, @c5:16, @g:16, @c5:16, @e:16, @g:16]; +p16b = [@g:2, @c:2]; + +P2 = transpose(-12, p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + p9 + p10 + p11 + p12 + p13 + p14 + p15); + +PART2 = wave(config, S2, A2, T2, B2, P2); +PART2a = PART2 + wave(config, s16a, a16a, t16a, b16a, p16a); +PART2b = PART2 + wave(config, s16b, a16b, t16b, b16b, p16b); + +MUSIC = PART1 + PART1 + PART2a + PART2b; + +synth(MUSIC); \ No newline at end of file