lilypond-user
[Top][All Lists]
Advanced

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

Re: writing score in absolute time


From: Jean Abou Samra
Subject: Re: writing score in absolute time
Date: Tue, 7 Feb 2023 13:26:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

On 04/02/2023 18:28, Jacopo Greco d'Alceo wrote:
> Thank you Gregory for your complete answer.
> And you’ve seen it right. I’m not yet an Abjad user, but I looked at it with 
> interest - but never drown inside.
> I’m just another composer still dreaming about writing music easily with a 
> computer.
> I’ll take a look at what you sent me, but, joining Jean’s argument, i think I 
> did not have been clear.
> 
> Long time ago I started a project for a piece for diskclavier where I wrote a 
> score on the picture of the spectrogram of the electronic part.
> I used, as I said, bach inside max because you can quickly do and export in 
> .png a proportional notation. I just wrote a value and an absolute time for 
> each note and the game was done. Obviously bach is really approximative.
> An idea of what I would like to transpose in a score is a Csound score:
> 
> i.e.:
> 
>       name                            note starting                   
> duration                        midi note
>       of the staff                    point in seconds                of the 
> note             (or cent wherever..)
> 
> i     “violin”                                0                               
>         3s                              69
> i     “violin”                                .234s                           
> 1.4s                            50
> i     “violin”                                .345s                           
> 2.1s                            34
> i     “piano”                         0                                       
> 3s                              69
> i     “violin”                                0                               
>         3s                              54
> 
> and generate an A4 or just en image.


So you want something like this? Apologies if this isn't what
you're looking for, but the specifics still aren't very clear
to me.

\version "2.24.0"

\paper {
  page-breaking = #ly:one-line-auto-height-breaking
}

\layout {
  \context {
    \Score
    proportionalNotationDuration = #(ly:make-moment 1/4)
    \override SpacingSpanner.uniform-stretching = ##t
  }
}

at =
#(define-music-function (instrument point note) (string? exact-rational? 
ly:music?)
   #{ \context Staff = #instrument \after 1*#point #note <> #})

<<
  \new Staff = piano { s1*10 }
  \new Staff = violin { s1*10 }
  \cadenzaOn
  \at piano ##e0.5 e'4
  \at violin ##e0.6 e'4
  \at piano ##e0.75 f'4
  \at piano ##e1.0 g'1
  \at piano ##e2.5 c'8
  \at violin ##e3.0 c''32
>>


Of course, as others have noted, proportional notation doesn't work
anymore if you insert lots of very small notes, because LilyPond will
feel forced to avoid them colliding in spite of the proportional notation
setting. However, it should be possible to effectively stretch
proportionalNotationDuration automatically until there is enough
space for the entire score to be perfectly proportional. I guess
this isn't too much of an issue in practice, though?

Best,
Jean


Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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