[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: swing rhythm in midi output?
From: |
Michael Ellis |
Subject: |
Re: swing rhythm in midi output? |
Date: |
Sat, 9 Apr 2011 16:34:57 -0400 |
One way would be to write a music function that produces converts straight-eighths to swing values. Here's an outline of what's needed. Perhaps someone has already solved this. You should be able to find some code in LSR that can be modified to do what you want. Changing durations is trivial, figuring out where the beats start is a bit messier.
swingme =
#(define-music-function parser location music) (ly:music? music)
"Scan music for pairs of eighth notes starting on a beat. Lengthen the
first and shorten the second"
;; your code here ....
)#
mymusic = { % your notes }
\score {
\mymusic %what gets printed
\midi { \swingme \mymusic } % what gets played
}