lilypond-user
[Top][All Lists]
Advanced

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

Re: lilypond-user Digest, Vol 206, Issue 108


From: Amir Teymuri
Subject: Re: lilypond-user Digest, Vol 206, Issue 108
Date: Fri, 24 Jan 2020 10:08:12 +0100
User-agent: mu4e 1.2.0; emacs 25.2.2

Good morning,

@David thank you for the reference to the Guile Manual, and @Urs thank you for 
your
introduction!

Bests,
Amir

address@hidden writes:

> Send lilypond-user mailing list submissions to
>       address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
>       address@hidden
>
> You can reach the person managing the list at
>       address@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."
>
>
> Today's Topics:
>
>    1. Re: Scheme function evluates only once (Urs Liska)
>    2. Re: Scheme function evluates only once (David Kastrup)
>    3. Re: Scheme function evluates only once (Thomas Morley)
>    4. Re: Beams over rests and concaveness (Gilberto Agostinho)
>    5. Re: Odd Behaviour: \break after \repeat (David Wright)
>    6. partcombine & killCues (Michael Seifert)
>    7. Re: partcombine & killCues (Aaron Hill)
>    8. Clef change placement (Daniel Rosen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 23 Jan 2020 22:46:55 +0100
> From: Urs Liska <address@hidden>
> To: David Kastrup <address@hidden>, Amir Teymuri <address@hidden>
> Cc: lilypond-user <address@hidden>
> Subject: Re: Scheme function evluates only once
> Message-ID:
>       <address@hidden>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> I intended to write about the same, but when I came back home to switch
> the computer back on David had already replied, although in clearer
> words than I would have done.
>
> But let me take the opportunity to introduce you to Amir who I think
> has never posted on the LilyPond lists so far. For those who might
> phyiscally be able but failed to put a face to his name: he also was in
> Salzburg, watching the conference closely.
>
> For those who weren't there: We are in the lucky position to have Amir
> as my "intern" for some time. He is supposed to spend about 4-5 weeks
> of full time work with me, for which he'll be "reimbursed" in credit
> points equivalent to 1/3 of a semester for his master in music
> informatics. He will mostly spend his energy on openLilyLib, presumably
> helping with the integration of the extension mechanism into LilyPond
> but also working on some specific functionality we haven't decided yet.
> Additionally I hope he will integrate a number of functions into
> LilyPond that are now in openLilyLib, \shapeII being on top of my
> personal wish list.
>
> He'll start seriously in a few weeks, but an initial pull request and
> this question show that he's already started getting familiar with the
> matter.
>
> Best
> Urs
>
> Am Donnerstag, den 23.01.2020, 21:33 +0100 schrieb David Kastrup:
>> Amir Teymuri <address@hidden> writes:
>> 
>> > Hi,
>> > 
>> > this is just a nonsense exercise for me to get to know LilyPond
>> > better!
>> > I can't figure out why in the following the #(rnd-col) is evaluated
>> > only
>> > once and not upon each compilation of my ly file? The first time i
>> > compile this i will get the four colors displayed:
>> > 
>> > (0.5 0.5 0)
>> > (0.5 0 1.0)
>> > (0.5 0 1.0)
>> > (0 0.5 1.0)
>> > 
>> > which however doesn't change in next compilations, so that there is
>> > no
>> > color change. Can someone explain what am i missing?
>> > Thanks
>> > 
>> > 
>> > %%
>> > \version "2.19.83"
>> > 
>> > #(define (rnd-col) (map (lambda (x) (* x 0.5)) (list (random 3)
>> > (random 3) (random 3))))
>> > 
>> > coloredAcc = #(define-music-function () ()
>> >           (newline)
>> >           (display (rnd-col))
>> >           #{              
>> >           \once \override Accidental.color = #(rnd-col)
>> >           #})
>> > 
>> > \relative c'' {
>> >   \coloredAcc cisis
>> >   \coloredAcc cisis!
>> >   \coloredAcc cisis!
>> >   \coloredAcc cisis!
>> > }
>> > %%
>> 
>> Guile manual:
>> 
>> File: guile.info,  Node: Random,  Prev: Bitwise Operations,  Up:
>> Numbers
>> 
>> 6.6.2.14 Random Number Generation
>> .................................
>> 
>> Pseudo-random numbers are generated from a random state object, which
>> can be created with ‘seed->random-state’ or ‘datum->random-
>> state’.  An
>> external representation (i.e. one which can written with ‘write’ and
>> read with ‘read’) of a random state object can be obtained via
>> ‘random-state->datum’.  The STATE parameter to the various functions
>> below is optional, it defaults to the state object in the
>> ‘*random-state*’ variable.
>> 
>> [...]
>> 
>>    Note that the initial value of ‘*random-state*’ is the same every
>> time Guile starts up.  Therefore, if you don’t pass a STATE parameter
>> to
>> the above procedures, and you don’t set ‘*random-state*’ to
>> ‘(seed->random-state your-seed)’, where ‘your-seed’ is something that
>> _isn’t_ the same every time, you’ll get the same sequence of “random”
>> numbers on every run.
>> 
>>    For example, unless the relevant source code has changed, ‘(map
>> random (cdr (iota 30)))’, if the first use of random numbers since
>> Guile
>> started up, will always give:
>> 
>>      (map random (cdr (iota 19)))
>>      ⇒
>>      (0 1 1 2 2 2 1 2 6 7 10 0 5 3 12 5 5 12)
>> 
>>    To seed the random state in a sensible way for non-security-
>> critical
>> applications, do this during initialization of your program:
>> 
>>      (set! *random-state* (random-state-from-platform))
>> 
>> 
>> 
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 23 Jan 2020 23:11:30 +0100
> From: David Kastrup <address@hidden>
> To: Urs Liska <address@hidden>
> Cc: Amir Teymuri <address@hidden>, lilypond-user
>       <address@hidden>
> Subject: Re: Scheme function evluates only once
> Message-ID: <address@hidden>
> Content-Type: text/plain
>
> Urs Liska <address@hidden> writes:
>
>> Hi,
>>
>> I intended to write about the same, but when I came back home to switch
>> the computer back on David had already replied, although in clearer
>> words than I would have done.
>
> Since I only quoted the Guile manual, any clarity has to be credited to
> the people writing that section.
>
> -- 
> David Kastrup
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 23 Jan 2020 23:20:47 +0100
> From: Thomas Morley <address@hidden>
> To: Urs Liska <address@hidden>
> Cc: David Kastrup <address@hidden>, Amir Teymuri <address@hidden>,
>       lilypond-user <address@hidden>
> Subject: Re: Scheme function evluates only once
> Message-ID:
>       <address@hidden>
> Content-Type: text/plain; charset="UTF-8"
>
> Am Do., 23. Jan. 2020 um 22:47 Uhr schrieb Urs Liska <address@hidden>:
>
>> But let me take the opportunity to introduce you to Amir who I think
>> has never posted on the LilyPond lists so far.
>
> German Forum?
> https://lilypondforum.de/index.php/topic,214.msg1333.html
>
> Cheers,
>   Harm
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 23 Jan 2020 15:28:17 -0700 (MST)
> From: Gilberto Agostinho <address@hidden>
> To: address@hidden
> Subject: Re: Beams over rests and concaveness
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=us-ascii
>
> Hi Carl,
>
> Thank you so much for the reply, I will report this in the bugs subforum.
> Also, thanks for the workaround, I will use it for the moment being.
>
> Best,
> Gilberto


-- 
Amir Teymuri



reply via email to

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