comsar — Computational Music and Sound Archiving
comsar is a Python toolkit for content-based analysis of music and sound, with a focus on ethnomusicology (timbre, pitch/melody, tonal systems, rhythm and corpus visualisation with Self-Organizing Maps).
It is the top layer of a three-package stack maintained by Rolf Bader:
| Package | Role | Repository |
|---|---|---|
| apollon | Backbone: audio I/O, feature extraction, HMM, SOM (C-accelerated) | codeberg.org/rbader/apollon |
| chainsaddiction | Poisson Hidden-Markov-Models in C (used for rhythm / time-series) | codeberg.org/rbader/chainsaddiction |
| comsar | High-level music analysis (PitchTrack, TimbreTrack, tonal systems, SOM) |
codeberg.org/rbader/comsar |
This fork combines the modern comsar code base with the pitch-tracking and
tonal-system analysis (PitchTrack) merged back from the older comsar version.
Distribution names. The original PyPI names
apollon,comsarandchainsaddictionbelong to the upstream authors. This fork is published asbader-apollon,bader-comsarandbader-chainsaddiction. The import names are unchanged: you still writeimport comsar,import apollon, etc.
Installation (no compiler needed)
Pre-compiled wheels are provided for Windows, macOS and Linux (CPython 3.9–3.13). Installing comsar pulls apollon and chainsaddiction automatically:
pip install bader-comsar
To also run the example notebooks:
pip install bader-comsar jupyterlab
For source builds, step-by-step Windows/macOS/Linux instructions, and troubleshooting, see the full manual.
Quick start
from comsar import PitchTrack, TimbreTrack
# Pitch / melody / tonal-system analysis
pt = PitchTrack()
result = pt.extract("my_audio.wav")
print(result.features) # pandas DataFrame
# Timbre feature track
tt = TimbreTrack()
timbre = tt.extract("my_audio.wav")
Runnable notebooks are in examples/.
Documentation
- docs/MANUAL.md — full manual: architecture, installation, module reference, example walkthrough, troubleshooting, and how releases/wheels are built.
- examples/ — Jupyter notebooks for the main workflows.
License
BSD-3-Clause. Original work © Michael Blaß; this fork maintained by Rolf Bader.
Metadata
Release files for bader-comsar 0.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bader_comsar-0.0.15.tar.gz | 54.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bader_comsar-0.0.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.1 kB
Release files / bader_comsar-0.0.15.tar.gz
| Download URL | bader_comsar-0.0.15.tar.gz |
|---|---|
| Size | 54.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e48c6fbe77441646fff290c88043e92f6fc189ac870169b9f288e923fe9b0d2d
|
|
BLAKE2b-256 checksum How to use checksums |
9ec47d29a1a4f924886be830ab9c9c661533e26691d0d83510afad9c75df6149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / bader_comsar-0.0.15-py3-none-any.whl
| Download URL | bader_comsar-0.0.15-py3-none-any.whl |
|---|---|
| Size | 60.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81f0e4e921805f4d01253b4b6b32e9e5ec3ee4f8757cc902aa3cc3befee2f923
|
|
BLAKE2b-256 checksum How to use checksums |
3ed6027e536408c2659fdbed4fb99a92bf0ded232a4e80f582d61975657bfaa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logSecurity for bader-comsar 0.0.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for bader_comsar-0.0.15.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.