User Stories

Sapienza Università di Roma Students Learn Signal Processing by Developing Real-Time Audio Processing Applications

Challenge

Engage students in a graduate-level multimedia signal processing course

Solution

Use MATLAB and Audio System Toolbox to enable students to validate audio processing algorithms in real time directly in MATLAB or as VST plugins

Results

  • Algorithm development time halved
  • Lab time limitations eliminated
  • Student engagement increased

“When programming in C++, my students had difficulties not only with real-time implementation but also with comprehension. MATLAB makes it easier for them to implement algorithms and directly hear the effects, helping them to better understand the mathematical theory.”

Michele Scarpiniti, Sapienza Università di Roma

An audio mixer in Dr. Scarpiniti’s lab.


In their second year, graduate students in the department of information engineering, electronics, and telecommunication at Sapienza Università di Roma are encouraged to take courses that emphasize the practical application of engineering concepts. Among the most popular of these courses is a class on multimedia signal processing in which students use MATLAB® and Audio System Toolbox™ to develop and deploy real-time audio processing applications.

“It can be challenging to teach signal processing when the focus is exclusively on theory,” says Dr. Michele Scarpiniti, researcher and lecturer at Sapienza Università di Roma. “With MATLAB, my students can actually implement real-time audio processing algorithms. When they hear the effects of their own programming, they tend to fall in love with the work and acquire a much deeper comprehension of the theory behind the algorithms.”

Challenge

Most of Scarpiniti’s students have a background in signal processing or multimedia communication engineering. While many are somewhat familiar with programming, few are experts, and fewer still have experience with real-time programming.

Scarpiniti wanted to enable students in the class to develop audio processing algorithms and then hear the results of their work via a sound card or digital audio workstation. He found that implementing and debugging complex signal processing algorithms in C/C++, Python, or a similar language could be frustrating for students. He wanted to simplify the development process so that they could focus on applying newly learned concepts instead of dealing with low-level implementation details.

In addition, he wanted students to have the freedom to complete assignments on their own PCs and on their own schedules instead of in the lab.

Using Audio System Toolbox to develop, test, and tune a plug-in that implements an echo effect.

Solution

Sapienza acquired a Campus-Wide License for MATLAB and related products, enabling students in Scarpiniti’s class to work on course projects at home or anywhere on campus.

Each weekly class session in the multimedia signal processing course is five hours long. Sessions typically begin with a lecture in which Scarpiniti introduces a new signal processing topic or technique and then demonstrates its implementation in MATLAB. Students then experiment with the MATLAB algorithm that Scarpiniti presented.

The coursework is divided into three phases. In the first phase, the students develop and test algorithms that operate offline in batch mode. For example, they create a MATLAB algorithm that reads recorded audio from a file, adds a reverberation effect with a comb filter, and saves the results to a new file. They visualize results in MATLAB by generating time-domain and frequency-domain plots.

In the second phase, the students create online versions of many of the same algorithms developed earlier. They use a ring buffer implemented in MATLAB to read and process the input data sample by sample rather than all at once.

The final phase focuses on real-time algorithms. Students use the audioDeviceReader and audioDeviceWriter System objects™ from Audio System Toolbox to connect to the sound cards in their laptops. They then update their online algorithms to read from and write to the sound cards.

Students later use Audio System Toolbox to generate Virtual Studio Technology (VST) plugins from their MATLAB code, enabling them to deploy and test their algorithms on a digital audio workstation.

Students end the course by completing a project on a topic of their choice. Recent projects have included a VST plugin developed in MATLAB that incorporated limiting, expansion, compression, and other dynamic effects.

Next year, Scarpiniti will again be teaching the multimedia signal processing course, which is expected to attract the largest enrollment of any practical graduate-level course offered at the university.

Results

  • Algorithm development time halved. “When my students program in C++ instead of MATLAB, they need 10 to 20 times more lines of code, and there are inevitably more bugs,” says Scarpiniti. “When they work in MATLAB, they gain a deeper understanding of the code and can focus on genuine engineering tasks rather than on fixing problems with the software.”
  • Lab time limitations eliminated. “When I first taught the course, students had to complete all their work in the lab, which was a challenge,” says Scarpiniti. “With the Campus-Wide License, they have MATLAB on their own computers, making it much easier for them to work and for me to teach.”
  • Student engagement increased. “A student who plays guitar can develop his or her own algorithms in MATLAB, generate a plugin for a digital audio workstation, and hear the effects,” says Scarpiniti. “That level of interaction is a powerful motivator for students and greatly increases their engagement.”