Re: Custom DrumStaff
Am 23.01.2015 um 05:52 schrieb Kevin Tough: I just tried your example and Lilypond produced the following error messaages. Could it be due to my version of 2.18.2? I think so. Standalone lenghts were introduced later and should work with 2.19.x. HTH, Marc ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Custom DrumStaff
On Jan 22, 2015, at 10:52 PM, Kevin Tough ke...@toughlife.org wrote: I just tried your example and Lilypond produced the following error messaages. Could it be due to my version of 2.18.2? Parsing... TwoInstruments.ly:14:16: error: syntax error, unexpected UNSIGNED r8\p bol8 r8 8% 4 TwoInstruments.ly:26:10: error: syntax error, unexpected UNSIGNED boh8\p 8 r8 8 % 1 TwoInstruments.ly:33:1: error: errors found, ignoring music expression Yes, I get those errors with version 2.18.2, but not with 2.19.15. Do Release Notes for the various releases exist? That would show, e.g. all differences between v.2.19.15 and v.1.18.2 or between v.2.19.15 and v.2.19.14? Or between the current stable versionj and the current developmental version? On Thu, 2015-01-22 at 22:19 -0600, Cynthia Karl wrote: On Jan 22, 2015, at 6:06 PM, Rutger Hofman rut...@cs.vu.nl wrote: On 01/23/2015 12:28 AM, Cynthia Karl wrote: I'm trying to duplicate the behavior shown in the next two images: The major things wrong with this output are: * the rests should be centered on their line, not above it * there should be a full-measure rest on the lower line of measure 5 * the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, presumable consumed by the corresponding quarter rest in lower music at that time. * I get the warning: 30: 5: warning: cannot resolve rest collision: rest direction not set 4 r4 % 4 Can anyone give me a hint or two? Is a DrumStaff the wrong approach? ( Maybe a couple of RhythmicStaffs would be better?) Using version 2.19.15. The rest positions are correct when you use \voiceOne for the upper line in stead of \stemUp, and \voiceTwo for the lower line in stead of \stemDown. Sadly, for full-measure rests in the upper line the result is incorrect. These must be positioned with \oneVoice. HTH I think that's going to help a lot. Thanks. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Custom DrumStaff
On Jan 22, 2015, at 6:06 PM, Rutger Hofman rut...@cs.vu.nl wrote: On 01/23/2015 12:28 AM, Cynthia Karl wrote: I'm trying to duplicate the behavior shown in the next two images: The major things wrong with this output are: * the rests should be centered on their line, not above it * there should be a full-measure rest on the lower line of measure 5 * the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, presumable consumed by the corresponding quarter rest in lower music at that time. * I get the warning: 30: 5: warning: cannot resolve rest collision: rest direction not set 4 r4 % 4 Can anyone give me a hint or two? Is a DrumStaff the wrong approach? ( Maybe a couple of RhythmicStaffs would be better?) Using version 2.19.15. The rest positions are correct when you use \voiceOne for the upper line in stead of \stemUp, and \voiceTwo for the lower line in stead of \stemDown. Sadly, for full-measure rests in the upper line the result is incorrect. These must be positioned with \oneVoice. HTH I think that's going to help a lot. Thanks. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Custom DrumStaff
I just tried your example and Lilypond produced the following error messaages. Could it be due to my version of 2.18.2? Parsing... TwoInstruments.ly:14:16: error: syntax error, unexpected UNSIGNED r8\p bol8 r8 8% 4 TwoInstruments.ly:26:10: error: syntax error, unexpected UNSIGNED boh8\p 8 r8 8 % 1 TwoInstruments.ly:33:1: error: errors found, ignoring music expression On Thu, 2015-01-22 at 22:19 -0600, Cynthia Karl wrote: On Jan 22, 2015, at 6:06 PM, Rutger Hofman rut...@cs.vu.nl wrote: On 01/23/2015 12:28 AM, Cynthia Karl wrote: I'm trying to duplicate the behavior shown in the next two images: The major things wrong with this output are: * the rests should be centered on their line, not above it * there should be a full-measure rest on the lower line of measure 5 * the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, presumable consumed by the corresponding quarter rest in lower music at that time. * I get the warning: 30: 5: warning: cannot resolve rest collision: rest direction not set 4 r4 % 4 Can anyone give me a hint or two? Is a DrumStaff the wrong approach? ( Maybe a couple of RhythmicStaffs would be better?) Using version 2.19.15. The rest positions are correct when you use \voiceOne for the upper line in stead of \stemUp, and \voiceTwo for the lower line in stead of \stemDown. Sadly, for full-measure rests in the upper line the result is incorrect. These must be positioned with \oneVoice. HTH I think that's going to help a lot. Thanks. ___ 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
Custom DrumStaff
I'm trying to duplicate the behavior shown in the next two images: (the dash above the eighth rest in the upper line in beat 1 of measure 4 is an artifact; ignore it) My best effort so far is: \version 2.19.15 \paper { ragged-right = ##t } #(define percussion '((lobongo default #t 3) (hibongo default #t -3))) upperMusic = \drummode { \time 2/4 \stemUp R1*2/4% 1 \break R1*2*2/4 % 2-3 r8\p bol8 r8 8% 4 R1*2/4% 5 } lowerMusic = \drummode { \time 2/4 \overrideTimeSignatureSettings 2/4 % timeSignatureFraction 1/4 % baseMomentFraction #'(2) % beatStructure #'() % beamExceptions \stemDown boh8\p 8 r8 8 % 1 8 8 8 8 % 2 8 8 8 8 % 3 4 r4 % 4 R1*2/4% 5 } \new DrumStaff { \set DrumStaff.instrumentName = \markup { \center-column { Tri CS} } \override DrumStaff.StaffSymbol #'line-positions = #'(3 -3) \set DrumStaff.drumStyleTable = #(alist-hash-table percussion) \new DrumVoice \lowerMusic \new DrumVoice \upperMusic } which yields: DrumStaffExperiment1.pdf Description: Adobe PDF document The major things wrong with this output are: * the rests should be centered on their line, not above it * there should be a full-measure rest on the lower line of measure 5 * the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, presumable consumed by the corresponding quarter rest in lower music at that time. * I get the warning: 30: 5: warning: cannot resolve rest collision: rest direction not set 4 r4 % 4 Can anyone give me a hint or two? Is a DrumStaff the wrong approach? ( Maybe a couple of RhythmicStaffs would be better?) Thanks.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Custom DrumStaff
On 01/23/2015 12:28 AM, Cynthia Karl wrote: I'm trying to duplicate the behavior shown in the next two images: The major things wrong with this output are: * the rests should be centered on their line, not above it * there should be a full-measure rest on the lower line of measure 5 * the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, presumable consumed by the corresponding quarter rest in lower music at that time. * I get the warning: 30: 5: warning: cannot resolve rest collision: rest direction not set 4 r4 % 4 Can anyone give me a hint or two? Is a DrumStaff the wrong approach? ( Maybe a couple of RhythmicStaffs would be better?) Using version 2.19.15. The rest positions are correct when you use \voiceOne for the upper line in stead of \stemUp, and \voiceTwo for the lower line in stead of \stemDown. Sadly, for full-measure rests in the upper line the result is incorrect. These must be positioned with \oneVoice. HTH Rutger ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
custom articulation inside custom drumstaff
hello list, i have yet another question regarding the definition of a custom drumstaff, and it is how to add a custom articulation. it's actually two questions, the first one is how to make custom articulations available inside #define mydrums(). i managed to do that adding a custom articulation in script.scm, but somehow i fail to see how to put the definition in a separate file that i could include (script.scm will be rewritten every time i install lilypond) the second question later, if i manage to solve this... best, lj ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: custom articulation inside custom drumstaff
2013/4/1 luis jure l...@internet.com.uy hello list, i have yet another question regarding the definition of a custom drumstaff, and it is how to add a custom articulation. it's actually two questions, the first one is how to make custom articulations available inside #define mydrums(). i managed to do that adding a custom articulation in script.scm, but somehow i fail to see how to put the definition in a separate file that i could include (script.scm will be rewritten every time i install lilypond) the second question later, if i manage to solve this... best, lj Hi Luis, below my approach. Several comments in code, file and png attached. Hope there are no problems, I tested it with 2.16.2 up to 2.17.16 from latest master. \version 2.16.2 %% and higher %% Although, it is public I didn't manage to get full acces to %% `default-script-alist´ from/scm/script.scm. %% It is possible to modify the values, though, I couldn't create a new entry. %% %% Anyway, working on a copy of `default-script-alist´ guarantees no bleed-over. #(define my-script-alist default-script-alist) %% Some crazy stencils :) #(define my-crazy-stil ;; A longish ellipse (ly:stencil-in-color (make-partial-ellipse-stencil 4 0.5 10 10 0.13 #t #t) 1 0 0)) #(define my-crazy-stil-2 ;; A small hexagon (let* ((th 0.1) ;; Value @code{6} returns a hexagon, try others. (alpha-step (/ (* 2 PI) 6)) (alpha-start (/ alpha-step 2)) (radius 0.7) (polypoints (let loop ((alpha alpha-start)) (if ( alpha (* 2 PI)) '() (cons (* (abs radius) (sin alpha)) (cons (- 0 (* (abs radius) (cos alpha))) (loop (+ alpha alpha-step (ly:make-stencil `(polygon ',polypoints ,th #f %% Two alists with the name of the new articulation and its settings. #(define my-wish-list-1 `(ellipse . ( (avoid-slur . around) (padding . 0.20) (stencil . ,my-crazy-stil) ;(direction . ,DOWN) (side-relative-direction . ,DOWN #(define my-wish-list-2 `(hexagon . ( (avoid-slur . around) (padding . 0.40) (stencil . ,my-crazy-stil-2) ;(direction . ,DOWN) (side-relative-direction . ,DOWN %% A macro setting the lists from above in the copy of `default-script-alist´ %% I didn't manage to program some looping, mapping ... How to do? %% For now, every new script has to be inserted in a single run. #(define-macro (set-my-script-alist! ls-1 ls-2) Creates a new key-value-pair, taken from ls-2, in ls-1 `(set! ,ls-1 (if (and (pair? ,ls-2) (pair? (cadr ,ls-2))) (assoc-set! ,ls-1 (car ,ls-2) (cdr ,ls-2)) (begin (ly:warning (_Unsuitable list\n\t~a \n\tdetected, ignoring. ) ,ls-2) ,ls-1 #(set-my-script-alist! my-script-alist my-wish-list-1) #(set-my-script-alist! my-script-alist my-wish-list-2) %% from http://lists.gnu.org/archive/html/lilypond-user/2013-04/msg9.html alwaysPrintWholeLaThinBassDrum = \override NoteHead #'duration-log = #(lambda (grob) (let* ((style (ly:grob-property grob 'style)) (grob-probs (ly:grob-properties grob)) (cause (assoc-get 'cause grob-probs)) (drum-type (ly:prob-property cause 'drum-type))) ;; If laThin-NoteHead for bassdrum is detected, ;; change duration-log, else default. (if (and (eq? style 'laThin) (eq? drum-type 'bassdrum)) 0 (note-head::calc-duration-log grob %% A new drum-table #(define mydrums '( (bassdrumlaThinellipse-1) (hihat laThin hexagon 3) )) %% To use the new scripts call them in \layout \layout { \context { \Score scriptDefinitions = #my-script-alist } } \new DrumStaff \with { \override StaffSymbol #'line-count = #2 drumStyleTable = #(alist-hash-table mydrums) \alwaysPrintWholeLaThinBassDrum } \drummode { bd8 bd bd2. hh1 hh2 hh4 hh8 hh } %% To use in \notemode you may want to use: ellipse = #(make-articulation ellipse) hexagon = #(make-articulation hexagon) %% Shortcuts. %% TODO: How to create more shortcuts? I didn't test so far. %% Below are redefined ones. dashDash = ellipse dashHat = hexagon \relative c' { c1\ellipse d^\ellipse e\hexagon f^\hexagon c'1-- d_- e-^ f_^ } \header { title = New Scripts subtitle = for subsubtitle = \markup \column { \\drummode and \\notemode \vspace #2 } } HTH, Harm new-scripts.ly Description: Binary data attachment: new-scripts.png___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: custom articulation inside custom drumstaff
on 2013-04-02 at 00:01 Thomas Morley wrote: below my approach. Several comments in code, file and png attached. like wow, this is indeed terrific! thank you! it'll take a while before i understand the code enough to adapt it to my needs, but this is a great start. Hope there are no problems, I tested it with 2.16.2 up to 2.17.16 from latest master. compiled perfectly here, with 2.17.15. thank you again! lj ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user