'use client'; import { Card } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Shuffle } from 'lucide-react'; import { cn } from '@/lib/utils'; import { chordProgressions } from '@/lib/audio/patterns'; interface ProgressionPickerProps { selectedIndex: number | null; onSelect: (index: number) => void; onRandom: () => void; onClose: () => void; className?: string; } function chordToName(notes: string[]): string { if (notes.length === 0) return ''; const noteMap: Record = { 'C': 'C', 'D': 'D', 'E': 'E', 'F': 'F', 'G': 'G', 'A': 'A', 'B': 'B', }; const root = notes[0].replace(/[0-9]/g, ''); const rootName = root.replace('#', '♯').replace('b', '♭'); if (notes.some((n) => n.includes('b') || n.includes('Eb') || n.includes('Bb'))) { return `${rootName}m7`; } return `${rootName}maj7`; } export function ProgressionPicker({ selectedIndex, onSelect, onRandom, onClose, className, }: ProgressionPickerProps) { return ( e.stopPropagation()} >
Chord Progressions
{chordProgressions.map((prog, i) => ( ))}
); }