Joshua Stutter writes:
> I feel I should enter into the discussion here. I had a conversation
> with Paolo on lilypond IRC where he was wishing to accomplish
> something along the lines of:
>
> fun = #(define-music-function (parser location note dur) (ly:pitch?
> ly:duration?)
> #{ $note$dur #})
In my previous message I specified that I want to extract pitch and duration
from ly:music, not from ly:pitch + ly:duration.
func = #(define-music-function (parser location note dur) (ly:music) #{
$mypitch $myduration . #} )
That is because I want the possibility to call this kind
Wow, I did not know that, thanks. I think I've learned the most today.
Joshua.
On 21/02/18 14:48, Malte Meyn wrote:
Am 21.02.2018 um 15:46 schrieb Malte Meyn:
Oh, I forgot to say: This doesn’t work with 2.18.2 so you’re
partially right.
And again I made a mistake: It *does* work but only
Am 21.02.2018 um 15:46 schrieb Malte Meyn:
Oh, I forgot to say: This doesn’t work with 2.18.2 so you’re partially
right.
And again I made a mistake: It *does* work but only if you surround the
pitch by ##{ #}
\version "2.18.2"
fun = #(define-music-function (parser location note dur) (ly:p
Am 21.02.2018 um 15:44 schrieb Malte Meyn:
Am 21.02.2018 um 15:40 schrieb Joshua Stutter:
[…]
fun = #(define-music-function (parser location note dur) (ly:pitch?
ly:duration?)
#{ $note$dur #})
and create notes from pitches and durations within #{ #}. I explained
that, to the best of my
Am 21.02.2018 um 15:40 schrieb Joshua Stutter:
[…]
fun = #(define-music-function (parser location note dur) (ly:pitch?
ly:duration?)
#{ $note$dur #})
and create notes from pitches and durations within #{ #}. I explained
that, to the best of my knowledge, this is not possible and new notes
I feel I should enter into the discussion here. I had a conversation
with Paolo on lilypond IRC where he was wishing to accomplish something
along the lines of:
fun = #(define-music-function (parser location note dur) (ly:pitch?
ly:duration?)
#{ $note$dur #})
and create notes from pitches an
Paolo Prete writes:
> Hello,
> is it possible to extract pitch and duration, inside a function, from
> a ly:music (a simple note) parameter?
> I would like to obtain something like:
> func = #(define-music-function (parser location note dur)
> (ly:music) #{ $mypitch $myduration . #} )
Hello,
is it possible to extract pitch and duration, inside a function, from a
ly:music (a simple note) parameter?
I would like to obtain something like:
func = #(define-music-function (parser location note dur) (ly:music) #{
$mypitch $myduration . #} )
... But I don't understand if i