Re: Help with music function

2023-12-18 Thread Mark Probert
Many thanks, Aaron. A clear and helpful answer! The “why” was simply an exercise in seeing if I could cleanup a LP file by using such syntactic sugar (to which the answer is no :-) ). Thanks again ..m. > On 19 Dec 2023, at 07:05, Aaron Hill wrote: > > On 2023-12-17 9:33 pm, Mark Probert

Re: Help with music function

2023-12-18 Thread William Rehwinkel via LilyPond user discussion
Dear Mark, I did this in a slightly different way...if you do \displayMusic c4\rest you can see how to represent a rest using the make-music procedure in scheme code. Modifying that a bit, I got % \version "2.25.6" %\displayMusic c4\rest = %(make-music %'RestEvent

Re: Help with music function

2023-12-18 Thread Aaron Hill via LilyPond user discussion
On 2023-12-17 9:33 pm, Mark Probert wrote: Hi. I'm struggling some with writing a music function for rests. Basically I want to be able to write something like \rel-rest( b', 1) Minor nit: Functions in LilyPond do not use parentheses and commas for arguments in this way. You need only

Help with music function

2023-12-17 Thread Mark Probert
Hi. I'm struggling some with writing a music function for rests. Basically I want to be able to write something like \rel-rest( b', 1) which would place a dotted quarter rest on the indicated pitch (the equivalent of b'1\rest I'm starting with rel-rest = #(define-music-function (pit dur)

Re: Help with music-function generating music

2014-03-27 Thread Urs Liska
(+ i 1) (append nts (list (ly:music-deep-copy note) (else ;; when done, return the music (make-music 'SequentialMusic 'elements nts) { \myNotes g'16 #8 } -- View this message in context: http://lilypond.1069038.n5.nabble.com/Help-with-music

Re: Help with music-function generating music

2014-03-27 Thread David Kastrup
Urs Liska u...@openlilylib.org writes: \version 2.18.0 myNotes = #(define-music-function (parser location note num) (ly:music? number?) Returns a series of notes. @var{note} is repeated @var{num} times. @var{note} is supposed to be a single note. ;; iteration by named let

Re: Help with music-function generating music

2014-03-27 Thread Paul Morris
-deep-copy. Thanks! That does look like a better approach. -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Help-with-music-function-generating-music-tp160833p160879.html Sent from the User mailing list archive at Nabble.com

Help with music-function generating music

2014-03-26 Thread Urs Liska
Hi all, I'm completely at a loss and need to get some help and pushes in the right direction. I'm for the first time trying to write a music function that actually gerenates music events on its own, i.e. that doesn't use #{ #} to output music. The sections in the Scheme tutorial in the

Re: Help with music-function generating music

2014-03-26 Thread Paul Morris
.1069038.n5.nabble.com/Help-with-music-function-generating-music-tp160833p160857.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user

Re: Help with music-function generating music

2014-03-26 Thread Urs Liska
: http://lilypond.1069038.n5.nabble.com/Help-with-music-function-generating-music-tp160833p160857.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo

Re: Help with music-function generating music

2014-03-26 Thread Paul Morris
#1 #-1/2 \makeFourQuarterNotes #0 #2 #1/2 } -- View this message in context: http://lilypond.1069038.n5.nabble.com/Help-with-music-function-generating-music-tp160833p160861.html Sent from the User mailing list archive at Nabble.com. ___ lilypond

Re: Help with music-function generating music

2014-03-26 Thread TaoCG
. What kind of override do you want to apply to the notes? Regards, Tao -- View this message in context: http://lilypond.1069038.n5.nabble.com/Help-with-music-function-generating-music-tp160833p160866.html Sent from the User mailing list archive at Nabble.com

Re: Help with music-function generating music

2014-03-26 Thread Paul Morris
) (append nts (list (ly:music-deep-copy note) (else ;; when done, return the music (make-music 'SequentialMusic 'elements nts) { \myNotes g'16 #8 } -- View this message in context: http://lilypond.1069038.n5.nabble.com/Help-with-music-function-generating-music

Help debugging music function

2012-11-05 Thread Vivian Barty-Taylor
Could someone with knowhow help me to debug this music function? I want a function to create arrows in a Lilypond score: arrow = #(define-music-function (parser location arg1 ) ( pair?) #{ \markup { \line \draw-line #arg1 \arrow-head #X #RIGHT ##t }} #}) When I process: \version 2.16.0

Re: Help debugging music function

2012-11-05 Thread Thomas Morley
2012/11/5 Vivian Barty-Taylor belast...@vivbt.nl: Could someone with knowhow help me to debug this music function? I want a function to create arrows in a Lilypond score: arrow = #(define-music-function (parser location arg1 ) ( pair?) #{ \markup { \line \draw-line #arg1 \arrow-head #X

Re: Help debugging music function

2012-11-05 Thread David Kastrup
Vivian Barty-Taylor belast...@vivbt.nl writes: Could someone with knowhow help me to debug this music function? I want a function to create arrows in a Lilypond score: arrow = #(define-music-function (parser location arg1 ) ( pair?) #{ \markup { \line \draw-line #arg1 \arrow-head #X

Re: Help, simple music function not compiling

2011-01-31 Thread Eric Dedieu
%% the function that will fail tempoMarkEqual = #(define-music-function (parser location before after)  (string? string?)  #{  \mark \markup \tiny { \note $before #1 = \note $after #1 }  #} ) with a '#' before $before and $after, it works. Thanks a lot ! Can somebody explain why the #s

Help, simple music function not compiling

2011-01-29 Thread Eric Dedieu
Hi lilypond helpers, Here is a small program that does not compile: --- \version 2.12.3 %% the function that will fail tempoMarkEqual = #(define-music-function (parser location before after) (string? string?) #{ \mark \markup \tiny { \note $before #1 =

Re: Help, simple music function not compiling

2011-01-29 Thread Xavier Scheuer
On 29 January 2011 23:23, Eric Dedieu papa.e...@free.fr wrote: Hi lilypond helpers, Here is a small program that does not compile: --- \version 2.12.3 %% the function that will fail tempoMarkEqual = #(define-music-function (parser location before after)