-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
318 lines (299 loc) · 15.8 KB
/
Copy pathindex.html
File metadata and controls
318 lines (299 loc) · 15.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MidiGen | Python MIDI Music Generation Library</title>
<meta name="description" content="Object-oriented MIDI generation with music theory support. Create songs with chord progressions, scales, melodies, and drums in Python.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #030014;
--text: #ffffff;
--accent-1: #a855f7;
--accent-2: #ec4899;
--accent-3: #f59e0b;
--card-bg: rgba(168, 85, 247, 0.08);
--card-border: rgba(168, 85, 247, 0.2);
}
html { scroll-behavior: smooth; }
body {
font-family: 'Space Grotesk', -apple-system, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
overflow-x: hidden;
}
code, pre { font-family: 'JetBrains Mono', monospace; }
.bg-gradient {
position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
}
.bg-gradient::before {
content: ''; position: absolute; width: 150%; height: 150%; top: -25%; left: -25%;
background:
radial-gradient(ellipse at 20% 30%, rgba(168, 85, 247, 0.3) 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
radial-gradient(ellipse at 50% 80%, rgba(245, 158, 11, 0.15) 0%, transparent 50%);
animation: gradient-shift 20s ease-in-out infinite;
}
@keyframes gradient-shift {
0%, 100% { transform: translate(0, 0) rotate(0deg); }
50% { transform: translate(2%, 2%) rotate(1deg); }
}
.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }
/* Header */
.site-header {
position: fixed; top: 0; left: 0; right: 0; z-index: 100;
padding: 16px 24px;
background: rgba(3, 0, 20, 0.8);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.site-header .container {
display: flex; justify-content: space-between; align-items: center;
}
.site-header a { text-decoration: none; color: inherit; }
.site-header .brand {
font-weight: 600; font-size: 1rem; color: rgba(255,255,255,0.9);
transition: color 0.2s;
}
.site-header .brand:hover { color: var(--accent-1); }
.site-header .nav-links {
display: flex; align-items: center; gap: 24px;
}
.site-header .nav-link {
color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color 0.2s;
}
.site-header .nav-link:hover { color: white; }
.site-header .github-link {
color: rgba(255,255,255,0.6); transition: color 0.2s;
}
.site-header .github-link:hover { color: white; }
.hero {
min-height: 70vh; display: flex; flex-direction: column; justify-content: center;
padding: 120px 0 60px; text-align: center;
}
.logo { font-size: 4rem; margin-bottom: 16px; }
.hero h1 {
font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; margin-bottom: 16px;
background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero .tagline {
font-size: 1.25rem; color: rgba(255,255,255,0.7); max-width: 600px; margin: 0 auto 32px;
}
.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.badge {
padding: 8px 16px; background: var(--card-bg); border: 1px solid var(--card-border);
border-radius: 999px; font-size: 0.85rem; color: var(--accent-1);
}
.buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
border-radius: 12px; font-size: 1rem; font-weight: 600; text-decoration: none;
transition: all 0.3s ease;
}
.btn-primary {
background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: white;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3); }
.btn-secondary {
background: var(--card-bg); color: white; border: 1px solid var(--card-border);
}
.btn-secondary:hover { border-color: var(--accent-1); }
.btn svg { width: 20px; height: 20px; }
.install {
background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px;
padding: 20px 24px; margin-bottom: 60px; display: flex; align-items: center;
justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.install code { font-size: 1.1rem; color: var(--accent-3); }
.install button {
background: rgba(255,255,255,0.1); border: none; padding: 8px 16px;
border-radius: 8px; color: white; cursor: pointer; font-size: 0.9rem;
}
.install button:hover { background: rgba(255,255,255,0.2); }
.features { padding: 60px 0; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 48px; }
.feature-grid {
display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px;
}
.feature {
background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px;
padding: 24px; transition: all 0.3s ease;
}
.feature:hover { border-color: var(--accent-1); transform: translateY(-4px); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.code-section { padding: 60px 0; }
.code-block {
background: #0d1117; border: 1px solid #30363d; border-radius: 12px; overflow: hidden;
}
.code-header {
background: #161b22; padding: 12px 16px; border-bottom: 1px solid #30363d;
font-size: 0.85rem; color: rgba(255,255,255,0.6);
}
.code-block pre { padding: 20px; overflow-x: auto; font-size: 0.9rem; line-height: 1.6; }
.code-block code { color: #e6edf3; }
.comment { color: #8b949e; }
.keyword { color: #ff7b72; }
.string { color: #a5d6ff; }
.function { color: #d2a8ff; }
.scales { padding: 40px 0; }
.scale-list {
display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.scale-tag {
padding: 8px 14px; background: var(--card-bg); border: 1px solid var(--card-border);
border-radius: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.8);
}
footer {
padding: 40px 0; text-align: center; border-top: 1px solid var(--card-border); margin-top: 60px;
}
footer p { color: rgba(255,255,255,0.5); font-size: 0.9rem; }
footer a { color: var(--accent-1); text-decoration: none; }
footer a:hover { text-decoration: underline; }
@media (max-width: 600px) {
.hero { padding: 60px 0 40px; min-height: auto; }
.install { flex-direction: column; text-align: center; }
}
</style>
</head>
<body>
<div class="bg-gradient"></div>
<header class="site-header">
<div class="container">
<a href="https://cainky.github.io/" class="brand">Kyle Cain</a>
<nav class="nav-links">
<a href="https://cainky.github.io/#projects" class="nav-link">Projects</a>
<a href="https://github.com/cainky" target="_blank" rel="noopener" class="github-link">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
</a>
</nav>
</div>
</header>
<section class="hero">
<div class="container">
<div class="logo">🎵</div>
<h1>MidiGen</h1>
<p class="tagline">Object-oriented MIDI generation with music theory support. Create songs with chord progressions, scales, melodies, and drums in Python.</p>
<div class="badges">
<span class="badge">Python 3.10+</span>
<span class="badge">Music Theory</span>
<span class="badge">17+ Scales</span>
<span class="badge">GPL-3.0</span>
</div>
<div class="buttons">
<a href="https://github.com/cainky/midigen" target="_blank" class="btn btn-primary">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
View on GitHub
</a>
<a href="https://pypi.org/project/midigen-lib/" target="_blank" class="btn btn-secondary">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
PyPI Package
</a>
</div>
</div>
</section>
<div class="container">
<div class="install">
<code>pip install midigen-lib</code>
<button onclick="navigator.clipboard.writeText('pip install midigen-lib')">Copy</button>
</div>
</div>
<section class="features">
<div class="container">
<h2 class="section-title">Features</h2>
<div class="feature-grid">
<div class="feature">
<div class="feature-icon">🎼</div>
<h3>Chord Progressions</h3>
<p>Roman numeral notation (I-V-vi-IV) with automatic voice leading and inversions.</p>
</div>
<div class="feature">
<div class="feature-icon">🎹</div>
<h3>17+ Scales</h3>
<p>Major, minor, modes, pentatonic, blues, whole-tone, chromatic, and more.</p>
</div>
<div class="feature">
<div class="feature-icon">🥁</div>
<h3>Drum Programming</h3>
<p>DrumKit class with human-readable names like "Bass Drum 1" and "Hi Hat".</p>
</div>
<div class="feature">
<div class="feature-icon">🎸</div>
<h3>Multi-Track</h3>
<p>Layer instruments across separate MIDI tracks with General MIDI support.</p>
</div>
<div class="feature">
<div class="feature-icon">🎵</div>
<h3>Melody Generation</h3>
<p>Create melodies from scale degrees, note names, or random walk algorithms.</p>
</div>
<div class="feature">
<div class="feature-icon">🔀</div>
<h3>Arpeggios</h3>
<p>Ascending, descending, and alternating arpeggio patterns built-in.</p>
</div>
</div>
</div>
</section>
<section class="code-section">
<div class="container">
<h2 class="section-title">Quick Start</h2>
<div class="code-block">
<div class="code-header">create_song.py</div>
<pre><code><span class="keyword">from</span> midigen <span class="keyword">import</span> Song, Section, Key
<span class="keyword">from</span> midigen.compiler <span class="keyword">import</span> MidiCompiler
<span class="comment"># Create a song in C major at 120 BPM</span>
song = Song(key=Key(<span class="string">"C"</span>, <span class="string">"major"</span>), tempo=<span class="string">120</span>)
<span class="comment"># Add a verse with a classic chord progression</span>
song.<span class="function">add_section</span>(Section(
name=<span class="string">"Verse"</span>,
length=<span class="string">8</span>,
chord_progression=<span class="string">"I-V-vi-IV"</span>
))
<span class="comment"># Add piano</span>
song.<span class="function">add_instrument</span>(<span class="string">"Acoustic Grand Piano"</span>)
<span class="comment"># Compile and save</span>
compiler = MidiCompiler(song)
compiler.<span class="function">compile</span>().<span class="function">save</span>(<span class="string">"my_song.mid"</span>)
</code></pre>
</div>
</div>
</section>
<section class="scales">
<div class="container">
<h2 class="section-title">Supported Scales</h2>
<div class="scale-list">
<span class="scale-tag">Major (Ionian)</span>
<span class="scale-tag">Natural Minor (Aeolian)</span>
<span class="scale-tag">Harmonic Minor</span>
<span class="scale-tag">Melodic Minor</span>
<span class="scale-tag">Dorian</span>
<span class="scale-tag">Phrygian</span>
<span class="scale-tag">Lydian</span>
<span class="scale-tag">Mixolydian</span>
<span class="scale-tag">Locrian</span>
<span class="scale-tag">Major Pentatonic</span>
<span class="scale-tag">Minor Pentatonic</span>
<span class="scale-tag">Blues</span>
<span class="scale-tag">Whole Tone</span>
<span class="scale-tag">Chromatic</span>
<span class="scale-tag">Diminished</span>
<span class="scale-tag">Augmented</span>
<span class="scale-tag">Bebop Dominant</span>
</div>
</div>
</section>
<footer>
<div class="container">
<p>Built by <a href="https://kylecain.me">Kyle Cain</a> · <a href="https://github.com/cainky/midigen">GitHub</a></p>
</div>
</footer>
</body>
</html>