Skip to main content

Sonosthesia tools for baking audio analysis data

Project description

sonosthesia-audio-pipeline

Python based tooling to analyse audio files and write results to file for use in realtime visualization apps. Results can be written using Message Pack for efficient (de)serialization or JSON for human readable output. Readers are provided for the Unity timeline, to be used alongside the original audio files.

Installation

Installation requires python (version 3.9 to 3.12 are supported). Once you have python you can run

pip install sonosthesia-audio-pipeline

Python Pipeline

Sound Analysis

Librosa is used to extract audio features which are of particular interest for driving reactive visuals, notably:

  • Beats and tempo
  • RMS magnitude
  • Energy in low, mid and high frequency bands
  • Onsets
  • Spectral centroid and bandwidth

The analysis data is writen to a file using MessagePack which is highly efficient both in terms of size and (de)serialization performance. The serialized data is an array of dictionaries each of which represents a time step

{
    'time': float,
    'rms': float,
    'lows': float,
    'mids': float,
    'highs': float,
    'centroid': float,
    'onset': bool
}

There is a preview mode which uses matplotlib to present analysis data

kepler

Source Separation

Currently using Demucs because it seems to score better on overall SDR and is a lot easier to install with pip than Spleeter.

Look into using Essentia which seems to be good for highler level musical descriptors.

Notes

  • Can install python with chocolatey or homebrew
  • Note works with Python up to 3.12, issues with 3.13 as both librosa and matplotlib do not support it
  • Exit command prompt on windows with Ctrl Z and enter
  • Locate interpreter on windows with python -c "import os, sys; print(os.path.dirname(sys.executable))"

Unity Timeline

The com.sonosthesia.audio package provides tooling which allows audio analysis files generated using the Python Pipeline described above to be played alongside corresponding timeline audio through sonosthesia signals

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sonosthesia_audio_pipeline-0.0.9.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sonosthesia_audio_pipeline-0.0.9-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file sonosthesia_audio_pipeline-0.0.9.tar.gz.

File metadata

File hashes

Hashes for sonosthesia_audio_pipeline-0.0.9.tar.gz
Algorithm Hash digest
SHA256 f73c4aba0e4f21117f9d4e12dbc3727bdcee8e58512a5ac9fff5f22669f4cd21
MD5 95235de63db11c2b165d8bb32da3d3f6
BLAKE2b-256 1dbf899f3d9679faff1be2327fba216f8b84b6f13c2b649dfc840da1ab317d95

See more details on using hashes here.

File details

Details for the file sonosthesia_audio_pipeline-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for sonosthesia_audio_pipeline-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3e26e6b09f64fb5a10f28d9808a88f43034f9083d4f240994a9e4f8b041021a0
MD5 6f81e237ad803df560fd916f8b29cde5
BLAKE2b-256 7d68596d847ad1839231977728a88a08e481798473148d8b5fc3a3a0c2a43094

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page