> On 09/10/2024 4:31 AM EDT Richard Shann <[email protected]> wrote:
>
>
> On Mon, 2024-09-09 at 23:01 -0400, Bric wrote:
> > Attaching a screenshot of misaligned
> in the display? or in the typeset?
I was using the Staff-wide switch: Staffs/Voices -> Playback -> Swing Staff
Denemo then applies its swing algorithm and highlights the swung duplets blue.
I attached the screenshot snippet with two blue swing notes. They are
misaligned. Denemo computed the wrong group of two notes as a swing tuplet.
Should be the final two, not the ones shown. Also was trying to relate that
during the (audible) playback you hear the mis-computed swing pattern. You
hear that which is (incorrectly) highlighted.
Attaching a more explicit visual, to drive the point home.
The top fragment circles in red the two incorrectly swung notes -- denemo
highlights them blue, and makes them sound rhythmically wrong, accordingly.
The bottom fragment circles in green the two notes denemo SHOULD have
identified as a swing pair.
> > swing tuplet
> >
> > This is a 3/4 time signature. Apparently the swing code isn't
> > handling the dotted durations properly.
>
> What command are you using? There is this one:
> Command: Swing Staff
> Changes the playback duration of pairs of 𝅘𝅥𝅮 notes for swing or notes
> inègales. Does not affect typesetting.
> Location: Object Menu ▶ Staffs/Voices ▶ Playback
> Internal Name: SwingStaff
>
> as it says it only changes the playback duration of pairs of 1/8th
> notes. It does not affect the typeset, and only affects the display
> inasmuch as it marks in blue notes whose durations have been tweaked.
I never ever addressed swing expression in the typeset. That would be a gross
error in understanding what the swing function is for in this context. I have
always understood it to be strictly for the audio playback.
[side note]
For anyone not too familiar with modern swing scores: there really isn't any
special notation for it. The performer executes the swing rhythm using implicit
rules based on eighth note pairs, typically. Sometimes there is a caption at
the top of the score mentioning the score is to be swung. But more often than
not, in jazz, it is implied and is the default.
To except a portion of the score from the default swing feel, you'd need to
place explicit markings saying the notes should be played "straight"
(non-swing) - straight sixteenths or straight eighths.
[/side note]
Hence the occasional, rare need in scoring editors to mark a passage as an
exception from the set swing/non-swing. The need arises when your default is
swing and you want a few measures to be non-swing (or the other way around).
To do that in typesetting is trivial -- just add a text label that says
"straight eights" and maybe extend a line throughout that passage. To except a
passage in playback, it is, of course, less trivial, and would require special
playback directives.
>
> To do anything more complex you need the command:
>
> Command: Change Sounding Duration
> Changes the duration of the note a the cursor for playback purposes,
> typesetting unaffected.
> Location: Object Menu ▶ Notes/Rests ▶ Playback
> Internal Name: ChangeSoundingDuration
You would need to change more than the duration. You'd need to change the
note's start position. Given X% swing, you'd need to shift the start of the
second eighth note in a pair of swung eighth notes, forward, in time, by
(X-50)/50 of its own duration. (E.g., for a swing of 63, the second note
shrinks by (63-50)/50 = 13/50, and shifts forward by that difference.
But again. First, denemo needs to identify each pair of eights properly, then
adjust the playback of the second note. Or -- if the second note is split into
sub-durations, it's a bit more complex -- both of those sub-eighth notes would
need to be compressed in duration and shifted
>
> > Or maybe missing a more generalized tuplet position calculation.
> > Denemo highlights the wrong two notes blue (should be the last two
> > notes in the measure), and plays them back true to the incorrect
> > highlighting (misaligned))
> >
> >
> > ====================
> >
> > I once had a go at coding swing tuplets in a sequence --
> > successfully, wasn't complex... below is the description of what i
> > did, IIRC, just in case
> >
> > Using 0-remainder to detect start of tuplet (duplet?) position. Let
> > x={swing notation note duration (written, not actual, typically an
> > eighth)}, then 2x would equal swing tuplet duration. Divide the given
> > notation-based position by 2x; if remainder is zero, the given note
> > is at the start of a (theoretical) swing tuplet position. Then go
> > from there to check the actual duration -- if an eight, then the
> > following note -- its swing pair -- gets compressed and shifted
> > forward, according to swing ratio, in the audio playback. This, of
> > course, if not within an explicit triplet group
> >
> > I don't know C (did the above in some scripted language),
>
> you don't need C to change the duration of a note, you can do it
> without recompiling Denemo, look at the code for the above command
> (right click on the menu item and choose "Get Script into Scheme
> Window" to see the script used).
>
> Richard
>
> > so probably wouldn't be able to actually help with the code.