Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Count-In Beats, misc. #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kalegood
Copy link

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.


# create output file
cmd = [
ffmpeg,
"-i", joinedPath,
"-q:v", str(options.quality),
"-b:a", "320k",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

audio quality also suffered when removing same_quant. this solved it. This should probably be a command line option.

@aspiers
Copy link
Owner

aspiers commented May 20, 2023

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

jstma added a commit to jstma/ly2video that referenced this pull request May 20, 2023
 * 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 resonable default.
jstma added a commit to jstma/ly2video that referenced this pull request May 20, 2023
 * 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.
@jstma
Copy link

jstma commented May 20, 2023

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

jstma@e60fc40

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.

input.mp4

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants