Convert beats per minute to animation frames.
Project description
bpm2fps
Match song beats to their closest frame for animation.
- Utility to convert beats per minute to animation frames.
- Data export to CSV or JSON.
- USD export for bouncing ball reference.
- Also available as cli / python utility
https://github.com/BreadMakesYouFull/bpm2fps
Preview
Install
Requires:
- python 3
- pyside6 (gui)
# Install
pip install bpm2fps[gui]
# ... or install without GUI
pip install bpm2fps
GUI
# Launch GUI
bpm2fps
Command line
Usage
./bpm2fps.sh --help
usage: cli.py [-h] [-s START] [-e END] [-b BPM] [-f FPS]
bpm2fps - Match song beats to their closest frame.
options:
-h, --help show this help message and exit
-s START, --start START
Start time (seconds).
-e END, --end END End time (seconds)
-b BPM, --bpm BPM Beats per minute
-f FPS, --fps FPS Frames per second
Example
./bpm2fps.sh --bpm 120
# Result:
[
{
"beat": 0,
"frame": 0.0,
"second": 0.0
},
{
"beat": 1,
"frame": 12.0,
"second": 0.5
},
{
"beat": 2,
"frame": 24.0,
"second": 1.0
},
# ... and so on
]
Example chained with jq
to get only beat frames:
./bpm2fps.sh --bpm 120 | jq '.[]["frame"]'
# Result:
0
12
24
36
48
60
72
84
96
108
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bpm2fps-1.0.1.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file bpm2fps-1.0.1.tar.gz
.
File metadata
- Download URL: bpm2fps-1.0.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e064067aa970f6f0c3ae8a6bcfcc08ebf0afc5d1fef7e010a5e98e9d291bfe19 |
|
MD5 | f55b1f18e47c0b30602c41d5fd4eb6fd |
|
BLAKE2b-256 | d6a153816cd5bad1ae7be7a00751b4cad3d8e541ee5fc25c9d4b67735ef940a5 |
File details
Details for the file bpm2fps-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: bpm2fps-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ab69e2ea127671b53f92425693dfa2d98a2a9fcf6a63c7ddfe84a1c7804c08 |
|
MD5 | d4b1d10c1dd2335dcdbf9da78ef27896 |
|
BLAKE2b-256 | 017f6667829213c9b22475974665c35fc6285665be5efc2eee450b97eb977d4a |