Let me explore the existing project structure and understand what we're working with.
Now I have a clear picture. Let me build this royal, elegant OSU beatmap generator. I'll create the structure step by step.
First, let me set up the project with required dependencies:
Let me check the utility file:
Now let me create all the files for this project. I'll build a complete, elegant beatmap generator.
Now let me create the audio analyzer for beat detection:
Now let me create the beatmap generator with all the pattern types:
Now let me create the .osz exporter:
Now let me create the React components. First, the upload zone:
Now the beatmap preview canvas:
Now let me create the main App component - the centerpiece of the application:
Now let me update the HTML title and build:
The build succeeds! Let me enhance the preview section to ensure it looks great by giving the canvas more room:
Let me do a final build to make sure everything is clean:
Let me do a quick code review and fix the slider pixel length which was too small:
I need to fix the slider pixel lengths. They should be actual pixel distances, not tiny multipliers:
Let me clean up the IIFE in the stream section (it's ugly code):
The build succeeds! Let me verify the complete file structure:
The project builds successfully! Here's a complete summary of Overture — OSU Beatmap Generator:
🏰 What I Built
A complete web application that generates playable osu! beatmaps from any audio file you upload. Royal, elegant aesthetic with gold accents, deep maroons, and navy tones — no neon anywhere.
Architecture
| File | Purpose |
|---|
src/App.tsx | Main app with state management, controls, export |
src/components/UploadZone.tsx | Drag & drop MP3 upload with crown icon |
src/components/BeatmapPreview.tsx | Canvas-based visual preview of the generated map |
src/utils/audioAnalyzer.ts | Web Audio API beat detection (onset detection, BPM estimation via autocorrelation) |
src/utils/beatmapGenerator.ts | Core beatmap generation engine |
src/utils/osuFormat.ts | .osu file format spec & generator |
src/utils/oszExporter.ts | .osz (zip) export with audio |
Features
🎵 4 Map Styles:
- Aim (Triangular) — Notes form equilateral/right-angle triangles. Jumps calculated using perpendicular vectors from the last two notes
- Stream — Flowing patterns with smooth angle changes
- Jump Stream — Alternating 4-beat jumps and stream sections
- Balanced — Mix of everything with sliders
⚡ 5 Difficulties: Easy → Normal → Hard → Insane → Expert — each with tuned HP/CS/OD/AR and note density
📐 Smart Beat Detection: Spectral energy analysis across low/mid/high frequency bands → onset detection → BPM autocorrelation → beat grid alignment
🎨 Beatmap Preview: Live canvas rendering of the playfield with:
- Triangular jump pattern overlays
- Fading hit circles with glow effects
- Play/pause animation with timeline scrubber
- Grid lines and corner ornaments
📦 Export: Downloads as .osz — a zip containing your .osu file + audio file. Open directly in osu!
Playability
Everything is generated with constraints to ensure it's actually playable:
- All notes within valid playfield bounds (40px margin)
- Minimum distance enforced between overlapping notes
- Stack leniency for overlapping patterns
- Proper approach rates matched to difficulty
- Pixel lengths calculated from actual distances for sliders
- Timing aligned to detected musical beats
Files built: src/utils/osuFormat.ts, src/utils/audioAnalyzer.ts, src/utils/beatmapGenerator.ts, src/utils/oszExporter.ts, src/components/UploadZone.tsx, src/components/BeatmapPreview.tsx, src/App.tsx, index.html, src/index.css