Skip to content

Commit c40690e

Browse files
authored
Rename 'Voice' to 'Instrument' (#130)
1 parent 6d3c945 commit c40690e

File tree

174 files changed

+1434
-1434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+1434
-1434
lines changed

benchmarks/BaroquenMelody.Benchmarks/Compositions/BenchmarkData.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ namespace BaroquenMelody.Benchmarks.Compositions;
99
internal static class BenchmarkData
1010
{
1111
public static readonly CompositionConfiguration CompositionConfiguration = new(
12-
new HashSet<VoiceConfiguration>
12+
new HashSet<InstrumentConfiguration>
1313
{
14-
new(Voice.One, Notes.C0, Notes.C6),
15-
new(Voice.Two, Notes.C0, Notes.C6),
16-
new(Voice.Three, Notes.C0, Notes.C6),
17-
new(Voice.Four, Notes.C0, Notes.C6)
14+
new(Instrument.One, Notes.C0, Notes.C6),
15+
new(Instrument.Two, Notes.C0, Notes.C6),
16+
new(Instrument.Three, Notes.C0, Notes.C6),
17+
new(Instrument.Four, Notes.C0, Notes.C6)
1818
},
1919
new PhrasingConfiguration(
2020
PhraseLengths: [1, 2, 4, 8],
@@ -31,37 +31,37 @@ internal static class BenchmarkData
3131
);
3232

3333
public static readonly BaroquenChord CMajor = new([
34-
new BaroquenNote(Voice.One, Notes.C4, MusicalTimeSpan.Quarter),
35-
new BaroquenNote(Voice.Two, Notes.E3, MusicalTimeSpan.Quarter),
36-
new BaroquenNote(Voice.Three, Notes.G2, MusicalTimeSpan.Quarter),
37-
new BaroquenNote(Voice.Four, Notes.C1, MusicalTimeSpan.Quarter)
34+
new BaroquenNote(Instrument.One, Notes.C4, MusicalTimeSpan.Quarter),
35+
new BaroquenNote(Instrument.Two, Notes.E3, MusicalTimeSpan.Quarter),
36+
new BaroquenNote(Instrument.Three, Notes.G2, MusicalTimeSpan.Quarter),
37+
new BaroquenNote(Instrument.Four, Notes.C1, MusicalTimeSpan.Quarter)
3838
]);
3939

4040
public static readonly BaroquenChord EMinor = new([
41-
new BaroquenNote(Voice.One, Notes.B4, MusicalTimeSpan.Quarter),
42-
new BaroquenNote(Voice.Two, Notes.E3, MusicalTimeSpan.Quarter),
43-
new BaroquenNote(Voice.Three, Notes.G2, MusicalTimeSpan.Quarter),
44-
new BaroquenNote(Voice.Four, Notes.B1, MusicalTimeSpan.Quarter)
41+
new BaroquenNote(Instrument.One, Notes.B4, MusicalTimeSpan.Quarter),
42+
new BaroquenNote(Instrument.Two, Notes.E3, MusicalTimeSpan.Quarter),
43+
new BaroquenNote(Instrument.Three, Notes.G2, MusicalTimeSpan.Quarter),
44+
new BaroquenNote(Instrument.Four, Notes.B1, MusicalTimeSpan.Quarter)
4545
]);
4646

4747
public static readonly BaroquenChord FMajor = new([
48-
new BaroquenNote(Voice.One, Notes.C4, MusicalTimeSpan.Quarter),
49-
new BaroquenNote(Voice.Two, Notes.F3, MusicalTimeSpan.Quarter),
50-
new BaroquenNote(Voice.Three, Notes.A2, MusicalTimeSpan.Quarter),
51-
new BaroquenNote(Voice.Four, Notes.F1, MusicalTimeSpan.Quarter)
48+
new BaroquenNote(Instrument.One, Notes.C4, MusicalTimeSpan.Quarter),
49+
new BaroquenNote(Instrument.Two, Notes.F3, MusicalTimeSpan.Quarter),
50+
new BaroquenNote(Instrument.Three, Notes.A2, MusicalTimeSpan.Quarter),
51+
new BaroquenNote(Instrument.Four, Notes.F1, MusicalTimeSpan.Quarter)
5252
]);
5353

5454
public static readonly BaroquenChord GMajor = new([
55-
new BaroquenNote(Voice.One, Notes.D4, MusicalTimeSpan.Quarter),
56-
new BaroquenNote(Voice.Two, Notes.G3, MusicalTimeSpan.Quarter),
57-
new BaroquenNote(Voice.Three, Notes.B2, MusicalTimeSpan.Quarter),
58-
new BaroquenNote(Voice.Four, Notes.G1, MusicalTimeSpan.Quarter)
55+
new BaroquenNote(Instrument.One, Notes.D4, MusicalTimeSpan.Quarter),
56+
new BaroquenNote(Instrument.Two, Notes.G3, MusicalTimeSpan.Quarter),
57+
new BaroquenNote(Instrument.Three, Notes.B2, MusicalTimeSpan.Quarter),
58+
new BaroquenNote(Instrument.Four, Notes.G1, MusicalTimeSpan.Quarter)
5959
]);
6060

6161
public static readonly BaroquenChord DMinor = new([
62-
new BaroquenNote(Voice.One, Notes.D4, MusicalTimeSpan.Quarter),
63-
new BaroquenNote(Voice.Two, Notes.F3, MusicalTimeSpan.Quarter),
64-
new BaroquenNote(Voice.Three, Notes.A2, MusicalTimeSpan.Quarter),
65-
new BaroquenNote(Voice.Four, Notes.D1, MusicalTimeSpan.Quarter)
62+
new BaroquenNote(Instrument.One, Notes.D4, MusicalTimeSpan.Quarter),
63+
new BaroquenNote(Instrument.Two, Notes.F3, MusicalTimeSpan.Quarter),
64+
new BaroquenNote(Instrument.Three, Notes.A2, MusicalTimeSpan.Quarter),
65+
new BaroquenNote(Instrument.Four, Notes.D1, MusicalTimeSpan.Quarter)
6666
]);
6767
}

benchmarks/BaroquenMelody.Benchmarks/Compositions/Rules/AggregateCompositionRuleBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class AggregateCompositionRuleBenchmarks
1414
private static readonly AggregateCompositionRule AggregateCompositionRule = new(
1515
[
1616
new HandleAscendingSeventh(BenchmarkData.CompositionConfiguration),
17-
new EnsureVoiceRange(BenchmarkData.CompositionConfiguration),
17+
new EnsureInstrumentRange(BenchmarkData.CompositionConfiguration),
1818
new AvoidDissonance(),
1919
new AvoidDissonantLeaps(BenchmarkData.CompositionConfiguration),
2020
new AvoidRepetition(),

src/BaroquenMelody.App.Components/Pages/Home.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<CompositionConfigurationPanel/>
77
</MudItem>
88
<MudItem xs="12" md="12">
9-
<VoiceConfigurationPanel/>
9+
<InstrumentConfigurationPanel/>
1010
</MudItem>
1111
<MudItem xs="12" md="12">
1212
<CompositionRuleConfigurationPanel />

src/BaroquenMelody.App.Components/Shared/InitiateCompositionCard.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
private async Task Compose()
1616
{
1717
var compositionConfiguration = new CompositionConfiguration(
18-
VoiceConfigurationState.Value.Aggregate,
18+
InstrumentConfigurationState.Value.Aggregate,
1919
PhrasingConfiguration.Default,
2020
CompositionRuleConfigurationState.Value.Aggregate,
2121
OrnamentationConfigurationState.Value.Aggregate,

src/BaroquenMelody.App.Components/Shared/VoiceConfigurationCard.razor renamed to src/BaroquenMelody.App.Components/Shared/InstrumentConfigurationCard.razor

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<MudCard Elevation="3" Class="my-2">
44
<MudCardHeader>
55
<CardHeaderContent>
6-
<MudText>Voice @Voice</MudText>
6+
<MudText>Instrument @Instrument</MudText>
77
</CardHeaderContent>
88
</MudCardHeader>
99
<MudCardContent>
@@ -25,7 +25,7 @@
2525
</MudSelect>
2626
</MudItem>
2727
<MudItem xs="12" md="6">
28-
<MudSelect ValueChanged="HandleInstrumentChange" Value="Instrument" Label="Instrument" T="GeneralMidi2Program">
28+
<MudSelect ValueChanged="HandleMidiInstrumentChange" Value="MidiInstrument" Label="MidiProgram" T="GeneralMidi2Program">
2929
@foreach (var instrument in EnumUtils<GeneralMidi2Program>.AsEnumerable())
3030
{
3131
<MudSelectItem Value="instrument">@instrument</MudSelectItem>
@@ -41,23 +41,23 @@
4141

4242
@code
4343
{
44-
[Parameter, EditorRequired] public Voice Voice { get; set; }
44+
[Parameter, EditorRequired] public Instrument Instrument { get; set; }
4545

46-
private Note MinNote => VoiceConfigurationState.Value[Voice]?.MinNote ?? Notes.C3;
46+
private Note MinNote => InstrumentConfigurationState.Value[Instrument]?.MinNote ?? Notes.C3;
4747

48-
private Note MaxNote => VoiceConfigurationState.Value[Voice]?.MaxNote ?? Notes.C6;
48+
private Note MaxNote => InstrumentConfigurationState.Value[Instrument]?.MaxNote ?? Notes.C6;
4949

50-
private GeneralMidi2Program Instrument => VoiceConfigurationState.Value[Voice]?.Instrument ?? GeneralMidi2Program.AcousticGrandPiano;
50+
private GeneralMidi2Program MidiInstrument => InstrumentConfigurationState.Value[Instrument]?.MidiProgram ?? GeneralMidi2Program.AcousticGrandPiano;
5151

52-
private bool IsEnabled => VoiceConfigurationState.Value[Voice]?.IsEnabled ?? false;
52+
private bool IsEnabled => InstrumentConfigurationState.Value[Instrument]?.IsEnabled ?? false;
5353

5454
private static IEnumerable<Note> GetNotes() => Enumerable.Range(0, 127).Select(noteNumber => Note.Get((SevenBitNumber)noteNumber));
5555

56-
private void HandleMinNoteChange(Note note) => Dispatcher.Dispatch(new UpdateVoiceConfiguration(Voice, note, MaxNote, Instrument, IsEnabled));
56+
private void HandleMinNoteChange(Note note) => Dispatcher.Dispatch(new UpdateInstrumentConfiguration(Instrument, note, MaxNote, MidiInstrument, IsEnabled));
5757

58-
private void HandleMaxNoteChange(Note note) => Dispatcher.Dispatch(new UpdateVoiceConfiguration(Voice, MinNote, note, Instrument, IsEnabled));
58+
private void HandleMaxNoteChange(Note note) => Dispatcher.Dispatch(new UpdateInstrumentConfiguration(Instrument, MinNote, note, MidiInstrument, IsEnabled));
5959

60-
private void HandleInstrumentChange(GeneralMidi2Program instrument) => Dispatcher.Dispatch(new UpdateVoiceConfiguration(Voice, MinNote, MaxNote, instrument, IsEnabled));
60+
private void HandleMidiInstrumentChange(GeneralMidi2Program instrument) => Dispatcher.Dispatch(new UpdateInstrumentConfiguration(Instrument, MinNote, MaxNote, instrument, IsEnabled));
6161

62-
private void HandleIsEnabledChange(bool isEnabled) => Dispatcher.Dispatch(new UpdateVoiceConfiguration(Voice, MinNote, MaxNote, Instrument, isEnabled));
62+
private void HandleIsEnabledChange(bool isEnabled) => Dispatcher.Dispatch(new UpdateInstrumentConfiguration(Instrument, MinNote, MaxNote, MidiInstrument, isEnabled));
6363
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<MudExpansionPanels>
2+
<MudExpansionPanel Text="Instrument Configurations">
3+
@foreach (var instrument in InstrumentConfigurationService.ConfigurableInstruments)
4+
{
5+
<InstrumentConfigurationCard Instrument="instrument"/>
6+
}
7+
</MudExpansionPanel>
8+
</MudExpansionPanels>

src/BaroquenMelody.App.Components/Shared/VoiceConfigurationPanel.razor

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/BaroquenMelody.App.Components/_Imports.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232

3333
@inject IState<CompositionOrnamentationConfigurationState> OrnamentationConfigurationState
3434
@inject IState<CompositionRuleConfigurationState> CompositionRuleConfigurationState
35-
@inject IState<VoiceConfigurationState> VoiceConfigurationState
35+
@inject IState<InstrumentConfigurationState> InstrumentConfigurationState
3636
@inject IState<CompositionConfigurationState> CompositionConfigurationState
3737
@inject IState<CompositionProgressState> CompositionProgressState
3838
@inject IDispatcher Dispatcher
3939
@inject IOrnamentationConfigurationService OrnamentationConfigurationService
4040
@inject ICompositionRuleConfigurationService CompositionRuleConfigurationService
41-
@inject IVoiceConfigurationService VoiceConfigurationService
41+
@inject IInstrumentConfigurationService InstrumentConfigurationService
4242
@inject ICompositionConfigurationService CompositionConfigurationService
4343
@inject IBaroquenMelodyComposerConfigurator ComposerConfigurator
4444
@inject IThemeProvider ThemeProvider

src/BaroquenMelody.Library/Compositions/Choices/ChordChoice.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
namespace BaroquenMelody.Library.Compositions.Choices;
44

55
/// <summary>
6-
/// Represents the note choices for the voices in a given chord to move to the next chord.
6+
/// Represents the note choices for the instruments in a given chord to move to the next chord.
77
/// </summary>
88
internal sealed record ChordChoice
99
{
1010
private readonly IList<NoteChoice> _noteChoices;
1111

1212
public ChordChoice(IEnumerable<NoteChoice> noteChoices) =>
13-
_noteChoices = [.. noteChoices.OrderBy(static noteChoice => noteChoice.Voice)];
13+
_noteChoices = [.. noteChoices.OrderBy(static noteChoice => noteChoice.Instrument)];
1414

1515
public IList<NoteChoice> NoteChoices
1616
{
1717
get => _noteChoices;
18-
init { _noteChoices = [.. value.OrderBy(static noteChoice => noteChoice.Voice)]; }
18+
init { _noteChoices = [.. value.OrderBy(static noteChoice => noteChoice.Instrument)]; }
1919
}
2020

2121
public bool Equals(ChordChoice? other)

src/BaroquenMelody.Library/Compositions/Choices/ChordChoiceRepositoryFactory.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ namespace BaroquenMelody.Library.Compositions.Choices;
55
/// <inheritdoc cref="IChordChoiceRepository"/>
66
internal sealed class ChordChoiceRepositoryFactory(INoteChoiceGenerator noteChoiceGenerator) : IChordChoiceRepositoryFactory
77
{
8-
public IChordChoiceRepository Create(CompositionConfiguration compositionConfiguration) => compositionConfiguration.Voices.Count switch
8+
public IChordChoiceRepository Create(CompositionConfiguration compositionConfiguration) => compositionConfiguration.Instruments.Count switch
99
{
10-
DuetChordChoiceRepository.NumberOfVoices => new DuetChordChoiceRepository(compositionConfiguration, noteChoiceGenerator),
11-
TrioChordChoiceRepository.NumberOfVoices => new TrioChordChoiceRepository(compositionConfiguration, noteChoiceGenerator),
12-
QuartetChordChoiceRepository.NumberOfVoices => new QuartetChordChoiceRepository(compositionConfiguration, noteChoiceGenerator),
10+
DuetChordChoiceRepository.NumberOfInstruments => new DuetChordChoiceRepository(compositionConfiguration, noteChoiceGenerator),
11+
TrioChordChoiceRepository.NumberOfInstruments => new TrioChordChoiceRepository(compositionConfiguration, noteChoiceGenerator),
12+
QuartetChordChoiceRepository.NumberOfInstruments => new QuartetChordChoiceRepository(compositionConfiguration, noteChoiceGenerator),
1313
_ => throw new ArgumentException(
14-
"The composition configuration must contain between two and four voice configurations.",
14+
"The composition configuration must contain between two and four instrument configurations.",
1515
nameof(compositionConfiguration)
1616
)
1717
};

src/BaroquenMelody.Library/Compositions/Choices/DuetChordChoiceRepository.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ namespace BaroquenMelody.Library.Compositions.Choices;
88
/// <inheritdoc cref="IChordChoiceRepository"/>
99
internal sealed class DuetChordChoiceRepository : IChordChoiceRepository
1010
{
11-
public const int NumberOfVoices = 2;
11+
public const int NumberOfInstruments = 2;
1212

1313
private readonly LazyCartesianProduct<NoteChoice, NoteChoice> _noteChoices;
1414

1515
public DuetChordChoiceRepository(CompositionConfiguration compositionConfiguration, INoteChoiceGenerator noteChoiceGenerator)
1616
{
17-
if (compositionConfiguration.Voices.Count != NumberOfVoices)
17+
if (compositionConfiguration.Instruments.Count != NumberOfInstruments)
1818
{
1919
throw new ArgumentException(
20-
"The composition configuration must contain exactly two voice configurations.",
20+
"The composition configuration must contain exactly two instrument configurations.",
2121
nameof(compositionConfiguration)
2222
);
2323
}
2424

25-
var noteChoicesForVoices = compositionConfiguration.Voices
26-
.OrderBy(static voice => voice)
25+
var noteChoicesForInstruments = compositionConfiguration.Instruments
26+
.OrderBy(static instrument => instrument)
2727
.Select(noteChoiceGenerator.GenerateNoteChoices)
2828
.ToList();
2929

3030
_noteChoices = new LazyCartesianProduct<NoteChoice, NoteChoice>(
31-
[.. noteChoicesForVoices[0]],
32-
[.. noteChoicesForVoices[1]]
31+
[.. noteChoicesForInstruments[0]],
32+
[.. noteChoicesForInstruments[1]]
3333
);
3434
}
3535

src/BaroquenMelody.Library/Compositions/Choices/IChordChoiceRepositoryFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ internal interface IChordChoiceRepositoryFactory
99
{
1010
/// <summary>
1111
/// Creates a <see cref="IChordChoiceRepository"/> for the given <see cref="CompositionConfiguration"/>. This is needed
12-
/// because the specific <see cref="IChordChoiceRepository"/> implementation to use depends on how many voices are in the composition.
12+
/// because the specific <see cref="IChordChoiceRepository"/> implementation to use depends on how many instruments are in the composition.
1313
/// </summary>
1414
/// <param name="compositionConfiguration"> The <see cref="CompositionConfiguration"/> to create the <see cref="IChordChoiceRepository"/> for. </param>
1515
/// <returns> The created <see cref="IChordChoiceRepository"/>. </returns>

src/BaroquenMelody.Library/Compositions/Choices/INoteChoiceGenerator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
namespace BaroquenMelody.Library.Compositions.Choices;
44

55
/// <summary>
6-
/// Generates the possible note choices for the given voice.
6+
/// Generates the possible note choices for the given instrument.
77
/// </summary>
88
internal interface INoteChoiceGenerator
99
{
1010
/// <summary>
11-
/// Generates the possible note choices for the given voice.
11+
/// Generates the possible note choices for the given instrument.
1212
/// </summary>
13-
/// <param name="voice"> The voice to generate note choices for. </param>
14-
/// <returns> The possible note choices for the given voice. </returns>
15-
ISet<NoteChoice> GenerateNoteChoices(Voice voice);
13+
/// <param name="instrument"> The instrument to generate note choices for. </param>
14+
/// <returns> The possible note choices for the given instrument. </returns>
15+
ISet<NoteChoice> GenerateNoteChoices(Instrument instrument);
1616
}

src/BaroquenMelody.Library/Compositions/Choices/NoteChoice.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
namespace BaroquenMelody.Library.Compositions.Choices;
44

55
/// <summary>
6-
/// Represents a choice of note motion and scale step change for a given voice to move to the next note.
6+
/// Represents a choice of note motion and scale step change for a given instrument to move to the next note.
77
/// </summary>
8-
/// <param name="Voice"> The voice associated with the note choice. </param>
8+
/// <param name="Instrument"> The instrument associated with the note choice. </param>
99
/// <param name="Motion"> The motion which will be used to move to the next note. </param>
1010
/// <param name="ScaleStepChange"> The change in scale steps which will be used to move to the next note. </param>
1111
internal sealed record NoteChoice(
12-
Voice Voice,
12+
Instrument Instrument,
1313
NoteMotion Motion,
1414
byte ScaleStepChange
1515
);

src/BaroquenMelody.Library/Compositions/Choices/NoteChoiceGenerator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ internal sealed class NoteChoiceGenerator(byte minScaleStepChange = 1, byte maxS
77
{
88
private readonly NoteMotion[] noteMotions = [NoteMotion.Ascending, NoteMotion.Descending];
99

10-
public ISet<NoteChoice> GenerateNoteChoices(Voice voice) => Enumerable
10+
public ISet<NoteChoice> GenerateNoteChoices(Instrument instrument) => Enumerable
1111
.Range(minScaleStepChange, maxScaleStepChange - minScaleStepChange + 1)
1212
.Select(static scaleStepChange => (byte)scaleStepChange)
13-
.SelectMany(scaleStepChange => noteMotions.Select(noteMotion => new NoteChoice(voice, noteMotion, scaleStepChange)))
14-
.Append(new NoteChoice(voice, NoteMotion.Oblique, 0))
13+
.SelectMany(scaleStepChange => noteMotions.Select(noteMotion => new NoteChoice(instrument, noteMotion, scaleStepChange)))
14+
.Append(new NoteChoice(instrument, NoteMotion.Oblique, 0))
1515
.ToHashSet();
1616
}

src/BaroquenMelody.Library/Compositions/Choices/QuartetChordChoiceRepository.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,32 @@ namespace BaroquenMelody.Library.Compositions.Choices;
88
/// <inheritdoc cref="IChordChoiceRepository"/>
99
internal sealed class QuartetChordChoiceRepository : IChordChoiceRepository
1010
{
11-
public const int NumberOfVoices = 4;
11+
public const int NumberOfInstruments = 4;
1212

1313
private readonly LazyCartesianProduct<NoteChoice, NoteChoice, NoteChoice, NoteChoice> _noteChoices;
1414

1515
public QuartetChordChoiceRepository(
1616
CompositionConfiguration configuration,
1717
INoteChoiceGenerator noteChoiceGenerator)
1818
{
19-
if (configuration.VoiceConfigurations.Count != NumberOfVoices)
19+
if (configuration.InstrumentConfigurations.Count != NumberOfInstruments)
2020
{
2121
throw new ArgumentException(
22-
"The composition configuration must contain exactly four voice configurations.",
22+
"The composition configuration must contain exactly four instrument configurations.",
2323
nameof(configuration)
2424
);
2525
}
2626

27-
var noteChoicesForVoices = configuration.VoiceConfigurations
28-
.OrderBy(static voiceConfiguration => voiceConfiguration.Voice)
29-
.Select(voiceConfiguration => noteChoiceGenerator.GenerateNoteChoices(voiceConfiguration.Voice))
27+
var noteChoicesForInstruments = configuration.InstrumentConfigurations
28+
.OrderBy(static instrumentConfiguration => instrumentConfiguration.Instrument)
29+
.Select(instrumentConfiguration => noteChoiceGenerator.GenerateNoteChoices(instrumentConfiguration.Instrument))
3030
.ToList();
3131

3232
_noteChoices = new LazyCartesianProduct<NoteChoice, NoteChoice, NoteChoice, NoteChoice>(
33-
[.. noteChoicesForVoices[0]],
34-
[.. noteChoicesForVoices[1]],
35-
[.. noteChoicesForVoices[2]],
36-
[.. noteChoicesForVoices[3]]
33+
[.. noteChoicesForInstruments[0]],
34+
[.. noteChoicesForInstruments[1]],
35+
[.. noteChoicesForInstruments[2]],
36+
[.. noteChoicesForInstruments[3]]
3737
);
3838
}
3939

0 commit comments

Comments
 (0)