Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/ai-music-system / public/index.html |
| Date | Not specified in source |
| Repository | Janady13/ai-music-system |
| Revision | 9a816470ef81edba7a5d8f3aae62c05eead638a7 |
| Branch | main |
| Path or archive member | public/index.html |
| Original SHA-256 | 8770c935a68d83aab3775689b76012db55fecf31b3b6e5342c564fdd79e2ec1c |
| Git blob SHA | 23a21f075492cc6ab4417a9de79939dd435aa05c |
| Reading-copy SHA-256 | 8770c935a68d83aab3775689b76012db55fecf31b3b6e5342c564fdd79e2ec1c |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/ai-music-system / public/index.html | main | 9a816470ef81edba7a5d8f3aae62c05eead638a7 | Open original |
| Janady13/ai-music-system / public/index.html | codex/create-ai-for-music-generation | 017052c0e72c6175378aebb7a7f9dd96e82c3ce2 | Open original |
Recovered source transcript
Download complete source text ↓184 lines · 8.0 KB
<!DOCTYPE html>
<html>
<head>
<title>AI Music Generator</title>
<script src="/socket.io/socket.io.js"></script>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
margin: 0;
padding: 20px;
min-height: 100vh;
}
.container {
max-width: 600px;
margin: 0 auto;
text-align: center;
}
.controls {
background: rgba(255,255,255,0.1);
padding: 20px;
border-radius: 15px;
margin: 20px 0;
}
select, button {
padding: 10px;
margin: 5px;
border: none;
border-radius: 5px;
font-size: 16px;
}
button {
background: #4CAF50;
color: white;
cursor: pointer;
padding: 15px 30px;
}
button:disabled {
background: #666;
cursor: not-allowed;
}
.result {
background: rgba(255,255,255,0.1);
padding: 20px;
border-radius: 15px;
margin-top: 20px;
}
</style>
</head>
<body>
<div class="container">
<h1>🎵 AI Music Generator</h1>
<p>Generate unique music with AI</p>
<div class="controls">
<h3>Music Parameters</h3>
<div>
<label>Genre:</label>
<select id="genre">
<option value="electronic">Electronic</option>
<option value="classical">Classical</option>
<option value="jazz">Jazz</option>
<option value="rock">Rock</option>
</select>
</div>
<div>
<label>Mood:</label>
<select id="mood">
<option value="uplifting">Uplifting</option>
<option value="melancholy">Melancholy</option>
<option value="energetic">Energetic</option>
<option value="peaceful">Peaceful</option>
</select>
</div>
<div>
<label>Duration:</label>
<select id="duration">
<option value="15">15 seconds</option>
<option value="30">30 seconds</option>
<option value="60">1 minute</option>
</select>
</div>
<br>
<button onclick="generateMusic()" id="generateBtn">🎵 Generate Music</button>
</div>
<div id="result" class="result" style="display: none;">
<h3>🎉 Music Generated!</h3>
<div id="resultContent"></div>
</div>
</div>
<script>
const socket = io();
let isGenerating = false;
socket.on('connect', () => {
console.log('Connected to server');
});
socket.on('music-generated', (data) => {
isGenerating = false;
document.getElementById('generateBtn').disabled = false;
document.getElementById('generateBtn').textContent = '🎵 Generate Music';
const result = document.getElementById('result');
const container = document.getElementById('resultContent');
if (!data || data.ok === false) {
container.innerHTML = `<p style=\"color:#ffaaaa\"><strong>Generation failed:</strong> ${data?.error || 'Unknown error'}</p>`;
result.style.display = 'block';
return;
}
const metadata = data.metadata || {};
const composition = data.composition || {};
const arrangement = composition.arrangement || [];
const recommendations = composition.recommendations || {};
const performance = composition.performance || {};
const analysis = data.analysis || {};
const formatList = (items = []) => items.map(item => `<li>${item}</li>`).join('');
const arrangementHtml = arrangement.map(section => `
<li>
<strong>${section.name.toUpperCase()}</strong> — ${section.lengthSeconds}s (~${section.bars} bars)
<br><small>Progression: ${Array.isArray(section.progression) ? section.progression.join(' → ') : section.progression}</small>
</li>`).join('');
const dynamicsHtml = (performance.dynamics || []).map(item => `
<li><strong>${item.section}:</strong> focus on ${item.target} (${item.contour})</li>`).join('');
const transitionsHtml = (recommendations.transitions || []).map(step => `
<li>At ${step.at}s — ${step.idea}</li>`).join('');
const mixingHtml = formatList(recommendations.mixing || []);
container.innerHTML = `
<p><strong>Genre:</strong> ${metadata.genre}</p>
<p><strong>Mood:</strong> ${metadata.mood}</p>
<p><strong>Duration:</strong> ${metadata.duration}s · <strong>Tempo:</strong> ${metadata.tempo} BPM (${metadata.timeSignature})</p>
<p><strong>Key:</strong> ${metadata.key} · <strong>Confidence:</strong> ${(analysis.confidence || 0).toFixed(2)}</p>
<h4>Arrangement</h4>
<ol>${arrangementHtml || '<li>No arrangement computed</li>'}</ol>
<h4>Core Instrumentation</h4>
<ul>${formatList(composition.instrumentation?.core || [])}</ul>
<h4>Rhythm & Bass</h4>
<ul>${formatList((composition.instrumentation?.rhythm || []).concat(composition.instrumentation?.bass || []))}</ul>
<h4>Motifs & Textures</h4>
<ul>${formatList((composition.instrumentation?.motifs || []).concat(composition.instrumentation?.textures || []))}</ul>
<h4>Performance Highlights</h4>
<ul><li><strong>Groove:</strong> ${performance.groove || 'Steady pulse'}</li><li><strong>Bass & Lead:</strong> ${performance.bassLeadInteraction || 'Root support'}</li><li><strong>Melodic Focus:</strong> ${performance.melodicFocus || 'Motif driven'}</li></ul>
<h4>Dynamic Focus</h4>
<ul>${dynamicsHtml || '<li>Standard dynamics</li>'}</ul>
<h4>Automation Ideas</h4>
<ul>${formatList((composition.automation || []).map(step => `At ${step.at}s for ${step.duration}s — ${step.action} (${step.intensity} intensity)`))}</ul>
<h4>Transition Ideas</h4>
<ul>${transitionsHtml || '<li>Blend sections with subtle risers.</li>'}</ul>
<h4>Mixing Notes</h4>
<ul>${mixingHtml || '<li>Balance frequency ranges for clarity.</li>'}</ul>
<h4>Model Reasoning</h4>
<ul>${formatList(analysis.reasoning || [])}</ul>
<p style=\"font-size:12px;color:#cccccc\">Dataset entries: ${analysis.dataset?.corpusEntries || 0} · Profile observations: ${analysis.dataset?.profileObservations || 0}</p>
<p style=\"font-size:12px;color:#888\">Generated: ${metadata.generatedAt ? new Date(metadata.generatedAt).toLocaleString() : 'just now'}</p>
`;
result.style.display = 'block';
});
function generateMusic() {
if (isGenerating) return;
isGenerating = true;
document.getElementById('generateBtn').disabled = true;
document.getElementById('generateBtn').textContent = '🎵 Generating...';
document.getElementById('result').style.display = 'none';
const params = {
genre: document.getElementById('genre').value,
mood: document.getElementById('mood').value,
duration: parseInt(document.getElementById('duration').value)
};
socket.emit('generate-music', params);
}
</script>
</body>
</html>