diff --git a/RELEASES.txt b/RELEASES.txt index 1f84122..f63dcbe 100644 --- a/RELEASES.txt +++ b/RELEASES.txt @@ -13,7 +13,7 @@ or release/freeze points. SIGNIFICANT CHANGES SINCE LAST RELEASE ====================================== - + DHD20240604: added optional dataLabels and dataRendered to MIDITune. diff --git a/javasrc/org/hd/d/statsHouse/midi/MIDITune.java b/javasrc/org/hd/d/statsHouse/midi/MIDITune.java index 9c636b5..eaa0020 100644 --- a/javasrc/org/hd/d/statsHouse/midi/MIDITune.java +++ b/javasrc/org/hd/d/statsHouse/midi/MIDITune.java @@ -33,8 +33,17 @@ * non-null, and no null entries but may be empty * @param plan the section plan which should cover the whole melody at least if present; * may be null + * @param dataLabels column labels for dataRendered (not containing nulls or commas); + * may be null + * @param dataRendered the set of key data as rendered in the tune, + * with the outer List usually one item per bar beat, + * and the inner list an ordered list of the key items rendered in that beat maybe normalised; + * may be null */ -public record MIDITune(List dataMelody, List supportTracks, TuneSectionPlan plan) +public record MIDITune(List dataMelody, + List supportTracks, + TuneSectionPlan plan, + List dataLabels, List> dataRendered) { public MIDITune { @@ -44,13 +53,26 @@ public record MIDITune(List dataMelody, List t == null)) { throw new IllegalArgumentException(); } supportTracks = List.copyOf(supportTracks); // Defensive copy. + if(null != dataLabels) { dataLabels = List.copyOf(dataLabels); } // Defensive copy. } - /**Data melody and support track, no plan. */ - public MIDITune(final List dataMelody, final List supportTracks) { this(dataMelody, supportTracks, null); } + /**Data melody and support track and plan, no rendered data. */ + public MIDITune( + final List dataMelody, + final List supportTracks, + final TuneSectionPlan plan) + { this(dataMelody, supportTracks, plan, null, null); } + + /**Data melody and support track, no plan nor rendered data. */ + public MIDITune( + final List dataMelody, + final List supportTracks) + { this(dataMelody, supportTracks, null); } - /**Bare data melody, no support nor plan. */ - public MIDITune(final List dataMelody) { this(dataMelody, Collections.emptyList()); } + /**Bare data melody, no support nor plan nor rendered data. */ + public MIDITune( + final List dataMelody) + { this(dataMelody, Collections.emptyList()); } /**Empty tune. */ public MIDITune() { this(Collections.emptyList()); }