Doesn't work. Using it in a CRA app and it was printing undefined undefined.
Expected behavior
A clear and concise description of what you expected to happen.
I would expect the note and pitch to get pritned.
To Reproduce
Include the smallest possible code snippet that reproduces this bug.
import { useEffect } from "react";
import Wad from "web-audio-daw";
export default () => {
useEffect(() => {
const voice = new Wad({ source: "mic" }); // At this point, your browser will ask for permission to access your microphone.
const tuner = new Wad.Poly();
tuner.setVolume(0); // If you're not using headphones, you can eliminate microphone feedback by muting the output from the tuner.
tuner.add(voice);
voice.play(); // You must give your browser permission to access your microphone before calling play().
tuner.updatePitch(); // The tuner is now calculating the pitch and note name of its input 60 times per second. These values are stored in <code>tuner.pitch</code> and <code>tuner.noteName</code>.
const logPitch = function () {
console.log(voice);
console.log(tuner.pitch, tuner.noteName);
requestAnimationFrame(logPitch);
};
logPitch();
});
return <div>Microphone</div>;
};
Screenshots
If applicable, add screenshots to help explain your problem.
Device (please complete the following information):
Model: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Add any other context about the problem here.
I'm unable to reproduce this issue. Can you tell me what browser/OS you're using? Does pitch detection work for you without using react? Does your microphone work for other web audio applications?
Describe the bug A clear and concise description of what the bug is.
https://github.com/rserota/wad#pitch-detection
Doesn't work. Using it in a CRA app and it was printing undefined undefined.
Expected behavior A clear and concise description of what you expected to happen.
I would expect the note and pitch to get pritned.
To Reproduce Include the smallest possible code snippet that reproduces this bug.
Screenshots If applicable, add screenshots to help explain your problem.
Device (please complete the following information):
Additional context Add any other context about the problem here.