Thursday, March 28, 2024

Signal Processing With Sonic Visualiser

Priya Ravindran

- Advertisement -

box 1

fig 3
Fig. 3: Locating beats using Vamp plugin

A spectrum can be considered a vertical slice of a spectrogram (a spectrogram describes the change in frequency over time). Brightness or colour of pixels indicates the phase changes. An online course explains a spectrogram thus, “Speech is a continuous flow: phones are not discrete or distinct from each other, but these merge into one another, and spectrograms assess and visualise this continuity.”

blurbBoth of these visualisations allow us to change the scale and range of the signal in display. We can even observe waveforms in different colours according to frequency. A very useful colour-rotation feature for sudden transitions helps isolate areas with similar signal levels. To obtain the spectrum or spectrogram, a series of Fourier transforms have to be applied to the signals. We can set window size for a frequency-time balance, fix window overlap to decide the proportion of overlap and select window shape from a list of Hamming, Hann (also known as Hanning), Blackman, Blackman-Harris and Nuttall (cosine based windows), Gaussian, Parzen, triangular and un-windowed (rectangular) options. Hann window is the default and should be appropriate for most purposes.

- Advertisement -

A few layers for handy viewing
For perfect time analysis of the signal, we can add vertical lines corresponding to a given time instant, label instants, display points differently, connect these via lines/curves or even segment regions. A note layer that helps group points as notes, a region layer to apply a particular operation on just a section of the signal and a text-and-image layer are also present.

Often, harmonic notes lead to confusion in audio analysis, and to help with this, this tool offers a harmonic scale to pinpoint respective signal frequencies. There is also a colour 3D-plot option for signals that have groups of frequencies at different time instants, with each group having its own value. The plot is not editable and appears only when a transform whose output is appropriate for grid display is applied, or when importing certain types of annotation data. For an instantaneous display of y-axis values of a 3D plot, we can invoke a slice layer. As Sonic Visualiser website puts it, “a slice is to a colour 3D plot as a spectrum is to a spectrogram.”

Plugins to generate new layers and create effects
Third-party plugins can be used with Sonic Visualiser to enhance understanding of the input signal. The general format for audio-analysis and feature-extraction plugins is Vamp, which takes in audio input and generates output compatible with display of Sonic Visualiser layers. We could also have plugins in Linux Audio Developer’s Simple Plugin API (LADSPA) or Disposable Soft Synth Interface (DSSI) formats to create effects like compression or to generate data using controlling parameters like sine-wave tone or white and pink noise.

Other simple, yet indispensable features
A measure tool helps us select the exact range of the signal we want to work with, or maybe observe repeatedly to detect something amiss. A friendly and appealing user interface lets us customise everything from default frequency to background colour.

Sonic Visualiser is structured around panes and layers. Panes are horizontally-scrollable areas that can be stacked one above the other, and a pane can have any number of layers in it. Easy export and import of audio files using export layer and handy annotation add to the glitz.

A mini iPod for signal processing
Processing a signal requires revisiting segments repeatedly, making changes to portions and studying results closely. Sonic Visualiser comes to our aid by offering a hassle-free playback-and-pause platform. Much like a media player, we can use keyboard shortcuts to control the signal being viewed. It is also easy to align different waveforms along the same time scale and instant. This comes in very handy while comparing signals to find differences between similar-looking ones or when viewing multiple files concurrently. We can even time-stretch playback, slowing it down to as little as ten per cent of the original speed, while retaining a synchronised display.

Version 2.5 released in October 2015 works on Pentium4 and AMD64 processors. Developed at Centre for Digital Music, Queen Mary, University of London, and partially funded by many organisations. Let us begin our experiments with audio signals.

Download latest version of the software


Priya Ravindran is a technical journalist at EFY

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators