From 169b3fea826bb91995c8506464355947c54a3d9d Mon Sep 17 00:00:00 2001 From: Modrigue Date: Sat, 6 Jan 2024 21:06:10 +0100 Subject: [PATCH] WIP: chords + melody generation --- js/gui/strings.js | 2 + js/gui/strings.js.map | 2 +- js/song_generator/melodic_fluency.js | 65 +++++++++++++++++ js/song_generator/melodic_fluency.js.map | 2 +- js/song_generator/song_generator.js | 14 +++- js/song_generator/song_generator.js.map | 2 +- ts/gui/strings.ts | 2 + ts/song_generator/melodic_fluency.ts | 90 ++++++++++++++++++++++++ ts/song_generator/song_generator.ts | 16 ++++- 9 files changed, 186 insertions(+), 9 deletions(-) diff --git a/js/gui/strings.js b/js/gui/strings.js index 9651bb6..24814a8 100644 --- a/js/gui/strings.js +++ b/js/gui/strings.js @@ -10,6 +10,7 @@ stringsDict_int.set("chord", "Chord"); stringsDict_int.set("chord_explorer_nb_strings_max_text", "strings played"); stringsDict_int.set("chord_neapolitan", "Neapolitan chord:"); stringsDict_int.set("chords_aug_6th", "Augmented 6th chords:"); +stringsDict_int.set("chords+melody", "Chords + Melody"); stringsDict_int.set("chords_N_notes", "Chords with {%1} notes"); stringsDict_int.set("chords_N_notes_all", "All chords with {%1} notes:"); stringsDict_int.set("chords_progression", "Chords progression"); @@ -97,6 +98,7 @@ stringsDict_fr.set("chord_explorer_nb_strings_max_text", "cordes jouées"); stringsDict_fr.set("chord_neapolitan", "Accord napolitain :"); stringsDict_fr.set("chords_progression", "Progression d'accords"); stringsDict_fr.set("chords_aug_6th", "Accords 6e augmentés :"); +stringsDict_fr.set("chords+melody", "Accords + Mélodie"); stringsDict_fr.set("chords_N_notes", "Accords de {%1} notes"); stringsDict_fr.set("chords_N_notes_all", "Tous les accords de {%1} notes :"); stringsDict_fr.set("chords_quartal", "Accords quartaux"); diff --git a/js/gui/strings.js.map b/js/gui/strings.js.map index bbc90f7..0a681da 100644 --- a/js/gui/strings.js.map +++ b/js/gui/strings.js.map @@ -1 +1 @@ -{"version":3,"file":"strings.js","sourceR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AAK,CAAC;IAChE,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,6GAA6G;AAC7G,SAAS,WAAW,CAAC,GAAW;IAE5B,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,GAAE,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClH,CAAC"} \ No newline at end of file diff --git a/js/song_generator/melodic_fluency.js b/js/song_generator/melodic_fluency.js index 66abab7..0a28480 100644 --- a/js/song_generator/melodic_fluency.js +++ b/js/song_generator/melodic_fluency.js @@ -1,4 +1,69 @@ "use strict"; +function GenerateMelodyTrack(tonic, scaleValues, nbBars, nbNotesPerBar, octave, freq, qNote, channelId) { + // generate candidate track and check its coherency + const nbTries = 100 /*0*/; + let track = new MidiTrack(channelId); + let success = false; + for (let i = 0; i < nbTries; i++) { + track = generateSequenceTrackCandidate(tonic, scaleValues, nbBars, nbNotesPerBar, octave, freq, qNote, channelId); + //success = hasMelodicFluency(track, tonic, octave, scaleValues); // disable notes after leaps check? + success = true; + if (success) + return track; + } + return null; +} +// TODO: allow various notes durations +function generateMelodyTrackCandidate(tonic, scaleValues, nbBars, nbNotesPerBar, octave, freq, qNote, channelId) { + let track = new MidiTrack(channelId); + const nbNotesInScale = scaleValues.length; + const intervalRange = Math.round(0.8 * nbNotesInScale); + // build allowed scale notes array + const scaleNotesValues = GetScaleNotesOctaveRangeValues(tonic, scaleValues, octave); + // allow tonic as 1st note + let startIntervals = [0]; //scaleValues; + const startInterval = getRandomArrayElement(startIntervals); + let startPosition = 0; + const duration = 4 * qNote / nbNotesPerBar; + // 1st note appears? + if (noteAppears(freq)) + AddNoteMonoEvent(track, tonic + startInterval, octave, 0, 4 * qNote / nbNotesPerBar); + else + startPosition += duration; + // generate random notes in scale + const nbTries = 10000; + let noteCurValue = GetNoteValueFromNoteOctave(tonic, octave); + let noteCurIndex = scaleNotesValues.indexOf(noteCurValue); + for (let barIndex = 1; barIndex < nbNotesPerBar * nbBars; barIndex++) { + // following note appears? + if (!noteAppears(freq)) { + startPosition += duration; + continue; + } + // note appears at next position + let noteNextValue = -1; + let noteNextIndex = -1; + for (let i = 0; i < nbTries; i++) + //while (!acceptNote(noteValueNext, tonicValue, barIndex, nbBars, track, trackExisting)) + { + // get random step + let indexIntervalNext = GetRandomGaussianNumber(-intervalRange + 1, intervalRange - 1); + //while (indexIntervalNext == 0) + // indexIntervalNext = getRandomNumber(-nbNotesInScale, nbNotesInScale); + noteNextIndex = noteCurIndex + indexIntervalNext; + noteNextIndex = Math.min(scaleNotesValues.length - 1, Math.max(0, noteNextIndex)); + noteNextValue = scaleNotesValues[noteNextIndex]; + //console.log(curNoteIndex, indexIntervalNext, nextNoteIndex, noteValueNext); + //if (acceptNoteInCounterpoint11(noteNextValue, tonic, barIndex, nbBars, track, trackCF)) + // break; + } + // ok, add note + AddNoteMonoValueEvent(track, noteNextValue, startPosition, duration); + startPosition = 0; + noteCurIndex = noteNextIndex; + } + return track; +} function hasMelodicFluency(track, tonic, octave, scaleValues) { const tonicValue = GetNoteValueFromNoteOctave(tonic, octave); const nbNotesInScale = scaleValues.length; diff --git a/js/song_generator/melodic_fluency.js.map b/js/song_generator/melodic_fluency.js.map index 4b4f5ba..ad01166 100644 --- a/js/song_generator/melodic_fluency.js.map +++ b/js/song_generator/melodic_fluency.js.map @@ -1 +1 @@ -{"version":3,"file":"melodic_fluency.js","sourceRoot":"","sources":["../../ts/song_generator/melodic_fluency.ts"],"names":[],"mappings":";AAAA,SAAS,iBAAiB,CAAC,KAAiB,EAAE,KAAa,EAAE,MAAc,EAAE,WAA0B;IAEnG,MAAM,UAAU,GAAG,0BAA0B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC7D,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC;IAE1C,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I,WAAW,IAAI,kBAAkB,EAC1C;YACI,aAAa,EAAE,CAAC;YAChB,eAAe,GAAG,KAAK,CAAC;YAExB,iDAAiD;YACjD,IAAI,cAAc,IAAI,CAAC;gBACvB,IAAI,KAAK,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,IAAI,OAAO,GAAG,CAAC;oBAC5C,OAAO,KAAK,CAAC;SACpB;aACI,IAAI,WAAW,IAAI,CAAC,kBAAkB,EAC3C;YACI,cAAc,EAAE,CAAC;YACjB,gBAAgB,GAAG,KAAK,CAAC;YAEzB,mDAAmD;YACnD,0BAA0B;YAC1B,mDAAmD;YACnD,mBAAmB;SACtB;QAED,KAAK,EAAE,CAAC;KACX;IAED,IAAI,SAAS,GAAG,gBAAgB;QAC5B,OAAO,KAAK,CAAC;IACjB,IAAI,aAAa,GAAG,iBAAiB,IAAI,cAAc,GAAG,iBAAiB;QACvE,OAAO,KAAK,CAAC;IAEjB,oCAAoC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file +{"version":3,"file":"melodic_fluency.js","sourceRoot":"","sources":["../../ts/song_generator/melodic_fluency.ts"],"names":[],"mappings":";AAAA,SAAS,mBAAmB,CAAC,KAAa,EAAE,WAA0B,EAAE,MAAc,EAAE,aAAqB,EACzG,MAAc,EAAE,IAAY,EAAE,KAAa,EAAE,SAAiB;IAG9D,mDAAmD;IACnD,MAAM,OAAO,GAAG,GAAG,CAAA,KAAK,CAAC;IACzB,IAAI,KAAK,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAChC;QACI,KAAK,GAAG,8BAA8B,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAElH,qGAAqG;QAC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AExB,iDAAiD;YACjD,IAAI,cAAc,IAAI,CAAC;gBACvB,IAAI,KAAK,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,IAAI,OAAO,GAAG,CAAC;oBAC5C,OAAO,KAAK,CAAC;SACpB;aACI,IAAI,WAAW,IAAI,CAAC,kBAAkB,EAC3C;YACI,cAAc,EAAE,CAAC;YACjB,gBAAgB,GAAG,KAAK,CAAC;YAEzB,mDAAmD;YACnD,0BAA0B;YAC1B,mDAAmD;YACnD,mBAAmB;SACtB;QAED,KAAK,EAAE,CAAC;KACX;IAED,IAAI,SAAS,GAAG,gBAAgB;QAC5B,OAAO,KAAK,CAAC;IACjB,IAAI,aAAa,GAAG,iBAAiB,IAAI,cAAc,GAAG,iBAAiB;QACvE,OAAO,KAAK,CAAC;IAEjB,oCAAoC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/js/song_generator/song_generator.js b/js/song_generator/song_generator.js index 6276919..4a2cc7d 100644 --- a/js/song_generator/song_generator.js +++ b/js/song_generator/song_generator.js @@ -1,5 +1,6 @@ "use strict"; const generatedSongTypes = new Map(); +generatedSongTypes.set("chords+melody", "chords+melody"); generatedSongTypes.set("chords_progression", "chords_progression"); generatedSongTypes.set("arpeggios_progression", "arpeggios_progression"); generatedSongTypes.set("sequence", "sequence"); @@ -110,6 +111,12 @@ function generateNewTrack(trackIndex = 0 /* offset 1, 0 = all tracks */) { let trackOther = generatedMidi.Tracks[3 - trackIndex]; let trackCandidate = null; switch (selectedTypeId) { + case "chords+melody": + if (trackIndex == 1) + trackCandidate = GenerateMelodyTrack(tonic, scaleValues, nbBars, nbNotesPerBar, octaves[trackIndex - 1], frequencies[trackIndex - 1], qNote, trackIndex); + else + trackCandidate = GenerateChordsProgTrack(tonic, scaleValues, nbBars, 1, octaves[trackIndex - 1], frequencies[trackIndex - 1], qNote, trackIndex); + break; case "chords_progression": if (trackIndex == 1) trackCandidate = GenerateChordsProgTrack(tonic, scaleValues, nbBars, 1, octaves[trackIndex - 1], frequencies[trackIndex - 1], qNote, trackIndex); @@ -245,12 +252,13 @@ function updateSongGeneratorPage() { const selectedTypeId = getSelectedSongType('song_generator_type'); if (selectedTypeId != null) { const isCounterpoint = selectedTypeId.startsWith("counterpoint"); + const isChordsMelody = (selectedTypeId == "chords+melody"); const isArpeggiosProg = (selectedTypeId == "arpeggios_progression"); const isSequence = (selectedTypeId == "sequence"); - setEnabled("song_generator_nb_notes_per_bar", (isSequence || isArpeggiosProg)); + setEnabled("song_generator_nb_notes_per_bar", (isSequence || isChordsMelody || isArpeggiosProg)); setEnabled("song_generator_generate_track2", !regexCounterpoint4_5S.test(selectedTypeId)); - for (let i = 1; i <= 2; i++) - setEnabled(`song_generator_freq_track${i}`, isSequence); + setEnabled(`song_generator_freq_track1`, (isSequence || isChordsMelody)); + setEnabled(`song_generator_freq_track2`, isSequence); } // for debug purposes /*if (false) diff --git a/js/song_generator/song_generator.js.map b/js/song_generator/song_generator.js.map index a3ae723..65bc6f5 100644 --- a/js/song_generator/song_generator.js.map +++ b/js/song_generator/song_generator.js.map @@ -1 +1 @@ -{"version":3,"file":"song_generator.js","sourceRoot":"","sources":["../../ts/song_generator/song_generator.ts"],"names":[],"mappings":";AAAA,MAAM,kBAAkB,GAAwB,IAAI,GAAG,EAAkB,CAAC;AAC1E,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,EAAS,oBAAoB,CAAC,CAAC;AAC1E,kBAAkB,CAAC,GAAG,CAAC,uBAAuB,EAAM,uBAAuB,CAAC,CAAC;AAC7E,kBAAkB,CAAC,GAAG,CAAC,UAAU,EAAmB,UAAU,CAAC,CAAC;AAChE,kBAAkB,CAAC,GAAG,CAAC,kBAAkB,EAAW,kBAAkB,CAAC,CAAC;AACxE,kBAAkB,CAAC,GAAG,CAAC,kBAAkB,EAAW,kBAAkB,CAAC,CAAC;AACxE,kBAAkB,CAAC,GAAG,CAAC,kBAAkB,EAAW,kBAAkB,CAAC,CAAC;AACxE,kBAAk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AC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC1D,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,uBAAuB,CAAC,EAAU;IAEvC,MAAM,UAAU,GAAyC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACrF,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC;IAC3C,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;IAEpD,OAAO,QAAQ,CAAC;AACpB,CAAC"} \ No newline at end of file diff --git a/ts/gui/strings.ts b/ts/gui/strings.ts index fff5755..b641a72 100644 --- a/ts/gui/strings.ts +++ b/ts/gui/strings.ts @@ -9,6 +9,7 @@ stringsDict_int.set("chord", "Chord"); stringsDict_int.set("chord_explorer_nb_strings_max_text", "strings played"); stringsDict_int.set("chord_neapolitan", "Neapolitan chord:"); stringsDict_int.set("chords_aug_6th", "Augmented 6th chords:"); +stringsDict_int.set("chords+melody", "Chords + Melody"); stringsDict_int.set("chords_N_notes", "Chords with {%1} notes"); stringsDict_int.set("chords_N_notes_all", "All chords with {%1} notes:"); stringsDict_int.set("chords_progression", "Chords progression"); @@ -97,6 +98,7 @@ stringsDict_fr.set("chord_explorer_nb_strings_max_text", "cordes jouées"); stringsDict_fr.set("chord_neapolitan", "Accord napolitain :"); stringsDict_fr.set("chords_progression", "Progression d'accords"); stringsDict_fr.set("chords_aug_6th", "Accords 6e augmentés :"); +stringsDict_fr.set("chords+melody", "Accords + Mélodie"); stringsDict_fr.set("chords_N_notes", "Accords de {%1} notes"); stringsDict_fr.set("chords_N_notes_all", "Tous les accords de {%1} notes :"); stringsDict_fr.set("chords_quartal", "Accords quartaux"); diff --git a/ts/song_generator/melodic_fluency.ts b/ts/song_generator/melodic_fluency.ts index a157a53..927c04f 100644 --- a/ts/song_generator/melodic_fluency.ts +++ b/ts/song_generator/melodic_fluency.ts @@ -1,3 +1,93 @@ +function GenerateMelodyTrack(tonic: number, scaleValues: Array, nbBars: number, nbNotesPerBar: number, + octave: number, freq: number, qNote: number, channelId: number): (MidiTrack | null) +{ + + // generate candidate track and check its coherency + const nbTries = 100/*0*/; + let track = new MidiTrack(channelId); + let success = false; + for (let i = 0; i < nbTries; i++) + { + track = generateSequenceTrackCandidate(tonic, scaleValues, nbBars, nbNotesPerBar, octave, freq, qNote, channelId); + + //success = hasMelodicFluency(track, tonic, octave, scaleValues); // disable notes after leaps check? + success = true; + if (success) + return track; + } + + return null; +} + +// TODO: allow various notes durations +function generateMelodyTrackCandidate(tonic: number, scaleValues: Array, nbBars: number, + nbNotesPerBar: number, octave: number, freq: number, qNote: number, channelId: number): MidiTrack +{ + let track = new MidiTrack(channelId); + + const nbNotesInScale = scaleValues.length; + const intervalRange = Math.round(0.8*nbNotesInScale); + + // build allowed scale notes array + const scaleNotesValues = GetScaleNotesOctaveRangeValues(tonic, scaleValues, octave); + + // allow tonic as 1st note + let startIntervals: Array = [0]; //scaleValues; + + const startInterval = getRandomArrayElement(startIntervals); + let startPosition = 0; + const duration = 4*qNote/nbNotesPerBar; + + // 1st note appears? + if (noteAppears(freq)) + AddNoteMonoEvent(track, tonic + startInterval, octave, 0, 4*qNote/nbNotesPerBar); + else + startPosition += duration; + + // generate random notes in scale + const nbTries = 10000; + let noteCurValue = GetNoteValueFromNoteOctave(tonic, octave); + let noteCurIndex = scaleNotesValues.indexOf(noteCurValue); + for (let barIndex = 1; barIndex < nbNotesPerBar*nbBars; barIndex++) + { + // following note appears? + if (!noteAppears(freq)) + { + startPosition += duration; + continue; + } + + // note appears at next position + let noteNextValue = -1; + let noteNextIndex = -1; + for (let i = 0; i < nbTries; i++) + //while (!acceptNote(noteValueNext, tonicValue, barIndex, nbBars, track, trackExisting)) + { + // get random step + let indexIntervalNext = GetRandomGaussianNumber(-intervalRange + 1, intervalRange - 1); + //while (indexIntervalNext == 0) + // indexIntervalNext = getRandomNumber(-nbNotesInScale, nbNotesInScale); + + noteNextIndex = noteCurIndex + indexIntervalNext; + noteNextIndex = Math.min(scaleNotesValues.length - 1, Math.max(0, noteNextIndex)); + + noteNextValue = scaleNotesValues[noteNextIndex]; + //console.log(curNoteIndex, indexIntervalNext, nextNoteIndex, noteValueNext); + + //if (acceptNoteInCounterpoint11(noteNextValue, tonic, barIndex, nbBars, track, trackCF)) + // break; + } + + // ok, add note + AddNoteMonoValueEvent(track, noteNextValue, startPosition, duration); + startPosition = 0; + noteCurIndex = noteNextIndex; + } + + return track; +} + + function hasMelodicFluency(track : MidiTrack, tonic: number, octave: number, scaleValues: Array): boolean { const tonicValue = GetNoteValueFromNoteOctave(tonic, octave); diff --git a/ts/song_generator/song_generator.ts b/ts/song_generator/song_generator.ts index 3d615e2..6f9de79 100644 --- a/ts/song_generator/song_generator.ts +++ b/ts/song_generator/song_generator.ts @@ -1,4 +1,5 @@ const generatedSongTypes: Map = new Map(); +generatedSongTypes.set("chords+melody" , "chords+melody"); generatedSongTypes.set("chords_progression" , "chords_progression"); generatedSongTypes.set("arpeggios_progression" , "arpeggios_progression"); generatedSongTypes.set("sequence" , "sequence"); @@ -140,6 +141,13 @@ function generateNewTrack(trackIndex: number = 0 /* offset 1, 0 = all tracks */) let trackCandidate = null; switch(selectedTypeId) { + case "chords+melody": + if (trackIndex == 1) + trackCandidate = GenerateMelodyTrack(tonic, scaleValues, nbBars, nbNotesPerBar, octaves[trackIndex - 1], frequencies[trackIndex - 1], qNote, trackIndex); + else + trackCandidate = GenerateChordsProgTrack(tonic, scaleValues, nbBars, 1, octaves[trackIndex - 1], frequencies[trackIndex - 1], qNote, trackIndex); + break; + case "chords_progression": if (trackIndex == 1) trackCandidate = GenerateChordsProgTrack(tonic, scaleValues, nbBars, 1, octaves[trackIndex - 1], frequencies[trackIndex - 1], qNote, trackIndex); @@ -316,12 +324,14 @@ function updateSongGeneratorPage(): void if (selectedTypeId != null) { const isCounterpoint = selectedTypeId.startsWith("counterpoint"); + const isChordsMelody = (selectedTypeId == "chords+melody"); const isArpeggiosProg = (selectedTypeId == "arpeggios_progression"); const isSequence = (selectedTypeId == "sequence"); - setEnabled("song_generator_nb_notes_per_bar", (isSequence || isArpeggiosProg)); + setEnabled("song_generator_nb_notes_per_bar", (isSequence || isChordsMelody || isArpeggiosProg)); setEnabled("song_generator_generate_track2", !regexCounterpoint4_5S.test(selectedTypeId)); - for (let i = 1; i <= 2; i++) - setEnabled(`song_generator_freq_track${i}`, isSequence); + + setEnabled(`song_generator_freq_track1`, (isSequence || isChordsMelody)); + setEnabled(`song_generator_freq_track2`, isSequence); } // for debug purposes