From f58086dd07b542bb610f9cc1fae801728bbe70b0 Mon Sep 17 00:00:00 2001 From: DamonHD Date: Fri, 28 Jun 2024 19:12:46 +0100 Subject: [PATCH] WIP --- .../statsHouse/feedHits/GenerateSummary.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/javasrc/org/hd/d/statsHouse/feedHits/GenerateSummary.java b/javasrc/org/hd/d/statsHouse/feedHits/GenerateSummary.java index e0b3d4c..2c659e8 100644 --- a/javasrc/org/hd/d/statsHouse/feedHits/GenerateSummary.java +++ b/javasrc/org/hd/d/statsHouse/feedHits/GenerateSummary.java @@ -35,8 +35,10 @@ import org.hd.d.statsHouse.midi.MIDIConstant; import org.hd.d.statsHouse.midi.MIDIDataMelodyTrack; import org.hd.d.statsHouse.midi.MIDIGen; +import org.hd.d.statsHouse.midi.MIDIInstrument; import org.hd.d.statsHouse.midi.MIDIPercusssionInstrument; import org.hd.d.statsHouse.midi.MIDIPlayableBar; +import org.hd.d.statsHouse.midi.MIDIPlayableMonophonicDataBar; import org.hd.d.statsHouse.midi.MIDISupportTrack; import org.hd.d.statsHouse.midi.MIDITrackSetup; import org.hd.d.statsHouse.midi.MIDITune; @@ -279,10 +281,10 @@ public static MIDITune summary2(final List dirnames) throws IOException // Total number of distinct hours to sonify; 24 summary hours for each block. final int nTotalHours = fsbs.blocks().size() * 24; -// // Hours' data for each bar (must be a factor of 24). -// final int nHoursPerBar = 4; -// // Total number of data bars to generate. -// final int nDataBars = nTotalHours / nHoursPerBar; + // Hours' data for each bar (must be a factor of 24). + final int nHoursPerBar = 4; + // Total number of data bars to generate. + final int nDataBars = nTotalHours / nHoursPerBar; // Data for the data visualisation. final List> dataRendered = new ArrayList<>(nTotalHours); @@ -295,6 +297,16 @@ public static MIDITune summary2(final List dirnames) throws IOException final Scale scale = Scale.DORIAN; + // Setup for the melody track. + final MIDITrackSetup trSetupStatusMelody = new MIDITrackSetup( + (byte) 0, // Channel 0. + MIDIInstrument.LEAD_2_SAWTOOTH_WAVE.instrument0, + MIDIConstant.DEFAULT_VOLUME, + (byte)32, // Off to the left. + "status melody"); + final List db = new ArrayList<>(nDataBars); + final MIDIDataMelodyTrack statusMelody = new MIDIDataMelodyTrack(trSetupStatusMelody, db); + // TODO @@ -312,7 +324,7 @@ public static MIDITune summary2(final List dirnames) throws IOException final List beatLabels = generateBeatLabelsType1(fsbs); final DataVizBeatPoint dv = new DataVizBeatPoint(nTotalHours, dataLabels.size(), dataLabels, dataRendered, beatLabels); - final List dataMelody = Collections.emptyList(); + final List dataMelody = Collections.emptyList(); // List.of(statusMelody); final TuneSectionPlan tsp = null; return(new MIDITune(dataMelody, List.of(percussion), tsp, dv)); }