Skip to main content

Toolkit for beat detection.

Project description

maddad

Toolkit for beat detection.

Installation

You can install by pip.

pip install git+https://github.com/tky823/maddad.git

or clone this repository.

git clone https://github.com/tky823/maddad.git
cd maddad
pip install -e .

Usage

From file:

>>> from maddad.pipelines.beat_and_downbeat import BeatThisPipeline
>>> audio_path = "audio.mp3"
>>> decoder = "dbn"  # "minimal" or "dbn"
>>> pipeline = BeatThisPipeline.build_from_pretrained("official_beatthis", decoder=decoder, device="cpu")
>>> output = pipeline(audio_path)
>>> output["beat"]
tensor([ 0.0600,  0.8400, ..., 40.7000])
>>> output["downbeat"]
tensor([ 0.0600,  3.1200, ..., 39.8200])

From tensor:

>>> import torchaudio
>>> from maddad.pipelines.beat_and_downbeat import BeatThisPipeline
>>> audio_path = "audio.mp3"
>>> decoder = "dbn"  # "minimal" or "dbn"
>>> waveform, sample_rate = torchaudio.load(audio_path)
>>> waveform = waveform.mean(dim=0)  # Channel dimension should be removed.
>>> pipeline = BeatThisPipeline.build_from_pretrained("official_beatthis", decoder=decoder, device="cpu")
>>> output = pipeline(waveform, sample_rate=sample_rate)
>>> output["beat"]
tensor([ 0.0600,  0.8400, ..., 40.7000])
>>> output["downbeat"]
tensor([ 0.0600,  3.1200, ..., 39.8200])

License

  • CC BY-NC 4.0

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

maddad-0.0.3.tar.gz (44.4 kB view details)

Uploaded Source

Built Distributions

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

maddad-0.0.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (6.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

maddad-0.0.3-cp313-cp313-macosx_11_0_arm64.whl (211.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

maddad-0.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

maddad-0.0.3-cp312-cp312-macosx_11_0_arm64.whl (211.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

maddad-0.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (6.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

maddad-0.0.3-cp311-cp311-macosx_11_0_arm64.whl (210.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

maddad-0.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (6.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

maddad-0.0.3-cp310-cp310-macosx_11_0_arm64.whl (207.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file maddad-0.0.3.tar.gz.

File metadata

  • Download URL: maddad-0.0.3.tar.gz
  • Upload date:
  • Size: 44.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for maddad-0.0.3.tar.gz
Algorithm Hash digest
SHA256 cffc599496add75f1cb90515be89593c605f99340254e328574bbb3aa2df3f6b
MD5 9e347b3655d249d3ebadbf0afd80ef70
BLAKE2b-256 902d824841f03025100d2029560c49cafeecfce73f49b4902d1fb832818a981a

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3.tar.gz:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 65871f65fd25893046c6bf22381fea5e7af7cf84bb5f12f78499bf4d4a2cfde5
MD5 bd5f3f865238d56949923021b9cd756e
BLAKE2b-256 8028d22ec0947adbed462dcb9f90bff2fbabf1868c2181cfad7a6b7ab6196d1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cc0a3f82d3fe1b3eff41f5856e78901064ea367f5ef6a77cb7ac76be1fe99569
MD5 8fe9dfe359bfe633ac9cd6ead2ccc9c6
BLAKE2b-256 43c1694c833e017614426b159069f03264dfe2bdbfee3f260493585c15871424

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 03812b64bbce1033f4342f308bb096432d349b3e085322327db8667d3f511cb2
MD5 a37615e6a5163305d4ed56a0cc80d324
BLAKE2b-256 cbda129bb57f5fca88aee8817c3ed878535efa3079df5623e8beaf46da9946e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 752a1866afa849c9a85037532727a360130f02ef1c2afe825a9a9ddf49f2b7af
MD5 756de319562d18fd3cee9f1b52eb8385
BLAKE2b-256 89b374c2a076f60136fcb089f9fb2e56025a774455ebeebf2e4caa80e0d3e173

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fa90b49fce88c298e6f750c50464d53785832c7faf3ba0ca2566cafdacd108e3
MD5 c060192459751fd7b3c88f7336650045
BLAKE2b-256 5d263eafd97ecec3c0d1297c29df7fb8cf981b28c1a372992c55ff0c4b49bfb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fecf786a1a48c246a517536f9fa835deaf07c2efa07c5ed0cccd272892e9b854
MD5 0f1a6e05cea66b19fb8c5f3ca2b7bebd
BLAKE2b-256 a41590d3b195cb3e990c7846d08af888ada8bbfcd9f09412e0964b9c015b21bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ec8d5bdb506799751e6bc9e18f9e8d3ef06a7d60701589cf3e0c5c4a922d26de
MD5 88a8af7ab6b36d0951b1edf2e6d370b6
BLAKE2b-256 a174c24bbea917f4f96a3be38c82c6083332104e3b466c4e9bd0ce061f35d82e

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maddad-0.0.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for maddad-0.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6614876b458c86453542aa7588e5aaf41f7993ef78d238fa36946c209dec54ee
MD5 ebc2415005a7d7a7101803fbeda25135
BLAKE2b-256 542be7bdf039755d22a270ceca037883a29f7f926ba14072dcbc41191665672c

See more details on using hashes here.

Provenance

The following attestation bundles were made for maddad-0.0.3-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on tky823/maddad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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