Sound Hacking

Overview #

The idea behind the Sound Hacking github organisation is to take advantage of the latest advances of Machine learning and Audio processing to create innovative applications.

Interactive sound input #

  • inputs in microcontrollers for preprocessing interface to PC for further processing.
  • it’s also possible to have microcontroller standalone applications

Debug workflow #

  • it’s possible to debug an embedded sound processing system by injecting packets and retrieving the results

Topics #

Offline Preparation #

The Offline preparation is a necessary step to understand the signal and condition it for the target application where it will be used, that’s where Python with its scientific toolkits and machine learning environment will be used.

  • Signal Analysis
  • Machine Learning

Real Time Processing #

Smart applications are ones that instantly react to the user in an interactive, collaborative or assistive mode such as during tracking. Therefore an instant response of the system is what creates a feeling of connection with the instrument.

Real time Audio processing requires dedicated hardware acceleration to prevent delays.

Capture #

It’s about capture of audio and other user inputs. Audio goes through I2S microphone arrays connected to microcontrollers. Other user inputs can be accelerometer or touch interfaces that are to be used as control for sound generation

  • Microphones
  • Accelerometers
  • smart touch surface
  • USB interfaces (Audio / HID / Serial Data)

Display #

The output should not only be hearable as a sound signal but also visual in order to assist the interaction.

  • webapp view of live audio signal
  • Status feedback through LEDs

Microcontrollers #

Microcontrollers in scope :

  • STM32 based on ARM-M4
    • Black pill : STM32F411 (USB)
    • Audio Discovery : STM32F407 (USB, stereo out)
    • DevEBox : STM32F407 (USB, SDCARD)
  • ESP32 (wifi / BT)
  • nRF52 (custom RF / BT)

Example integration of cubemx with pio :

Repositories #

pystream #

  • List audio devices
  • Test Audio input and output
  • connect inputs to outputs
  • process the live stream between input and output
  • generate tone

dependencies #

see sound #

  • a web app framework to see the sound in different forms
  • real-time analysis of played audio
  • Playing sound with html5 web Audio API

Live demo #

librosa_demo #

  • Jupyter notebooks to showcase librosa functions