lilypond-user
[Top][All Lists]
Advanced

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

Re: Transform notes in a variable?


From: Craig Comstock
Subject: Re: Transform notes in a variable?
Date: Sun, 1 Aug 2021 19:51:04 -0500

To be clear, I would like to transform all of the notes in a particular part or staff. Ideally defining a map like an alist is it in scheme?

\version "2.20.0"
riff = { c' r d' r }
<<
  \new Staff \riff
% \new Staff \transformOne \riff
>>

Where transformOne would map c’ to say e’ and d’ to g’’.

So I would expect to define transformOne something like 

((c' . e') (c' . g'’))

So I guess I need a clue about how to write a scheme function to change the pitch levels of an entire “staff”?

As well as some info on what exactly c’ is and how to specify it in an alist.

Thanks again. Sorry for posting two big questions requiring help so close to each other. I’ll keep digging myself and post if I come up with a solution myself. Fun to dig into lisp scheme again after not playing for a long time.

Cheers,
Craig

reply via email to

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