41 lines
2.1 KiB
C#
41 lines
2.1 KiB
C#
using GAJ3T.MusicGen.RiffGrooveBuilder.Core.Articulations;
|
|
using GAJ3T.MusicGen.RiffGrooveBuilder.Core.Composition;
|
|
|
|
namespace GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests.Support;
|
|
|
|
internal static class SyntheticPipelineProfiles
|
|
{
|
|
internal const string Example = "Generate 4 bars at 120 BPM in E minor, 4/4: palm-muted eighth-note lead guitar, sustained root-note bass, kick on beats 1 and 3, snare on beats 2 and 4, and closed hi-hat eighth notes.";
|
|
|
|
internal static InstrumentProfile[] Profiles() =>
|
|
[
|
|
Pitched(TrackRole.Lead, 0, 240, true),
|
|
Pitched(TrackRole.Bass, 1, 120, true),
|
|
new("synthetic-drums", "synthetic-pipeline-drums", TrackRole.Drums, "Synthetic Pipeline Drums", "test-1", "map-test-1",
|
|
Evidence(), 40, 80, 9, null, [new(21, 0)], null, [new(21, 0)],
|
|
Enum.GetValues<DrumVoice>().Select((voice, i) => new ArticulationRule(
|
|
Articulation.Sustain, voice, 50 + i, StateBehavior.Latched, null, new(1, 127, null),
|
|
[new(21, 100)])).ToArray())
|
|
];
|
|
|
|
internal static InstrumentProfile Pitched(TrackRole role, int channel, long advance, bool palm)
|
|
{
|
|
var lead = role == TrackRole.Lead;
|
|
var rules = new List<ArticulationRule>
|
|
{
|
|
new(Articulation.Sustain, null, null, StateBehavior.Latched,
|
|
new(lead ? 10 : 12, lead ? 90 : 92, advance, lead ? 30 : 20), new(1, 127, null), [])
|
|
};
|
|
if (palm)
|
|
rules.Add(new(Articulation.PalmMute, null, null, StateBehavior.Latched,
|
|
new(lead ? 11 : 13, 91, advance, 30), new(64, 127, lead ? 110 : null), []));
|
|
return new("synthetic-" + role.ToString().ToLowerInvariant(),
|
|
"synthetic-pipeline-" + role.ToString().ToLowerInvariant(), role, "Synthetic Pipeline " + role,
|
|
"test-1", "map-test-1", Evidence(), lead ? 40 : 20, 100, channel,
|
|
lead || !palm ? Articulation.Sustain : Articulation.PalmMute, [], null, [], rules);
|
|
}
|
|
|
|
private static MappingEvidence Evidence() => new(MappingVerification.Synthetic,
|
|
"Invented test-only mapping, no vendor applicability", "Test-authored data", "Synthetic assertions only");
|
|
}
|