This page contains examples demonstrating how to use the bluesharp-pitch-detection npm package for pitch detection, chord recognition, and audio analysis.
Demonstrates how to use the YIN pitch detection algorithm to analyze audio data and detect the fundamental frequency (pitch).
Run Example View SourceCompares different pitch detection algorithms (YIN, MPM, FFT, and Hybrid) on various test signals to demonstrate their strengths and weaknesses.
Run Example View SourceShows how to use the chord detection functionality to identify chords from a set of frequencies or audio input.
Run Example View SourceDemonstrates how to use the PitchProcessor AudioWorklet for real-time pitch detection in a browser environment.
Run Example View SourceTo run these examples locally, you'll need to:
git clone https://github.com/egdels/bluesharpbendingapp.git
cd bluesharpbendingapp/npm/examples
npx http-server
http://localhost:8080
Each example has a corresponding HTML file that loads the JavaScript module. Here's a template for creating these files:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example Name - Bluesharp Pitch Detection</title>
</head>
<body>
<h1>Example Name</h1>
<p><a href="index.html">Back to Examples</a></p>
<div id="results"></div>
<script type="module" src="example-file.js"></script>
</body>
</html>