Student Projects

VE/VM450

Development of Music and Light Control Software

Instructors: Prof. Jigang Wu
Team Members: Sun Zhuoyuan, Shao Xuesi, Kim Jinyou, Xiang Yi

Project Video

Team Members

Team Members:

Sun Zhuoyuan, Shao Xuesi, Kim Jinyou, Xiang Yi

Instructors:

Prof. Jigang Wu

Project Description

Problem

The problem which we want to solve is to let the light change automatically with music, so that a more suitable atmosphere can be created. For this purpose, the needed software should take a music file as an input, and it will judge what emotion(s) the music wants to express, and output corresponding RGB values and intensity according to the rhythm of the music as well as the emotion(s).
Fig. 1 Image of an automotive tail lamp

Concept Generation

The outcome will be a LED light that can change its color and intensity with the music. The applicable scene can be car driving or home party.
We decided to assign the mood to each color instead so that one color can represent up to two emotions.
The whole algorithm is run on the computer rather than the single-chip machine because it can process large amounts of data faster than the SCM.
A single PWM RGB LED light source is used to represent the music with two base colors.
Fig. 2 Concept Diagram

Design Description

The software takes a music file as an input, and it judges what two emotions the music wants to express, and outputs corresponding RGB values according to the rhythm of the music as well as the emotions.
The outcome is then transmitted to the single-chip machine, which controls the values of the PWM registers and illuminate the PWM RGB LED light accordingly.
Fig.3 The PWM RGBLED Light

Modeling and Analysis

The codes will be divided into two parts – input the music file, output emotions; input the music file and emotions, output RBG values and intensity with time. The main difficulties are the accuracy of music emotion judgement and light change pace with music. We use librosa in python to handle the music file processing, and sklearn in python to handle the music classification by emotion.
Fig. 4 Graph of Mel Frequency Features

Validation

Validation Process:
We define 8 engineering specifications for our design. The power, the chromatic aberration, the attenuation and the life expectancy of the LED light largely depend on the LED light. The other specifications are:
The number of music formats that it can be compatible with, cost, Number of music samples and sampling rate.

Librosa is only able to analyze music data in wav format. Though it does not meet the engineering specification, there are various free softwares to transfer music pieces in other formats into wav formats.
The final music pool contains over 550 music pieces with or without lyrics to ensure the accuracy of the program
The monetary cost is only 208 yuan for the whole product.
The sampling rate we use is 22050Hz, the default rate for broadcasting.

Conclusion

Music is able to arouse peoples’ emotions through their unique features. Through machine learning, computers can also “feel” these emotions. We succeeded in extracting the features in music pieces so that the computer can translate into their “own” feelings and “express” them through colors or RGB values. The values are then transmitted to the Single-Chip Machine to illuminate the PWM RGBLED light.

Acknowledgement

Sponsor: Yang Shihang from Hasco Visions
Instructor: Wu Jigang from UM-SJTU Joint Institute