Reset should be fixed now (keylights)
git-svn-id: https://svn.code.sf.net/p/pianobooster/code/trunk@152 ba081f5d-443b-49a7-ac4b-446c3f91f371
This commit is contained in:
parent
8c68efebe4
commit
ee4ff4662c
|
@ -126,10 +126,15 @@ void CConductor::channelSoundOff(int channel)
|
|||
|
||||
CMidiEvent midi;
|
||||
midi.controlChangeEvent(0, channel, MIDI_ALL_NOTES_OFF, 0);
|
||||
playTrackEvent(midi);
|
||||
playMidiEvent(midi);
|
||||
// remove the sustain pedal as well
|
||||
midi.controlChangeEvent(0, channel, MIDI_SUSTAIN, 0);
|
||||
playTrackEvent(midi);
|
||||
playMidiEvent(midi);
|
||||
}
|
||||
|
||||
void CConductor::trackSoundOff(int trackNumber)
|
||||
{
|
||||
channelSoundOff( track2Channel( trackNumber ));
|
||||
}
|
||||
|
||||
void CConductor::allSoundOff()
|
||||
|
@ -153,7 +158,7 @@ void CConductor::resetAllChannels()
|
|||
for ( channel = 0; channel < MAX_MIDI_CHANNELS; channel++)
|
||||
{
|
||||
midi.controlChangeEvent(0, channel, MIDI_RESET_ALL_CONTROLLERS, 0);
|
||||
playTrackEvent(midi);
|
||||
playMidiEvent(midi);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,7 +169,7 @@ void CConductor::muteChannel(int channel, bool state)
|
|||
|
||||
m_muteChannels[ channel] = state;
|
||||
if (state == true)
|
||||
channelSoundOff(channel); // fixme this is called too often
|
||||
trackSoundOff(channel); // fixme this is called too often
|
||||
}
|
||||
|
||||
void CConductor::mutePart(int part, bool state)
|
||||
|
@ -184,7 +189,7 @@ void CConductor::mutePart(int part, bool state)
|
|||
}
|
||||
|
||||
if (state == true)
|
||||
channelSoundOff(channel);
|
||||
trackSoundOff(channel);
|
||||
}
|
||||
|
||||
/* calculate the new solo_volume */
|
||||
|
@ -417,10 +422,11 @@ void CConductor::playMusic(bool start)
|
|||
}
|
||||
|
||||
// This will allow us to map midi tracks onto midi channels
|
||||
// tacks will eventually allow for more than the 16 midi channels (eg with two mid devices)
|
||||
void CConductor::playTrackEvent(CMidiEvent event)
|
||||
{
|
||||
int track = event.channel();
|
||||
int chan = m_track2ChannelLookUp[track];
|
||||
int chan = track2Channel(track);
|
||||
if (chan == -1)
|
||||
return;
|
||||
event.setChannel(chan);
|
||||
|
|
|
@ -229,6 +229,9 @@ protected:
|
|||
|
||||
bool seekingBarNumber() { return m_bar.seekingBarNumber();}
|
||||
|
||||
int track2Channel(int track) {return m_track2ChannelLookUp[track];}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -239,6 +242,8 @@ private:
|
|||
void outputPianoVolume();
|
||||
|
||||
void channelSoundOff(int channel);
|
||||
void trackSoundOff(int trackNumber);
|
||||
|
||||
void findSplitPoint();
|
||||
void fetchNextChord();
|
||||
void playTransposeEvent(CMidiEvent event);
|
||||
|
|
Loading…
Reference in New Issue
Block a user