Skip to content

Commit b5cc268

Browse files
committed
Add segments for plugins, projects & articles
1 parent bf43797 commit b5cc268

13 files changed

Lines changed: 361 additions & 245 deletions

File tree

app/(articles)/articles/mathematics-of-musical-patterns/page.tsx

Lines changed: 61 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,58 @@
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";
44

55
export default function ArticlePage() {
66
return (
77
<div className="max-w-4xl mx-auto px-4 py-8">
88
<Link
99
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"
1111
>
1212
<ArrowLeft size={16} />
1313
Back to Articles
1414
</Link>
1515

1616
<article className="prose prose-invert max-w-none">
1717
<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>
1921
<div className="flex items-center gap-4 text-gray-400 text-sm mb-4">
2022
<div className="flex items-center gap-1">
2123
<Calendar size={14} />
2224
January 15, 2025
2325
</div>
2426
<div className="flex items-center gap-1">
25-
<Clock size={14} />
26-
8 min read
27+
<Clock size={14} />8 min read
2728
</div>
2829
</div>
2930
<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>
3340
</div>
3441
</header>
3542

3643
<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.
4048
</p>
4149

4250
<h2>Fractals in Music Composition</h2>
4351

4452
<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.
4756
</p>
4857

4958
<CodeBlock
@@ -74,9 +83,9 @@ const clip = scribble.clip({
7483
<h2>Cellular Automata for Rhythm Generation</h2>
7584

7685
<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.
8089
</p>
8190

8291
<CodeBlock
@@ -121,49 +130,65 @@ rhythmEvolution.forEach((pattern, index) => {
121130
<h2>The Golden Ratio in Musical Structure</h2>
122131

123132
<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.
127137
</p>
128138

129139
<h2>Practical Applications</h2>
130140

131141
<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:
135146
</p>
136147

137148
<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>
142165
</ul>
143166

144167
<h2>Conclusion</h2>
145168

146169
<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.
151175
</p>
152176

153177
<div className="bg-gray-800/50 rounded-lg p-6 mt-8">
154178
<h3 className="text-lg font-semibold mb-3">Try It Yourself</h3>
155179
<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.
158183
</p>
159184
<Link
160185
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"
162187
>
163188
Get Started with Scribbletune
164189
</Link>
165190
</div>
166191
</article>
167192
</div>
168-
)
193+
);
169194
}

0 commit comments

Comments
 (0)