Re: Arpeggios
Reply #7 –
Hi Susanna,
I've managed a little time to check it out - the problem is the duration of the chords, they're too short.
This segment of code from the user tool specifically excludes chords shorter than a crotchet (4th) note:
foreach ($clip->Items as $item) {
$o = new NWC2ClipItem($item);
//
// If this is a non-grace chord and is not preceded by a grace note,
// and it is larger than an 8th note in duration, then add a grace note arpeggio
if (($o->GetObjType() == "Chord") &&
!isset($o->Opts["Dur"]["Grace"]) &&
(count(array_intersect(array_keys($o->Opts["Dur"]),array("Whole","Half","4th"))) > 0) &&
!isset($priorNoteObj->Opts["Dur"]["Grace"])) {
$chordnotes = $o->GetTaggedOpt("Pos");
$chorddur = $o->GetTaggedOpt("Dur");
Lines 4 and 5 of the snippet above are a comment describing it and line 8 has the section that does the work of excluding these particular chords.
It would be fairly easy to modify the tool, or just double the duration of these chords, run the tool and then halve them again...
A quick test shows the "fix" to be as simple as changing this line (line 8 in the code snippet, line 47 in the actual file "nwsw_ArpeggiateChord.php"):
(count(array_intersect(array_keys($o->Opts["Dur"]),array("Whole","Half","4th"))) > 0) &&
to this (add the red bit, don't forget the comma):
(count(array_intersect(array_keys($o->Opts["Dur"]),array("Whole","Half","4th","8th"))) > 0) &&