Improve chord voicings on playback

This commit is contained in:
Matthias Neeracher 2011-08-28 23:38:36 +02:00
parent 39819f9a0c
commit 936660b5e6

View File

@ -252,11 +252,14 @@ void VLAUSoundOut::PlayNote(const VLNote & note)
void VLAUSoundOut::PlayChord(const VLChord & chord) void VLAUSoundOut::PlayChord(const VLChord & chord)
{ {
//
// TODO: The voicings here are not very realistic
//
std::vector<int8_t> notes; std::vector<int8_t> notes;
for (int i = 0; i < 32; ++i) for (int i = 0; i < 32; ++i)
if (chord.fSteps & (1 << i)) if (chord.fSteps & (1 << i))
notes.push_back(chord.fPitch+i); notes.push_back(chord.fPitch+i%12);
if (chord.fRootPitch != VLNote::kNoPitch) if (chord.fRootPitch != VLNote::kNoPitch)
notes.push_back(chord.fRootPitch); notes.push_back(chord.fRootPitch);
Play(&notes[0], notes.size()); Play(&notes[0], notes.size());