Automated Rhythm Generation
ARG: Automated Rhythm Generation.
Let's generate rhythm game maps automatically!
Features
Neural Networks
- RhythmGen: Generate rhythm sequence from music piece.
- RGGRU: RhythmGen with CNN feature extractor and GRU. (
460K) - RGGRUAT: RhythmGen with CNN feature extractor, GRU, and multi-head attention. (
720K) - RGTR: RhythmGen with CNN feature extractor and Transformer. (
15M) - RGRoFormer: RhythmGen with CNN feature extractor, Transformer and RoPE. (
420K) - Others: RhythmGen with other architectures.
- RGGRU: RhythmGen with CNN feature extractor and GRU. (
- RhythmRec: Reconstruct music piece from rhythm sequence.
- No, we didn't implement this yet.
Utils
- RhythmAnnotation (
ryan): Rhythm annotation tool and format. See ryan for more details.
Installation
pip install automated-rhythm-generation
Training
from arg import Trainer
trainer = Trainer(
"RGGRU", # Model architecture
"JacobLinCool/taiko-2023-1.1", # Dataset
difficulty="hard",
num_epochs=300,
learning_rate=0.001,
batch_size=32,
max_length=10.0,
)
trainer.train(
push="JacobLinCool/RhythmGenGRU-1-hard",
hf_token=HF_TOKEN,
)
Or you can use the command line interface:
python -m arg.train RGGRU JacobLinCool/taiko-2023-1.1 --difficulty hard --push JacobLinCool/RhythmGenGRU-1-hard
Inference
from arg import RGGRU, generate_tja
import librosa
model = RGGRU.from_pretrained("JacobLinCool/RhythmGenGRU-1-hard")
audio, sr = librosa.load("path/to/music.mp3", sr=16000)
seq = model.predict(audio)
tja = generate_tja(seq)
with open("path/to/output.tja", "w") as f:
f.write(tja)
Or you can use the command line interface:
python -m arg.infer RGGRU JacobLinCool/RhythmGenGRU-1-hard path/to/music.mp3
Others
To see the model architecture: python -m arg.model.RGGRU, python -m arg.model.RGRoFormer, etc.
Metadata
Release files for automated-rhythm-generation 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| automated_rhythm_generation-0.0.1.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| automated_rhythm_generation-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.5 kB
Release files / automated_rhythm_generation-0.0.1.tar.gz
| Download URL | automated_rhythm_generation-0.0.1.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc1742aa0bf32cc69623b93416bcebd5ba25dda9092172f63bd4f00d5852054e
|
|
BLAKE2b-256 checksum How to use checksums |
f66fdfb98b867d9be6d37ada53d537f7e149637a6124ee1cbcb274e2b4e3aa54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.0
|
Release files / automated_rhythm_generation-0.0.1-py3-none-any.whl
| Download URL | automated_rhythm_generation-0.0.1-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b7e94611aa5488a210ac17722d4f79e96ee6f97175dc266dafadcb222d5fb1a
|
|
BLAKE2b-256 checksum How to use checksums |
63b51a39de35d41f78538b7f2fd59a656e8d1a9980c2908952738df0382007a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.0
|