Re: lilypond score in youtube video

2020-03-22 Thread Noeck
Hi Martin,

there is ly2video by Adam Spiers:
https://github.com/aspiers/ly2video

And you will find more in this thread from 2016:
http://lilypond.1069038.n5.nabble.com/Generation-of-Notation-Videos-with-Lilypond-Tool-Chain-td188204.html

One main idea is to use an infinitely wide page and just one line:
https://lilypond.org/doc/v2.20/Documentation/notation/one_002dline-page-breaking
and then scroll horizontally trough it.

HTH
Joram



Re: lilypond score in youtube video

2020-03-22 Thread Karlin High
On Sun, Mar 22, 2020 at 5:34 AM Martin Tarenskeen
 wrote:
> I want to make some YouTube video's combining audio and Lilypond created
> pages.

I think Knut Petersen's MKVIDEO works much like you've described. I've
used it for several score video projects.





-- 
Karlin High
Missouri, USA



Re: lilypond score in youtube video

2020-04-08 Thread Martin Tarenskeen




On Sun, 22 Mar 2020, Karlin High wrote:


On Sun, Mar 22, 2020 at 5:34 AM Martin Tarenskeen
 wrote:

I want to make some YouTube video's combining audio and Lilypond created
pages.


I think Knut Petersen's MKVIDEO works much like you've described. I've
used it for several score video projects.







I investigated and tried some of the existing threads and projects. Never 
quite got them completely working, due to missing dependencies, 
differently named libraries and locations on my system, and 
slightly different personal wishes.


But I was able to get some ideas of how to get what I want. I now have 
found my own workflow using the different tools I have on my system 
(Lilypond, ffmpeg, imagemagick/convert, openshot) and created my first 
working video.


Thanks for the suggestions, you all.

--

MT




Re: lilypond score in youtube video

2020-04-08 Thread Valentin Villenave
On 4/8/20, Martin Tarenskeen  wrote:
> I now have found my own workflow

Well, do feel free to share :-)

Cheers,
V.



Re: lilypond score in youtube video

2020-04-09 Thread Martin Tarenskeen




On Wed, 8 Apr 2020, Valentin Villenave wrote:


On 4/8/20, Martin Tarenskeen  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