See it live at: https://bigodines.github.io/cavaquinho_hero/
A music theory toolkit for cavaquininstas learning and practicing chords, scales, and harmonic fields.
- Chord Generator: Generate triads and tetrads (7th chords) for any note
- Harmonic Field Explorer: Explore major and minor harmonic fields with diatonic chords, dominants, ii-V-I progressions, and substitutions
- Chord Visualization: View chord shapes on a fretboard (beta)
- Node.js 18 or later
- npm or yarn
npm install# Run development server
make run
# or
npm run devOpen http://localhost:3000 with your browser to see the result.
make help # Show all available commands
make run # Run development server
make build # Build for production
make test # Run tests
make lint # Run linter
make type-check # Run TypeScript type check (via npm run type-check)npm test # Run tests once
npm test -- --watch # Run tests in watch mode├── components/ # React components
│ ├── Header/ # Navigation header
│ ├── ChordTable/ # Chord display table
│ ├── HarmonicField/ # Harmonic field explorer
│ └── Chordz/ # Chord visualization SVG components
├── lib/ # Core music theory modules
│ ├── scales.ts # Scale generation (major, harmonic minor)
│ ├── chords.ts # Chord construction (triads, tetrads)
│ ├── tonality.ts # Harmonic fields and progressions
│ └── fretboard.ts # Fretboard representation
├── pages/ # Next.js pages
│ ├── index.tsx # Home page
│ ├── chords.tsx # Chord generator
│ ├── harmonic_field.tsx # Harmonic field explorer
│ └── about.tsx # About page
└── styles/ # Global styles
major(root)- Generate major scaleharmonicMinor(root)- Generate harmonic minor scaleisValidNote(note)- Validate notenoteAdd(note, semitones)- Transpose a noteenharmony(from, to)- Find enharmonic equivalent
- Triads:
majorTriad,minorTriad,augmentedTriad,diminishedTriad - Tetrads:
sevenTetrad,sevenMajorTetrad,minorSevenTetrad, etc. - Sixth chords:
sixthTetrad,minorSixthTetrad
majorDiatonicScale(root)- Major harmonic fieldharmonicMinorDiatonicScale(root)- Minor harmonic fielddominantChord(chord)- Find V chordiiChord(chord)- Find ii chord for ii-V-IsubV(chord)- Find tritone substitution
AGPL