Are You in Tune? A Program to Make You a Better Musician
CSEF · 2016 Mathematics & Computer Science
Overview
Objectives/Goals When a musician is learning to play an instrument, they must learn to hit all of the notes in tune. This can be more difficult on instruments that can produce continuous variation in pitch (e.g. Violin, Trombone). This project demonstrates a software program to make and analyze a recording, showing which notes were out of tune. Methods/Materials The Python language was used to develop this program. In order to find out the tuning of notes, an algorithm was needed to calculate frequency. To do this, a modified zero-cross algorithm was used. The standard zero-cross technique only works on "pure" tones, not those with complex harmonic components. The custom version identifies other features of the waveform and uses those features plus the zero crosses to correctly calculate the wavelength and frequency. The program also interpolated cross points and averaged multiple waves to increase precision. Results The program was tested with different musical instruments and different notes. The program can correctly identify the pitch of a note, and if it is sharp, flat, or in tune. Conclusions/Discussion A modified zero-cross algorithm is able to determine the frequency of notes within recorded musical passages. The program is able to identify if a note is out of tune, and how much. This program could potentially help train beginning musicians to improve their intonation (ability to play notes at the correct pitch).
Summary statement
I wrote a computer program to analyze a musical recording and display which notes were in our out of tune.
Help received
None. I wrote my software program myself.
Competition history
- CSEF 2016
Resources
Related projects
CSEF · 2002
Harmonic Analysis: Using the Least Squares Method to Analyze Sound Waves
CSEF · 2006
The Science of Music
ISEF · 2019
MADSA: Musical Accuracy Development Using Spectral Analysis
ISEF · 2020
Stay Tuned: An Automatic Tuning Device for Violins
CSEF · 2016
Pitch Detection on Arduino Using Autocorrelation
CSEF · 2002
Mathemusicians: How to Play Music Notes with Mathematical Equations
CSEF · 2018
Music Measure Theory: A Mathematical Analysis of Musical Dissonance and Consonance
CSEF · 2003
Pitch'ure Perfect
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects