Guitar Tuner in HTML5.
onlinetuner.co is a web site that use WebAudio API to capture Guitar sound, analyse it and determine the difference from nearest string. Algorithm can be apply for other instruments or other type of tuning.
- Use Web Audio API to construct tree Analyse
- Use getUserMedia to capture sound from client
- Apply Blackman window on input signal
- Apply FFT from dsp.js
- Apply microphone response correction
- Retrieve most contributed frequency
- Find nearest note from frequency
- Use HTML5 canvas to show difference and note
CircleWidget show difference in circle mode.
var widget = new OnlineTuner.Widget.CircleWidget(canvasElement, backColor, deltaColor, okColor, fontColor);
GuitarTuner is use in classic Guitar Tuning case. It compute frequency difference from guitar strings.
var tuner = new OnlineTuner.Controller.GuitareTuner(widget);
You can use onlinertuner as widget in your own website, and if you implement more controllers or widgets, keep it back!
<script type="text/javascript" src="https://raw.githubusercontent.com/citronneur/onlinetuner.co/master/js/onlinetuner.min.js"></script>
<script type="text/javascript">
function start() {
var tuners = [
new OnlineTuner.Controller.GuitareTuner(new OnlineTuner.Widget.CircleWidget(canvasElement, backColor, deltaColor, okColor, fontColor));
];
new OnlineTuner.Analyser(tuners).install(function() {
//ok
}, function(errorMessage) {
//nok
});
}
</script>