|
1 | | -import CodeBlock from "@/components/code-block" |
2 | | -import { Calendar, Clock, ArrowLeft } from "lucide-react" |
3 | | -import Link from "next/link" |
| 1 | +import CodeBlock from "@/components/code-block"; |
| 2 | +import { Calendar, Clock, ArrowLeft } from "lucide-react"; |
| 3 | +import Link from "next/link"; |
4 | 4 |
|
5 | 5 | export default function ArticlePage() { |
6 | 6 | return ( |
7 | 7 | <div className="max-w-4xl mx-auto px-4 py-8"> |
8 | 8 | <Link |
9 | 9 | href="/articles" |
10 | | - className="text-blue-400 hover:text-blue-300 inline-flex items-center gap-1 mb-8" |
| 10 | + className="text-amber-400 hover:text-amber-300 inline-flex items-center gap-1 mb-8" |
11 | 11 | > |
12 | 12 | <ArrowLeft size={16} /> |
13 | 13 | Back to Articles |
14 | 14 | </Link> |
15 | 15 |
|
16 | 16 | <article className="prose prose-invert max-w-none"> |
17 | 17 | <header className="mb-8"> |
18 | | - <h1 className="text-4xl font-bold mb-4">The Mathematics of Musical Patterns</h1> |
| 18 | + <h1 className="text-4xl font-bold mb-4"> |
| 19 | + The Mathematics of Musical Patterns |
| 20 | + </h1> |
19 | 21 | <div className="flex items-center gap-4 text-gray-400 text-sm mb-4"> |
20 | 22 | <div className="flex items-center gap-1"> |
21 | 23 | <Calendar size={14} /> |
22 | 24 | January 15, 2025 |
23 | 25 | </div> |
24 | 26 | <div className="flex items-center gap-1"> |
25 | | - <Clock size={14} /> |
26 | | - 8 min read |
| 27 | + <Clock size={14} />8 min read |
27 | 28 | </div> |
28 | 29 | </div> |
29 | 30 | <div className="flex gap-2 mb-6"> |
30 | | - <span className="bg-blue-900/50 text-blue-400 px-3 py-1 rounded-full text-sm">Mathematics</span> |
31 | | - <span className="bg-purple-900/50 text-purple-400 px-3 py-1 rounded-full text-sm">Patterns</span> |
32 | | - <span className="bg-green-900/50 text-green-400 px-3 py-1 rounded-full text-sm">Algorithms</span> |
| 31 | + <span className="bg-amber-900/50 text-amber-400 px-3 py-1 rounded-full text-sm"> |
| 32 | + Mathematics |
| 33 | + </span> |
| 34 | + <span className="bg-rose-900/50 text-rose-400 px-3 py-1 rounded-full text-sm"> |
| 35 | + Patterns |
| 36 | + </span> |
| 37 | + <span className="bg-green-900/50 text-green-400 px-3 py-1 rounded-full text-sm"> |
| 38 | + Algorithms |
| 39 | + </span> |
33 | 40 | </div> |
34 | 41 | </header> |
35 | 42 |
|
36 | 43 | <p className="text-xl text-gray-300 mb-8 leading-relaxed"> |
37 | | - Music and mathematics have been intertwined since ancient times. From the mathematical ratios |
38 | | - that define harmony to the fractal patterns found in Bach's compositions, understanding these |
39 | | - relationships can unlock new creative possibilities in algorithmic music generation. |
| 44 | + Music and mathematics have been intertwined since ancient times. From |
| 45 | + the mathematical ratios that define harmony to the fractal patterns |
| 46 | + found in Bach's compositions, understanding these relationships can |
| 47 | + unlock new creative possibilities in algorithmic music generation. |
40 | 48 | </p> |
41 | 49 |
|
42 | 50 | <h2>Fractals in Music Composition</h2> |
43 | 51 |
|
44 | 52 | <p> |
45 | | - Fractals are mathematical objects that exhibit self-similarity at different scales. In music, |
46 | | - we can apply fractal principles to create patterns that have structure across multiple time scales. |
| 53 | + Fractals are mathematical objects that exhibit self-similarity at |
| 54 | + different scales. In music, we can apply fractal principles to create |
| 55 | + patterns that have structure across multiple time scales. |
47 | 56 | </p> |
48 | 57 |
|
49 | 58 | <CodeBlock |
@@ -74,9 +83,9 @@ const clip = scribble.clip({ |
74 | 83 | <h2>Cellular Automata for Rhythm Generation</h2> |
75 | 84 |
|
76 | 85 | <p> |
77 | | - Cellular automata are discrete mathematical models that can generate complex patterns from |
78 | | - simple rules. Rule 30, for example, can create rhythmic patterns that feel both structured |
79 | | - and unpredictable. |
| 86 | + Cellular automata are discrete mathematical models that can generate |
| 87 | + complex patterns from simple rules. Rule 30, for example, can create |
| 88 | + rhythmic patterns that feel both structured and unpredictable. |
80 | 89 | </p> |
81 | 90 |
|
82 | 91 | <CodeBlock |
@@ -121,49 +130,65 @@ rhythmEvolution.forEach((pattern, index) => { |
121 | 130 | <h2>The Golden Ratio in Musical Structure</h2> |
122 | 131 |
|
123 | 132 | <p> |
124 | | - The golden ratio (φ ≈ 1.618) appears frequently in nature and has been used by composers |
125 | | - to create aesthetically pleasing musical structures. We can use this ratio to determine |
126 | | - optimal lengths for musical sections and phrase structures. |
| 133 | + The golden ratio (φ ≈ 1.618) appears frequently in nature and has been |
| 134 | + used by composers to create aesthetically pleasing musical structures. |
| 135 | + We can use this ratio to determine optimal lengths for musical |
| 136 | + sections and phrase structures. |
127 | 137 | </p> |
128 | 138 |
|
129 | 139 | <h2>Practical Applications</h2> |
130 | 140 |
|
131 | 141 | <p> |
132 | | - These mathematical concepts aren't just theoretical curiosities—they can be powerful tools |
133 | | - for creating music that feels both familiar and surprising. Here are some practical ways |
134 | | - to incorporate mathematical patterns into your compositions: |
| 142 | + These mathematical concepts aren't just theoretical curiosities—they |
| 143 | + can be powerful tools for creating music that feels both familiar and |
| 144 | + surprising. Here are some practical ways to incorporate mathematical |
| 145 | + patterns into your compositions: |
135 | 146 | </p> |
136 | 147 |
|
137 | 148 | <ul> |
138 | | - <li><strong>Fractal melodies</strong> for creating coherent themes across different time scales</li> |
139 | | - <li><strong>Cellular automata</strong> for generating evolving rhythmic patterns</li> |
140 | | - <li><strong>Prime number sequences</strong> for creating non-repeating but structured patterns</li> |
141 | | - <li><strong>Fibonacci numbers</strong> for determining phrase lengths and structural proportions</li> |
| 149 | + <li> |
| 150 | + <strong>Fractal melodies</strong> for creating coherent themes |
| 151 | + across different time scales |
| 152 | + </li> |
| 153 | + <li> |
| 154 | + <strong>Cellular automata</strong> for generating evolving rhythmic |
| 155 | + patterns |
| 156 | + </li> |
| 157 | + <li> |
| 158 | + <strong>Prime number sequences</strong> for creating non-repeating |
| 159 | + but structured patterns |
| 160 | + </li> |
| 161 | + <li> |
| 162 | + <strong>Fibonacci numbers</strong> for determining phrase lengths |
| 163 | + and structural proportions |
| 164 | + </li> |
142 | 165 | </ul> |
143 | 166 |
|
144 | 167 | <h2>Conclusion</h2> |
145 | 168 |
|
146 | 169 | <p> |
147 | | - Mathematics provides a rich toolkit for algorithmic composition. By understanding and |
148 | | - applying these concepts, we can create music that has both the complexity of natural |
149 | | - phenomena and the intentionality of human creativity. The key is finding the right |
150 | | - balance between mathematical structure and musical expression. |
| 170 | + Mathematics provides a rich toolkit for algorithmic composition. By |
| 171 | + understanding and applying these concepts, we can create music that |
| 172 | + has both the complexity of natural phenomena and the intentionality of |
| 173 | + human creativity. The key is finding the right balance between |
| 174 | + mathematical structure and musical expression. |
151 | 175 | </p> |
152 | 176 |
|
153 | 177 | <div className="bg-gray-800/50 rounded-lg p-6 mt-8"> |
154 | 178 | <h3 className="text-lg font-semibold mb-3">Try It Yourself</h3> |
155 | 179 | <p className="text-gray-300 mb-4"> |
156 | | - Experiment with these mathematical concepts in your own compositions. Start with simple |
157 | | - patterns and gradually increase complexity as you become comfortable with the techniques. |
| 180 | + Experiment with these mathematical concepts in your own |
| 181 | + compositions. Start with simple patterns and gradually increase |
| 182 | + complexity as you become comfortable with the techniques. |
158 | 183 | </p> |
159 | 184 | <Link |
160 | 185 | href="/projects/scribbletune/documentation/getting-started/installation" |
161 | | - className="text-blue-400 hover:text-blue-300 inline-flex items-center gap-1" |
| 186 | + className="text-amber-400 hover:text-amber-300 inline-flex items-center gap-1" |
162 | 187 | > |
163 | 188 | Get Started with Scribbletune |
164 | 189 | </Link> |
165 | 190 | </div> |
166 | 191 | </article> |
167 | 192 | </div> |
168 | | - ) |
| 193 | + ); |
169 | 194 | } |
0 commit comments