Home Equipments GitHub Report Month 1 and 2 Report Month 3

Embedded Device for Audio Signal Analysis and Classification of Musical Notes Using Machine Learning Blog Post

Pooncharat Wongkom, Manopas Tanetsakunvatana.


In music practice, musicians can’t know that the song they play is correct,like in the note 100 percent or not. So we built a tool that can help them score the playing.For some people who want to play the song they like but can’t transcribe or find the note.This tool can be helped by listening to the song or music to transcribe it ,and convert audio to music notes.
We use Fast fourier transform (FFT) to screen the sound out to any frequency. By converting input sound from analog to digital, using Analog-to-digital converter (ADC).And the results are displayed with LCD and Web-based Dashboard.

1. Introduction

Among the musical instruments, we select the piano as a sound to analyze the frequency to identify notes. What’s more, we are more intimate with the piano and it's uncomplicated than other musical instruments like Stringed musical instruments such as Violin, Guitar etc.
overview

1.1 Principle

At first, we received a piano sound with a microphone. Change the sound signal from analog to digital for a separate sound frequency with FFT and analyze that frequency for which note it is. We can transform analog to digital by using INMP441, which can transform in itself.
For microcontrollers, we use ESP32 as it. We use the I2S interface for high fidelity audio.

1.2 Theory

For how correctly players can play the music. We need to separate the frequency of the sound of the piano by using FFT and transform that into the music note sheet.

1.2.1 Fast fourier transform (FFT)

A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). Fourier analysis converts a signal from its original domain (often time or space) to a representation in the frequency domain and vice versa. Fast Fourier transforms are widely used for applications in engineering, music, science, and mathematics.

1.2.2 Piano music sheet

Staff notation is structured around the grand staff: two staves of 5 lines and 4 spaces, connected by a brace on the left. The top staff is usually marked with a treble clef and typically played with the right hand while the bottom staff is usually marked with a bass clef and typically played with the left hand.

1.2.3 ESP32

ESP32 is a series of low-cost, low-power systems on chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. We can send the sound signal we get from the microphone through Wifi.

1.2.4 I2S

I2S (Inter-IC Sound) is a synchronous serial communication protocol usually used for transmitting audio data between two digital audio devices. ESP32 contains two I2S peripheral(s). These peripherals can be configured to input and output sample data via the I2S driver.

Action plan

Action Plan English version
Action Plan Thai version

การทำงานในช่วงที่ผ่านมาโดยคร่าว

การทำงานในช่วงเดือนกรกฎาคม - สิงหาคม

การทดลอง

  1. ทำการทำลองวัดสัญญาณคลื่นเสียง
  2. ทำวงจรรวมสัญญาณ 2 คลื่นความถี่ และใช้ FFT ในการจำแนกความถี่
  3. เขียนโปรแกรมจำลองการรวมคลื่น sine wave และจำแนกความถี่ ด้วย Python และ Matlab
  4. ทดลองนำอุปกรณ์ เช่น ไมค์โครโฟน มารับค่าสัญญาณ input แล้วจึงนำสัญญาณเหล่านั้นมาแปลงคลื่นความถี่ผ่าน Analog-to-digital converter (ADC)จากนั้นจึงนำสัญญาณเหล่านั้นมาจำแนกความถี่ผ่าน FFT
  5. ทดลองการใช้ ESP32 ในการสร้าง input sinewave และใช้ ESP32 เป็น ADC ในการแปลงสัญญาณคลื่นเสียง

สิ่งที่ได้ศึกษา

  1. ข้อดีและข้อเสียของไมโครโฟนแต่ละประเภท
  2. การใช้งาน ESP32 ในการรับสัญญาณเสียงและใช้แทน ADC
  3. การเขียน Github page โดยใช้ HTML, CSS และ JavaScript

รวมถึงได้ทำ Github page โดยใช้ภาษา HTML, CSS และ JavaScript

สามารถดูรายละเอียดเพิ่มเติมที่ รายงานในเดือนกรกฎาคม-สิงหาคม

การทดลองในช่วงเดือนกันยายน

สิ่งที่ได้แก้ไข

  1. ทำการเปลี่ยนวิธีการเขียน Github page จากการใช้ HTML, CSS และ JavaScript แล้วได้เปลี่ยนมาใช้วิธีการ Markdown ในการเขียนเป็นหลัก

สามารถดูรายละเอียดเพิ่มเติมที่ รายงานในเดือนกรกฎาคม-สิงหาคม