Music Coach

From WirelessAfrica
Jump to navigation Jump to search

Requirements

Submit (via email) a tentative project proposal, including: team member names, brief description of project (a paragraph or so), the main technical challenges, milestones/tasks to accomplish this, the primary obstacles/concerns, how you propose to evaluate the outcome.

Team Memebers

  • Dianna ...
  • David Johnson

Idea description

Use the Nokia N900 as a music coach which can check if you are playing a note at the correct pitch, check if a note is played at the correct time and optionally may allow you to display sheet music from midi files as well as control the pace of performance with movements of the body. It will act both as a real time feedback mechanism alerting you of pitch and rhythm inaccuracies as you play the notes and give you an overall evaluation at the end of your performance. The pitch evaluation is especially useful for instruments which don't have discrete notes such as a cello, violin, trombone or even human voice whereas the rhythm evaluation is suitable for all instruments. Other additional features such as an instrument tuner and a metronome could be added with trivial software modification. It should also be possible to evaluate only pitch with no pre-loaded music score by checking how close a note is to its nearest discrete note. This would assume an advanced student that is playing notes with less than a quarter tone of inaccuracy or else it would rounding to a note which is different to the original intended note.

Different feedback mechanisms will be explored. Visual feedback could use a compass like display where North and South represent a pitch that is above or below the correct note and the length of the arrow represents the fractional difference between the notes. East and West represents whether you played the note too early or too late and the length of a second arrow also represents the fractional difference. Audio feedback could also be explored by playing the correct note on the speaker in the case of a pre-loaded score and using beats in the note which get closer together the further the note is away from the correct note. This would be ideal as a training module for someone learning scales on a cello, for example.

One problem with a pre-loaded score is making allowances for musical expressiveness. This comes in the form of slowing down and speeding up your performance in sections of the music as well as adding vibrato to a note in the case of stringed instruments and the human voice. A vibrato note is an oscillation which falls slightly below and slightly above a note. The accelerometer could be used to sense rhythm by monitoring swaying movements on the body, if the phone was strapped onto a person. For example if the phone was strapped to the head, faster rocking movements in the head would speed up the performance and slower rocking movements would slow the performance down. Allowing for vibrato can be done calculating the average pitch of the performed note over a specific time window.

Main challenges

  1. Real-time processing of the audio input to recognize the frequency of a note.
  2. Different instruments have a range of timbre with transient harmonics which can dominate the fundamental frequency momentarily - the challenge will be to decide on an optimal time window to use for the pitch recognition.
  3. Real-time feedback display
  4. If time permits, inferring rhythm from a trace of accelerometer inputs so that the user can control performance speed.

Milestones

  1. Test some FFT code on a PC which can take as input - sample rate, number of bins and display the frequency of a single note on the screen
  2. Build some software which can read in a midi file and use this to compare notes performed in real time against the pitch of notes in the midi file.
  3. Evaluate the accuracy of the attack and release times of the live performance with the start and stop times of the notes in the midi file
  4. Write a graphical interface on the Maemo simulator which creates feedback on the pitch and timing accuracy of the performance. This could be done with vertical bars for pitch and horizontal bars for timing but a more creative graphical output will probably be developed. Pitch and timing accuracy can be displayed as a percentage in real time and the accuracy of the performance can finally be displayed at the end.
  5. Test the FFT code and graphical display on the N900
  6. Test the midi file input on the N900
  7. Time permitting add the option to change the speed of the performance using the accelerometer

Primary obstacles

  • Processing capability to carry out a real-time FFT, we might need to use the DSP which adds an extra level of complexity to the problem
  • Allowing for a certain level of musical expressiveness in a performance and not seeing this as pitch or rhythm inaccuracy. For example vibrato playing oscillates above and below the note - so an average over a time window would be more appropriate.
  • Inferring rhythm for small subtle changes of phone height when attached to the body - depends on accuracy of accelerometer

Evaluation

The real-time pitch recognition software can be compared against some more accurate non-real time pitch recognition on a standard PC. The non-real time recognition software will use a recording of the musical performance which was being used by the N900 to evaluate the pitch in real-time.


Useful links

Pitch recognition