A simple time signature vizualizer video script with a polygon graphic. It's not the only one out there, but this one caters to me.
pip install moviepy pillow numpyVisualizations are generated from a JSON file containing relevant data (audio location, timings info) in the following structure:
{
"wav": "location/audio_file.wav",
"map": [
{"sig": [4, 4], "bpm": 120, "bars": 8},
{"sig": [3, 4], "bpm": 140, "bars": 4},
{"sig": [7, 8], "bpm": 160, "bars": 2}
]
}A visualization can then be generated using a simple function call:
from signature_visualizer import create_signature_video
create_signature_video("song_data.json", "output.mp4", scale=2)With parameters
map_file: Path to JSON file with timing dataoutput_file: Output video filename (default: "output.mp4")scale: Video resolution multiplier (default: 1, creates 200x200px video)
Before usage, change the values of FONT_DEF, FONT_SIG and ACCENT_COLOR to what you personally want.
Currently, this script creates an MP4 video with: 200x200 pixel resolution (multiplied by scale), 24 FPS and synchronized audio from the input WAV file.