Skip to content

Linkcrimson/harmonic_analyzer

Repository files navigation

🎹 Harmonic Analyzer

A modern, interactive web application for real-time chord detection, modal analysis, and harmonic exploration. Designed to be lightweight, responsive, and fully accessible across Desktop and Mobile platforms.

🚀 Try the Live Demo


⚡ Powered by the not251 Vector Harmony Engine

At the core of Harmonic Analyzer lies not251, an advanced vector harmony engine. Unlike traditional, rule-based analyzers that rely on rigid dictionaries or slow probabilistic matching, this application models music as high-dimensional vector spaces.

This mathematical framework enables:

  • Zero-latency detection: Runs on-the-fly inside web workers, bypassing garbage collection spikes to keep visual rendering and MIDI input processing at a stable 60+ FPS.
  • Avoid Notes & Extensions Logic: Intelligently weights and filters notes to prioritize natural, jazz-idiomatic chord voicings.
  • Real-Time Role Mapping: Instantly resolves the precise harmonic function of every active note (Root, 3rd, 5th, 7th, and tension extensions) based on vector distance from the detected root.
  • Functional Harmonic Sorting: Powers creative features by categorizing real-time notes by their actual harmonic roles rather than physical pitch.

✨ Key Features

🎼 Advanced Analysis

  • Real-Time Chord Detection: Smart chord naming with support for slash chords, suspensions, and tension extensions.
  • Enharmonics & Voice Leading: Resolves spelling discrepancies dynamically (e.g., preferring $D\flat7(\sharp11)$ over $C\sharp7(\sharp11)$ based on context).

🎹 Creative Playback & Synthesis

  • Multi-waveform Synthesizer: Built-in polyphonic synthesizer supporting multiple basic waveforms (Sine, Triangle, Sawtooth, Square) for real-time auditory feedback.
  • Advanced Arpeggiator:
    • Multiple Sorting Modes: Toggle between standard Pitch-based sorting (notes played from low to high) and Harmonic-based sorting.
    • Customizable Harmonic Priority: In Harmonic mode, notes are grouped and played back by their functional roles (e.g., Roots first, then 3rds, 5ths, etc.). You can dynamically drag-and-drop the priority list to customize the playback order.
    • Performance Controls: Adjustable BPM, rhythmic subdivisions, octave range multiplication, and sustain pedal support.

🖥️ High-End User Experience & Accessibility

  • Interactive & Color-Coded Keyboard: A fully responsive visual piano. Key overlays are dynamically color-coded based on their detected harmonic function (e.g., warm, distinct colors for consonant anchors like Roots and 3rds, contrasting tones for tensions and avoid notes), providing immediate cognitive feedback.
  • Micro-Minimap: A unique keyboard navigator optimized for mobile screens that maps the entire 88-key range with real-time color-coded harmonic roles.
  • Didactic Tooltips: Bilingual (English/Italian) interactive explanations of interval math and harmonic functions as you play.
  • Accessibility (A11y): Built strictly with WCAG contrast standards. Fully optimized for assistive technologies with ARIA roles, full keyboard navigation, and voice-over screen reader support for octave locations.

🔌 Hardware & Native Integration

  • Web MIDI Support: Plug in your MIDI keyboard and play instantly with zero configuration.
  • Pedal Sustain CC 64: Advanced sustain pedal processing for a natural, expressive performance.
  • PWA (Progressive Web App): Install it directly on desktop or mobile and use it fully offline with a native app feel.

🛠️ Installation & Local Development

📱 Just Want to Use It?

Harmonic Analyzer is a fully-featured Progressive Web App (PWA). You do not need to download, clone, or compile anything:

  1. Open the Live Demo in your browser.
  2. Select "Add to Home Screen" or "Install App" from your browser options.
  3. The app will install on your device and run fully offline with zero configuration!

💻 Local Development Setup

If you want to modify, run, or build the project locally for development:

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev

📐 Technical Stack


⚖️ License

This project is licensed under the MIT License - see the LICENSE file for details. Copyright (c) 2025 Dario Biagio Bellino

About

A browser-based musical analysis tool providing detailed harmonic information. Includes a visual piano interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages