lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilypond score in youtube video


From: Martin Tarenskeen
Subject: Re: lilypond score in youtube video
Date: Thu, 9 Apr 2020 14:12:11 +0200 (CEST)



On Wed, 8 Apr 2020, Valentin Villenave wrote:

On 4/8/20, Martin Tarenskeen <address@hidden> wrote:
I now have found my own workflow

1. I created my score using LilyPond including (among other things) this:

#(set! paper-alist (cons '("myvideo" . (cons (* 16 cm) (* 9 cm))) paper-alist))
\paper {
  #(set-paper-size "myvideo")
  top-margin = 2\cm
  left-margin = 1\cm
  right-margin = 1\cm
  page-breaking = #ly:one-line-breaking
}
\header {
  tagline = ##f
}

2. A created a one-line png image and a midifile with lilypond's --png output option.

3. I checked the size of the png using the "identify" command. Height was 358 pixels, let's say 360 to make things easy. I also checked the width of the image.

4. I used convert (from ImageMagick) to produce a sequence of png images
https://youtu.be/I4coDW6pyU4 from this png image. Each image gets a size of 640 x 360 pixels (16:9 ratio), but I use horizontal shifts of 320 pixels. The number of images will be width/320

for i in `seq 0 $number_of_images`
do
        x=$((i*320))
        fn=`printf img%02d.png ${i}`
        convert -extract 640x360+${x}+0 oneline.png ${fn}.
done

5. I created a wav file from the midifile using Pianoteq. For other types of music I would probably use timidity. Using ffmpeg I converted my wav file to AAC (.m4a) format.

6. I then used OpenShot to import the sequence of images and the audio file. Openshot allows a framerate to be entered for the image sequence like "52 frames per 139 seconds". This way the total duration of the audio and the image sequence could be matched.

Another method I tried was to automatically generate a video file from an image-sequence using ffmpeg on the commandline. This is also a possibility.

7. My music was full of tempo and time changes, and some extra editing was required. But this gives you some idea about my workflow. The result can be found here, it's not perfect yet but I am learning.... :

https://youtu.be/I4coDW6pyU4

--

MT



reply via email to

[Prev in Thread] Current Thread [Next in Thread]