Re: Separate dynamics from notes

2023-05-03 Thread Gianmaria Lari
Thanks Leo, very interesting! I report here, for other users, your same example adding the command displayLilyMusic at the end. When compiled, lilypond outputs (in the standard output) the resulting music expression. For example for the following code: \version "2.25.4" %%

Re: Separate dynamics from notes

2023-05-02 Thread Leo Correia de Verdier
If not too late, here is an example, based on Jeans code in https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00209.html %% convertToSkips = #(define-music-function (music) (ly:music?) (music-map (lambda (m) (if (or (music-is-of-type? m 'rest-event)

Re: Separate dynamics from notes

2023-04-29 Thread Andrew Bernard
Minimum Working Example. It's customary protocol to try to reduce your problem or query to its basic essence so that people on the list can help out. MWE's are described here: https://lilypond.org/tiny-examples.html MWE is the term that has come into use. Andrew On 29/04/2023 1:47 am,

Re: Separate dynamics from notes

2023-04-28 Thread Wols Lists
On 27/04/2023 13:57, Gianmaria Lari wrote: Thank you Leo for your answers and help. you’ll probably need to be a little more specific about the use case, perhaps also supply example code. Regarding my second question, let me try to be more clear I have a score. I want to write the

Re: Separate dynamics from notes

2023-04-28 Thread Gianmaria Lari
I have infinite esteem in cheerleader so if the message comes from one of them I will do all what them propose: - I will study what I can do with the edition engraver - and wait for your MWE :)) By the way, ahem what is a MWE? Grazie Kieren! g. On Fri, 28 Apr 2023 at 17:13, Kieren MacMillan

Re: Separate dynamics from notes

2023-04-28 Thread Kieren MacMillan
Hi Gianmaria! > And now I understand better the reason for the thread Kieren linked. > I probably have to go back to study the edition engraver :) I’m the EE’s biggest cheerleader, so I would never dissuade you from that study… but I really do think the \sendTo is either already exactly what

Re: Separate dynamics from notes

2023-04-28 Thread Jean Abou Samra
Le vendredi 28 avril 2023 à 15:08 +0200, Gianmaria Lari a écrit : > Dear Robin, > made some more tests. > Your code works well but it doesn't solve the problem because it returns the > "absolute" location of the notes while on the other hand in the variable > where you write the dynamic you use

Re: Separate dynamics from notes

2023-04-28 Thread Robin Bannister
Gianmaria Lari wrote: Your code works well but it doesn't solve the problem because it returns the "absolute" location of the notes while on the other hand in the variable where you write the dynamic you use a relative location. That's why I said primitive. One way to extend it, would be:

Re: Separate dynamics from notes

2023-04-28 Thread Pierre-Luc Gauthier
I often do math with those : { \override Score.BarNumber.break-visibility = ##(#t #t #t) % Begin forte <>\f % At bar 4, mezzo piano s1*#(- 4 1) <>\mp % At bar 20, forte s1*#(- 20 4) <>\f % At bar 30, pianissimo s1*#(- 30 20) <>\pp s1\fine } Sure, you have to carry the

Re: Separate dynamics from notes

2023-04-28 Thread Gianmaria Lari
Dear Robin, made some more tests. Your code works well but it doesn't solve the problem because it returns the "absolute" location of the notes while on the other hand in the variable where you write the dynamic you use a relative location. For example if I want to put a dynamic on the quarter

Re: Separate dynamics from notes

2023-04-28 Thread Kieren MacMillan
Hi Jean, > Are we talking about the same thing? The \sendTo ideas sound more like > they're solving the first question in the OP's original post than the second > question to me. Yes… I got confused about where we were in the conversation. Sorry! Kieren.

Re: Separate dynamics from notes

2023-04-27 Thread Gianmaria Lari
Thank you Jean, Kieren and Robin. I had a look at the edition engraver but it was not trivial to understand how to install it. Maybe I will try it again in the future. I had a look at the SendTo thread, thanks! And finally I tried the Robin code. Well, it looks like it's doing the job

Re: Separate dynamics from notes

2023-04-27 Thread Jean Abou Samra
Le jeudi 27 avril 2023 à 10:14 -0400, Kieren MacMillan a écrit : > Hi all, > > > This sounds like it might be a use case for Jan-Peter Voigt's "Edition > > engraver" tool. > > https://github.com/openlilylib/edition-engraver > > Ehhh… sounds to me more like a case for that “sendTo“ code we were

Re: Separate dynamics from notes

2023-04-27 Thread Robin Bannister
Gianmaria Lari wrote: This thing always seemed so inconvenient to me that I thought it was practically unusable. Or that there was some trick to maybe have Frescobaldi tell me the "position" of the note (meant as numbers of quarter or eight notes from the beginning). Here is a primitive

Re: Separate dynamics from notes

2023-04-27 Thread Kieren MacMillan
Hi all, > This sounds like it might be a use case for Jan-Peter Voigt's "Edition > engraver" tool. > https://github.com/openlilylib/edition-engraver Ehhh… sounds to me more like a case for that “sendTo“ code we were brainstorming last year:

Re: Separate dynamics from notes

2023-04-27 Thread Jean Abou Samra
Le jeudi 27 avril 2023 à 14:57 +0200, Gianmaria Lari a écrit : > Regarding my second question, let me try to be more clear > > I have a score. > I want to write the dynamics using a separate variable. > Suppose that on the first quarter of the tenth measure there is a "forte" and > then on the

Re: Separate dynamics from notes

2023-04-27 Thread Gianmaria Lari
Thank you Leo for your answers and help. > you’ll probably need to be a little more specific about the use case, > perhaps also supply example code. > Regarding my second question, let me try to be more clear I have a score. I want to write the dynamics using a separate variable. Suppose that

Re: Separate dynamics from notes

2023-04-26 Thread Leo Correia de Verdier
You can do like this if it’s useful to you, removing the engravers that read what you don’t want at a specific place. %% \version "2.25.1" rh = \fixed c' {c4\pp d\p e\f f\ff} \score { << \new Voice \with { \remove Dynamic_engraver } \rh \new Dynamics %Dynamics

Separate dynamics from notes

2023-04-26 Thread Gianmaria Lari
First question Suppose I wrote this score: \version "2.25.2" rh = \fixed c' {c4\pp d\p e\f f\ff} \score { \new Staff \rh } Is there any "automatic" way to extract the dynamics in the score (maybe assigning it to a variable)? At the end I would like to easily transform the previous code in