lilypond-user
[Top][All Lists]
Advanced

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

Re: Testing testing is there connection?


From: darkijah
Subject: Re: Testing testing is there connection?
Date: Fri, 14 May 2021 07:06:26 +0200
User-agent: Gigahost Webmail

Okay I have now tried to look further into it with a cop of coffee, and tried to remove things I do not need to try to unlock its secrets but this coding might be over my head of advancement. It works as you say like I want it - very very nice to see it work. I have made this file slimmer to try to help myself as I always do, when I try to re engineer things, breaking things on purpose and moving along slimming things down. I need some more help on this, if I am going to move forward I am afraid - anyone out there with the skills and some time at there hand that would have a fun time helping me :)

We might also add some Colors I am thinking. Maybe with more understanding I could sort out a script that was easy for newbies to start with so they can them self easily set it up. The Color script was fixed with all the note colors, I will further try to improve it - and update as I go on for easy adding for Sheets.

I would like the same with this - thanks for the Code, you showed me it was possible but I am having far more difficulty trying to sort out a kinda way of making to do what I want.

Here is where I am so far! With learning more on Lilypond I can maybe chop of more unnecessary code but fourth day with the app but learning! ;)

The first and the last note does not work, I have put them there to show the beginning and the end of the script working making automatically pictures for fingeren. It is very very neat to see it work!!! :) Took me a long time to just fix a minor Sheet with 32 notes, I did not count the time but very time consuming and putting the one two tree four five six Fingering to the flutes each and every one of them, it is a lot of Code, but with automatically scripting, it could take as less as 2 seconds to do however many notes one have so I think it could be worth it on many levels - maybe someone would love to go on Jitsi and have a talk about the code, if anyone is up for it! :) :

\version "2.18.0"

#(define semitone->canon
(make-semitone->pitch (music-pitches #{ c cis d dis e f fis g gis a ais b #})))

#(define (black-key? canon)
  (not (zero? (ly:note-alteration canon))))

#(define (c-griff start end pressed)
(define (add-circle prev n filled?)
#{ \markup \combine #prev
\translate #(cons (- 3 (modulo n 3))
(- (/ n 3)))
\draw-circle #0.35 #0.1 #filled? #})
(let loop ((i start)
(m #{ \markup \null #})
(pressed (member start (sort pressed <) <=)))
(if (> i end)
m
(loop (1+ i)
(add-circle m
(- i (- start (modulo start 3)))
(and (pair? pressed) (= (car pressed) i)))
(and pressed (member i pressed <))))))

Dia_engraver =
#(define-scheme-function ((parser location low hi) context)
(ly:pitch? ly:pitch?)
(let ((pitches '()) (cause #f))
(make-engraver
((start-translation-timestep engraver)
(set! pitches '())
(set! cause #f))
(listeners
((note-event engraver event)
(set! pitches (cons (ly:event-property event 'pitch) pitches))
(if (not cause)
(set! cause event))))
((process-music engraver)
(if cause
(let ((g (ly:engraver-make-grob engraver 'LyricText cause)))
(set! (ly:grob-property g 'text)
(c-griff (ly:pitch-semitones low)
(ly:pitch-semitones hi)
(map ly:pitch-semitones pitches)))))))))

#(use-modules (scm accreg))

treble =
\relative {
\tag full \clef "treble"
aes a ais bes b ces c cis des d dis ees e fes f fis ges g gis aes a ais bes b bis }

\new PianoStaff
<<
  \new Lyrics \with { \consists \Dia_engraver a b' }
              \removeWithTag full \treble
  \new Staff \treble
  { \clef "treble"}




reply via email to

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