Re: \relative versus \absolute (was Re: Macro/multiply notes)

2014-07-25 Thread David Nalesnik
On Sat, Jun 14, 2014 at 1:43 PM, Knute Snortum ksnor...@gmail.com wrote:

 I am still a novice at using LilyPond (maybe a sophomore) but I'd like to
 make one case for relative notes.  I'm typesetting a piece where there are
 a lot of octave scale runs between both hands.  It's very nice to be able
 to copy several beats or even bars of notes, irrespective of the clef, and
 paste them in.  You couldn't do that with absolute notation.


 Knute Snortum
 (via Gmail)


 On Fri, Jun 13, 2014 at 10:35 AM, Pierre Perol-Schneider 
 pierre.schneider.pa...@gmail.com wrote:

 2014-06-13 19:19 GMT+02:00 Kieren MacMillan 
 kieren_macmil...@sympatico.ca:

 Hello all,


 Hi Kieren,


 I now code everything in absolute mode, and cannot believe how such a
 little change has improved my life.


 +1


 But, as you say, “that’s just me”.  =)


 Not just you, Kieren... ;)

 Cheers,
 Pierre



For a long time, I exclusively used relative mode, but I'm having second
thoughts.

I just discovered that typesetting a piano piece which constantly uses
temporary voices is much easier in absolute mode. Switching from voice to
voice no longer gives any register surprises.

Absolute mode also tempts me to skip a few measures when I want to
procrastinate tackling a difficult spot but still want to keep working.

--David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \relative versus \absolute (was Re: Macro/multiply notes)

2014-07-25 Thread David Kastrup
David Nalesnik david.nales...@gmail.com writes:

 I just discovered that typesetting a piano piece which constantly uses
 temporary voices is much easier in absolute mode. Switching from voice
 to voice no longer gives any register surprises.

 Absolute mode also tempts me to skip a few measures when I want to
 procrastinate tackling a difficult spot but still want to keep
 working.

Well, there is always \resetRelativeOctave, and after getting the
octaves wrong, at most one note needs changing to get back into synch
anyway.

While the make-relative macro can help a lot, designing music
manipulating macros that don't do surprising things in \relative mode is
also tricky.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \relative versus \absolute (was Re: Macro/multiply notes)

2014-07-25 Thread Mark Polesky
On Fri, Jul 25, 2014 at 12:48 PM, David Kastrup d...@gnu.org wrote:

 David Nalesnik david.nales...@gmail.com writes:

  I just discovered that typesetting a piano piece which constantly uses
  temporary voices is much easier in absolute mode. Switching from voice
  to voice no longer gives any register surprises.
 
  Absolute mode also tempts me to skip a few measures when I want to
  procrastinate tackling a difficult spot but still want to keep
  working.

 Well, there is always \resetRelativeOctave, and after getting the
 octaves wrong, at most one note needs changing to get back into synch
 anyway.

 While the make-relative macro can help a lot, designing music
 manipulating macros that don't do surprising things in \relative mode is
 also tricky.


One can also use octave checks in relative mode:
http://lilypond.org/doc/v2.18/Documentation/notation/changing-multiple-pitches#octave-checks
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Macro/multiply notes

2014-06-14 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes:

 2014-06-13 17:42 GMT+02:00 Hlolli hlo...@gmail.com:
 Is is possible to do smoething like this:

 {c'8 d' e' d'}*4 - c'8 d' e' d' | c'8 d' e' d' | c'8 d' e' d' | c'8 d' e'
 d' ?

 Just to save space I was hoping that repetitive musical patterns could be
 repeted with multiplication/asterix sign?



 --
 View this message in context:
 http://lilypond.1069038.n5.nabble.com/Macro-multiply-notes-tp163291.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

 Afaik, closest you can do is:

 \version 2.18.0

 * =
 #(define-scheme-function (parser location number)(number?)
   (define-music-function (parser location music)(ly:music?)
 #{ \repeat unfold $number $music #}))

 *4 = \* 4
 *3 = \* 3
 *2 = \* 2

 { \*3 { \*4 { c'8 d' e' d' \*2 g'4 \bar || } \bar S } }

Ugh.  How about

\\* =
#(define-music-function (parser location n m) (number? ly:music?)
  #{ \repeat unfold $n $m #})

{ \*3 { \*4 { c'8 d' e' d' \*2 g'4 \bar || } \bar S } }

Saves defining separate commands and all that juggling with quotes.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \relative versus \absolute (was Re: Macro/multiply notes)

2014-06-14 Thread Knute Snortum
I am still a novice at using LilyPond (maybe a sophomore) but I'd like to
make one case for relative notes.  I'm typesetting a piece where there are
a lot of octave scale runs between both hands.  It's very nice to be able
to copy several beats or even bars of notes, irrespective of the clef, and
paste them in.  You couldn't do that with absolute notation.


Knute Snortum
(via Gmail)


On Fri, Jun 13, 2014 at 10:35 AM, Pierre Perol-Schneider 
pierre.schneider.pa...@gmail.com wrote:

 2014-06-13 19:19 GMT+02:00 Kieren MacMillan kieren_macmil...@sympatico.ca
 :

 Hello all,


 Hi Kieren,


 I now code everything in absolute mode, and cannot believe how such a
 little change has improved my life.


 +1


 But, as you say, “that’s just me”.  =)


 Not just you, Kieren... ;)

 Cheers,
 Pierre


 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \relative versus \absolute (was Re: Macro/multiply notes)

2014-06-14 Thread Hlolli
I would imagine that kind of practice, just squeeze musical material into
instruments into their suitable range will make you less sensitive to which
octave you are composing on. If it works for some, then good. Both in terms
of timbre and counterpoint I would want to know excacly if I'm working with
the a' on 440Hz or a'' ong 880Hz etc...



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Macro-multiply-notes-tp163291p163349.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: \relative versus \absolute (was Re: Macro/multiply notes)

2014-06-14 Thread Malte Meyn
Another aspect: on english keyboards, the single quote ' is easily 
reachable. But on german (and maybe other?) keyboards it’s further on 
the right and you need the shift key to get it; the neo layout (a german 
ergonomic layout which I use) also needs an extra key (called mod3, at 
qwerty’s caps lock position). So it’s easier not to have to type all 
these quotes (which can be very many when you write music for piccolo 
flute, piano, …). And I find { a''' e c a''' } not as readable 
as \relative a''' { a e' c a }.


Of course, for music with many big intervals may be better written in 
absolute mode (you will need many ' and , anyway).


On 14.06.2014 20:43, Knute Snortum wrote:

I am still a novice at using LilyPond (maybe a sophomore) but I'd like to
make one case for relative notes.  I'm typesetting a piece where there are
a lot of octave scale runs between both hands.  It's very nice to be able
to copy several beats or even bars of notes, irrespective of the clef, and
paste them in.  You couldn't do that with absolute notation.


Knute Snortum
(via Gmail)


On Fri, Jun 13, 2014 at 10:35 AM, Pierre Perol-Schneider 
pierre.schneider.pa...@gmail.com wrote:


2014-06-13 19:19 GMT+02:00 Kieren MacMillan kieren_macmil...@sympatico.ca

:


Hello all,




Hi Kieren,



I now code everything in absolute mode, and cannot believe how such a
little change has improved my life.



+1



But, as you say, “that’s just me”.  =)



Not just you, Kieren... ;)

Cheers,
Pierre


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user






___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \relative versus \absolute (was Re: Macro/multiply notes)

2014-06-14 Thread David Kastrup
Knute Snortum ksnor...@gmail.com writes:

 I am still a novice at using LilyPond (maybe a sophomore) but I'd like to
 make one case for relative notes.  I'm typesetting a piece where there are
 a lot of octave scale runs between both hands.  It's very nice to be able
 to copy several beats or even bars of notes, irrespective of the clef, and
 paste them in.  You couldn't do that with absolute notation.

\transpose c c' { ... }

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Macro/multiply notes

2014-06-13 Thread Federico Bruni
2014-06-13 17:42 GMT+02:00 Hlolli hlo...@gmail.com:

 Is is possible to do smoething like this:

 {c'8 d' e' d'}*4 - c'8 d' e' d' | c'8 d' e' d' | c'8 d' e' d' | c'8 d' e'
 d' ?

 Just to save space I was hoping that repetitive musical patterns could be
 repeted with multiplication/asterix sign?


You can write:

\repeat unfold 4 { c'8 d' e' d' | }

The asterisk is used to scale durations:
http://lilypond.org/doc/v2.18/Documentation/notation/writing-rhythms#scaling-durations
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Macro/multiply notes

2014-06-13 Thread Malte Meyn

Do you know \repeat unfold?

\repeat unfold 4 { c'8 d' e' d' }
or
\repeat unfold 4 { c'8 d' e' d' | }

would do what you want (depending on whether you want bar checks). 
Another hint (seems like you’re a LilyPond novice, correct me if I’m 
wrong): have you already seen \relative?


\relative c' { c8 d e d }

does the same as

{ c'8 d' e' d' }

On 13.06.2014 17:42, Hlolli wrote:

Is is possible to do smoething like this:

{c'8 d' e' d'}*4 - c'8 d' e' d' | c'8 d' e' d' | c'8 d' e' d' | c'8 d' e'
d' ?

Just to save space I was hoping that repetitive musical patterns could be
repeted with multiplication/asterix sign?



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Macro-multiply-notes-tp163291.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



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Macro/multiply notes

2014-06-13 Thread Hlolli
bingo, thanks!

Yes I'm novice. After 10+ years of music training, the relative instead of
absolute is less comfortable. But that's just me.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Macro-multiply-notes-tp163291p163297.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: Macro/multiply notes

2014-06-13 Thread Thomas Morley
2014-06-13 17:42 GMT+02:00 Hlolli hlo...@gmail.com:
 Is is possible to do smoething like this:

 {c'8 d' e' d'}*4 - c'8 d' e' d' | c'8 d' e' d' | c'8 d' e' d' | c'8 d' e'
 d' ?

 Just to save space I was hoping that repetitive musical patterns could be
 repeted with multiplication/asterix sign?



 --
 View this message in context: 
 http://lilypond.1069038.n5.nabble.com/Macro-multiply-notes-tp163291.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

Afaik, closest you can do is:

\version 2.18.0

* =
#(define-scheme-function (parser location number)(number?)
  (define-music-function (parser location music)(ly:music?)
#{ \repeat unfold $number $music #}))

*4 = \* 4
*3 = \* 3
*2 = \* 2

{ \*3 { \*4 { c'8 d' e' d' \*2 g'4 \bar || } \bar S } }

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


\relative versus \absolute (was Re: Macro/multiply notes)

2014-06-13 Thread Kieren MacMillan
Hello all,

 the relative instead of absolute is less comfortable. But that's just me.

When I started with Lilypond (ca. 2003), I immediately latched on to relative 
coding, and found absolute coding difficult, confusing, and [I thought] a waste 
of time.

Now that I’m cranking out very big scores (e.g., 50+ staves, 20+ movements), 
with lots of [potential] transpositions and code reuse, I am a 
fine-manual-thumping born-again Absolute-ist: I now code everything in absolute 
mode, and cannot believe how such a little change has improved my life.

I know it’s easier for some people to “get” relative mode… but as a result of 
my experiences in the last year or so, I would get behind the idea of the ‘Pond 
encouraging absolute mode over relative mode (e.g., in all official 
documentation, etc.).

But, as you say, “that’s just me”.  =)

All the best,
Kieren.
___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \relative versus \absolute (was Re: Macro/multiply notes)

2014-06-13 Thread Pierre Perol-Schneider
2014-06-13 19:19 GMT+02:00 Kieren MacMillan kieren_macmil...@sympatico.ca:

Hello all,


Hi Kieren,


 I now code everything in absolute mode, and cannot believe how such a
 little change has improved my life.


+1


 But, as you say, “that’s just me”.  =)


Not just you, Kieren... ;)

Cheers,
Pierre
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Macro/multiply notes

2014-06-13 Thread Johan Vromans
Thomas Morley thomasmorle...@gmail.com writes:

 { \*3 { \*4 { c'8 d' e' d' \*2 g'4 \bar || } \bar S } }

Allow me to quote David's approach:

  \\* =
  #(define-music-function (parser location n m) (index? ly:music?)
(make-music 'UnfoldedRepeatedMusic
 'repeat-count n
 'element m))

  %% Use: \* 6 {c8 g e g}

Warning: It's addictive.

-- Johan

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user