Metadata-Version: 2.4
Name: raynbpm
Version: 0.4.0
Summary: A pure-Python audio tempo and beat analysis engine
Author: RaynBPM Team
License: MIT
Keywords: audio,bpm,tempo,beat-detection,osu
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# RaynBPM 0.4.0

RaynBPM is an experimental, dependency-free Python library for audio tempo,
beat and tempo-change analysis. Its analysis algorithms are implemented in
Python using only the standard library.

## Runtime dependencies

None. Python 3.10+.

## Supported audio input

- Uncompressed PCM WAV: 8-bit unsigned, 16-bit signed, 24-bit signed,
  and 32-bit signed integer PCM.
- Mono and multichannel WAV (channels are downmixed to mono).

MP3, FLAC, OGG/Vorbis, AAC and other compressed formats are **not decoded**
in this release. Their codecs are substantial independent implementations;
RaynBPM will raise `UnsupportedAudioFormatError` rather than silently
pretending to support them.

## Install locally

```bash
py -m pip install .
```

## Use

```python
from raynbpm import RaynBPM

engine = RaynBPM(min_bpm=60, max_bpm=300)
result = engine.analyze("music.wav")

print(result.bpm)
print(result.confidence)
print(result.beats[:10])
for segment in result.timeline:
    print(segment.start, segment.end, segment.bpm)
```

## Command line

```bash
py -m raynbpm music.wav
```

## Build distribution

```bash
py -m pip install --upgrade build
py -m build
```

## Important accuracy note

Tempo estimation is inherently ambiguous: a rhythm may be interpreted at half
or double tempo, and syncopated or changing-tempo music can produce multiple
plausible answers. `confidence` is a heuristic score, not a calibrated
probability. Always verify the result against the audio and a trusted reference.

## Project structure

- `core/`: FFT and window functions
- `decoders/`: WAV PCM reader
- `analysis/`: spectrum, onset envelope, tempo and confidence
- `beats/`: beat-grid extraction
- `reports/`: JSON report export
- `tests/`: standard-library unit tests
