raea song

Read a song's energy map: beats, bars, sections, builds, drops, stops, hits and cuts per bar.

View as Markdown

raea song listens to a song and writes its energy map, the file song(), useSong() and <SongPlot> read: the beats, downbeats and bars, each beat's loudness, onsets, brightness and low end, the sections, and the moments that matter to an edit (builds, drops, stops, hits, dips and breaks) with how many cuts each bar can carry. Cut to it and the edit moves with the music.

Terminal
raea song media/track.m4a                                # media/track.song.json beside it
raea song media/track.m4a --plot track.png               # and a picture of the map, to check it by eye
raea song media/track.wav --srt none -o map.json

Sections come from the song's own [Section] markers when it has them: an .srt named by --srt, else one beside the file, else the file's timed-text track (an .m4a's lyrics). Without markers they're found from where the music changes.

Usage

Terminal
raea song FILE [-o OUT.song.json] [--srt S.srt|none] [--plot OUT.png] [--size 2400x1350]   (the song's energy map: beats, sections, builds, drops, stops, hits, cuts per bar; also: --backend NAME)

Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.

Flags

FlagTakesWhat it does
--backendVALUEWhich of raea's decoders reads the audio (apple on a Mac by default). Rarely needed.
--plotOUT.pngAlso draw the map with <SongPlot> to a PNG, so a person can check it against the song.
--size2400x1350The plot's size in pixels.
--srtS.srt|noneThe subtitle file whose [Section] markers name the sections, or none to ignore markers and find sections from the music.
-oOUT.song.jsonWhere the map goes (the song's name with .song.json, beside it, by default).