RE: Question about page break time indices

2015-12-30 Thread Dirk Klamer
Carl,

Use the the bar numbers and the timing of a single (average) bar duration to
calculate the time somewhere in the music
Is this a option?

Kind regards, Dirk


-Original Message-
From: lilypond-user-bounces+klamer=zonnet...@gnu.org
[mailto:lilypond-user-bounces+klamer=zonnet...@gnu.org] On Behalf Of Carl
Peterson
Sent: woensdag 30 december 2015 8:11
To: lilypond-user@gnu.org
Subject: Question about page break time indices

All,

I am involved in some choral 
recording projects where we are 
having the singers sing from 
projected slides. To aid in timing, 
pitch, etc., we have it set up where 
they have headphones feeding them the 
MIDI of the song being recorded as 
they sing. All of this is synchonored 
through the recording software, with 
the slides being pre-rendered to a 
video file.

Right now, the music slides are being 
created in Finale (cringe), the MIDI 
is being manually input into the 
recording software because we've had 
issues with Finale's MIDI being 
accurate on tempo changes, and I am 
using Apple Keynote to render the 
slides to video using manual timings.

I would like to use Lilypond to 
render the individual slides and the 
MIDI, then use ffmpeg and some other 
things to programmatically render the 
video itself. The issue is that in 
order to do that, I need accurate 
timing information on slide changes.

Which gets to my question/request. Is 
there a way, when Lilypond is 
running, for it to output some sort 
of auxiliary file with some kind of 
tick/time code information about each 
page? In other words, what is the 
time index of the first note on a 
given slide/page? With this, I can 
work with scripting tools to work 
backwards from each time code to 
generate the still images for the 
transitions from slide to slide.

Thanks,
Carl


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


-
Geen virus gevonden in dit bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 2016.0.7303 / Virusdatabase: 4489/11286 - datum van uitgifte:
12/30/15

-
Geen virus gevonden in dit bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 2016.0.7303 / Virusdatabase: 4489/11286 - datum van uitgifte:
12/30/15


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Question about page break time indices

2015-12-30 Thread Malte Meyn


Am 30.12.2015 um 13:03 schrieb Thomas Morley:
> there were some similiar projects for videos etc, can't remember, though.
> Others?

There is ly2video: https://github.com/aspiers/ly2video For examples
search for ly2video on youtube.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Question about page break time indices

2015-12-30 Thread Thomas Morley
Hi Carl,

2015-12-30 8:10 GMT+01:00 Carl Peterson :
> All,
>
> I am involved in some choral
> recording projects where we are
> having the singers sing from
> projected slides. To aid in timing,
> pitch, etc., we have it set up where
> they have headphones feeding them the
> MIDI of the song being recorded as
> they sing. All of this is synchonored
> through the recording software, with
> the slides being pre-rendered to a
> video file.
>
> Right now, the music slides are being
> created in Finale (cringe), the MIDI
> is being manually input into the
> recording software because we've had
> issues with Finale's MIDI being
> accurate on tempo changes, and I am
> using Apple Keynote to render the
> slides to video using manual timings.
>
> I would like to use Lilypond to
> render the individual slides and the
> MIDI, then use ffmpeg and some other
> things to programmatically render the
> video itself. The issue is that in
> order to do that, I need accurate
> timing information on slide changes.

there were some similiar projects for videos etc, can't remember, though.
Others?
>
> Which gets to my question/request. Is
> there a way, when Lilypond is
> running, for it to output some sort
> of auxiliary file with some kind of
> tick/time code information about each
> page? In other words, what is the
> time index of the first note on a
> given slide/page? With this, I can
> work with scripting tools to work
> backwards from each time code to
> generate the still images for the
> transitions from slide to slide.
>
> Thanks,
> Carl


Not sure I fully understand, but is the following of some help for you?

\version "2.19.32"

#(define* (print-pages-first-bar-numbers layout pages #:optional print-to-file)
;; If `print-to-file is set #t the output is written to a file
;; otherwise usually displayed in Terminal
  (let* ((lines (map (lambda (page) (ly:prob-property page 'lines)) pages))
 ;; list of first systems of each pages
 (sys
   (map
 (lambda (line)
   (append-map
 (lambda (l)
   (let ((system-grob (ly:prob-property l 'system-grob)))
 (if (not (null? system-grob))
 (list system-grob)
 system-grob))
   )
 line))
 lines))
 ;; list of rhythmic-locations of first sys
 ;; returning a BarNumber and a moment, the moment is usually zero
 (sys-rhythmic-location
   (map
 (lambda (s)
   (if (and (not (null? s)) (ly:grob? (car s)))
   (grob::rhythmic-location (car s))
   #f))
 sys))
 (start-bar-numbers
   (map
 (lambda (r-l)
   (if (pair? r-l)
   (car r-l)
   #f))
   sys-rhythmic-location))
 (formatted-output
   (map
 (lambda (page b-nr)
   (if b-nr
   (format #f "page ~a starts with BarNumber ~a\n" page b-nr)
   (format #f "page ~a contains no music\n" page))
   )
 (iota (length pages) 1 1)
 start-bar-numbers)))
(if (not (null? start-bar-numbers))
(if print-to-file
(let* ((output-name (ly:parser-output-name))
   (outfilename (format "~a-page-first-bars.log" output-name))
   (outfile (open-output-file outfilename)))
  (if (output-port? outfile)
  (begin
(format #t "\n\tprinting to ~a" outfilename)
(for-each
  (lambda (i) (display i outfile))
  formatted-output))
  (ly:warning
(_ "Unable to open output file ~a to print the information")
outfilename))
  (close-output-port outfile))
(for-each display formatted-output)

\paper {
  #(define (page-post-process layout pages)
(print-pages-first-bar-numbers layout pages #t))
}

\header { title = "TITLE" }

\pageBreak

\score {
\new Staff {
\repeat unfold 2 {
  \time 4/4 c''1
  \time 3/4 d''2.
  \time 3/8 e''8 8 8
  \pageBreak
}
}
}

\markup "MARKUP"

\pageBreak

\score {
\new Staff {
\repeat unfold 2 {
  \time 4/4 c''1
  \time 3/4 d''2.
  \time 3/8 e''8 8 8
  \pageBreak
}
}
}


Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Question about page break time indices

2015-12-29 Thread Carl Peterson
All,

I am involved in some choral 
recording projects where we are 
having the singers sing from 
projected slides. To aid in timing, 
pitch, etc., we have it set up where 
they have headphones feeding them the 
MIDI of the song being recorded as 
they sing. All of this is synchonored 
through the recording software, with 
the slides being pre-rendered to a 
video file.

Right now, the music slides are being 
created in Finale (cringe), the MIDI 
is being manually input into the 
recording software because we've had 
issues with Finale's MIDI being 
accurate on tempo changes, and I am 
using Apple Keynote to render the 
slides to video using manual timings.

I would like to use Lilypond to 
render the individual slides and the 
MIDI, then use ffmpeg and some other 
things to programmatically render the 
video itself. The issue is that in 
order to do that, I need accurate 
timing information on slide changes.

Which gets to my question/request. Is 
there a way, when Lilypond is 
running, for it to output some sort 
of auxiliary file with some kind of 
tick/time code information about each 
page? In other words, what is the 
time index of the first note on a 
given slide/page? With this, I can 
work with scripting tools to work 
backwards from each time code to 
generate the still images for the 
transitions from slide to slide.

Thanks,
Carl


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user