ly2video icon indicating copy to clipboard operation
ly2video copied to clipboard

Generate Count-In Beats, misc.

Open kalegood opened this issue 12 years ago • 2 comments

I've added the following items to create a count-in screen ability:

command line options beats, count-in, and tempo.

generateBeats to create screen

generateBeatsSilence to create silence

I've modified the following

the ffmpeg cat command to combine videos; I simply made this look for title, beats, and notes. It will probably fail if you leave one out. This needs to be improved.

generateSilence has become generateTitleSilence to differentiate from generateBeatSilence

It would be nice to have the ability to generate a click track rather than silence. Also, would be great if tempo and time signature could be pulled from lilypond file.

I've removed same_quant which degraded quality; I've added a few lines to restore it.

kalegood avatar Feb 15 '13 15:02 kalegood

This looks like a nice feature; unfortunately would need a volunteer to port it to the latest codebase.

aspiers avatar May 20 '23 13:05 aspiers

I started porting the changes. You can see them here:

https://github.com/jstma/ly2video/commit/e60fc40807acfd5fad891e01ab6535ca50cfe76f

It's not perfect though.

  • the beats are generated as files in /tmp/ly2video.../beats/ this is not the way ly2video does it now.

  • the count in stops, but then there is a delay before the score midi begins.

  • must supply a ttf file, but it wouldn't hurt to include an open source ttf font as a reasonable default.

And I just noticed that the bar doesn't follow the beats in time anymore. Probably related to the mystery delay.

https://github.com/aspiers/ly2video/assets/87273793/62a47dce-8c43-464b-95c7-9f6ff099f424

I created that with this command:

../../../ly2video/cli.py --title-ttf=/usr/share/fonts/truetype/ubuntu/UbuntuMono-RI.ttf --count-in --beats 4 --tempo 84 -i input.ly

Obviously things could be improved. We don't need to show a zero. A silent blank period before the 1 shows up is fine, but it's a little more complicated to do. The size of the font could be a proportion of the video height.

A little fancier would be to pulse the numbers in and out.

jstma avatar May 20 '23 22:05 jstma