summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets/mtrackinfo.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-07 14:53:22 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-07 14:53:22 +0000
commit3e6f82d7b9b29e8df7d63658540b762203b820f6 (patch)
tree3e1a71a2bda678b1574ab88c59195b158c0a64ca /muse2/muse/widgets/mtrackinfo.cpp
parentf60ddccd6d328a5cebc4d524246e33b399a8dfdd (diff)
added new style drum tracks
atm, they aren't different from midi tracks except that they launch a drum editor by default added markers to help me finding the places to change TODO: instrument muting, in-note-mapping etc...
Diffstat (limited to 'muse2/muse/widgets/mtrackinfo.cpp')
-rw-r--r--muse2/muse/widgets/mtrackinfo.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp
index 56429879..57674395 100644
--- a/muse2/muse/widgets/mtrackinfo.cpp
+++ b/muse2/muse/widgets/mtrackinfo.cpp
@@ -216,6 +216,7 @@ void MidiTrackInfo::heartBeat()
{
case Track::MIDI:
case Track::DRUM:
+ case Track::NEW_DRUM:
{
MidiTrack* track = (MidiTrack*)selected;
@@ -344,7 +345,7 @@ void MidiTrackInfo::heartBeat()
else
{
MidiInstrument* instr = mp->instrument();
- QString name = instr->getPatchName(outChannel, nprogram, song->mtype(), track->type() == Track::DRUM);
+ QString name = instr->getPatchName(outChannel, nprogram, song->mtype(), track->type() == Track::DRUM); //FINDMICHJETZT was soll das?
if(name.isEmpty())
{
const QString n("???");
@@ -390,7 +391,7 @@ void MidiTrackInfo::heartBeat()
//else
//{
MidiInstrument* instr = mp->instrument();
- QString name = instr->getPatchName(outChannel, program, song->mtype(), track->type() == Track::DRUM);
+ QString name = instr->getPatchName(outChannel, program, song->mtype(), track->type() == Track::DRUM); //FINDMICHJETZT was soll das?
if(iPatch->text() != name)
iPatch->setText(name);
@@ -567,8 +568,12 @@ void MidiTrackInfo::setLabelText()
//pal.setColor(trackNameLabel->backgroundRole(), QColor(0, 160, 255)); // Med blue
if(track->type() == Track::DRUM)
c = MusEConfig::config.drumTrackLabelBg;
- else
+ else if (track->type() == Track::MIDI)
c = MusEConfig::config.midiTrackLabelBg;
+ else if (track->type() == Track::NEW_DRUM)
+ c = MusEConfig::config.newDrumTrackLabelBg;
+ else
+ printf("THIS SHOULD NEVER HAPPEN: track is not a MIDI track in MidiTrackInfo::setLabelText()!\n");
QLinearGradient gradient(trackNameLabel->geometry().topLeft(), trackNameLabel->geometry().bottomLeft());
//gradient.setColorAt(0, c.darker());
@@ -757,7 +762,7 @@ void MidiTrackInfo::iProgHBankChanged()
audio->msgPlayMidiEvent(&ev);
MidiInstrument* instr = mp->instrument();
- iPatch->setText(instr->getPatchName(channel, program, song->mtype(), track->type() == Track::DRUM));
+ iPatch->setText(instr->getPatchName(channel, program, song->mtype(), track->type() == Track::DRUM)); //FINDMICHJETZT was soll das?
// updateTrackInfo();
}
@@ -835,7 +840,7 @@ void MidiTrackInfo::iProgLBankChanged()
audio->msgPlayMidiEvent(&ev);
MidiInstrument* instr = mp->instrument();
- iPatch->setText(instr->getPatchName(channel, program, song->mtype(), track->type() == Track::DRUM));
+ iPatch->setText(instr->getPatchName(channel, program, song->mtype(), track->type() == Track::DRUM)); //FINDMICHJETZT was soll das?
// updateTrackInfo();
}
@@ -913,7 +918,7 @@ void MidiTrackInfo::iProgramChanged()
audio->msgPlayMidiEvent(&ev);
MidiInstrument* instr = mp->instrument();
- iPatch->setText(instr->getPatchName(channel, program, song->mtype(), track->type() == Track::DRUM));
+ iPatch->setText(instr->getPatchName(channel, program, song->mtype(), track->type() == Track::DRUM)); //FINDMICHJETZT was soll das?
}
// updateTrackInfo();
@@ -1082,7 +1087,7 @@ void MidiTrackInfo::instrPopup()
PopupMenu* pup = new PopupMenu(true);
//instr->populatePatchPopup(pop, channel, song->mtype(), track->type() == Track::DRUM);
- instr->populatePatchPopup(pup, channel, song->mtype(), track->type() == Track::DRUM);
+ instr->populatePatchPopup(pup, channel, song->mtype(), track->type() == Track::DRUM); //FINDMICHJETZT was soll das?
//if(pop->actions().count() == 0)
// return;
@@ -1406,7 +1411,7 @@ void MidiTrackInfo::updateTrackInfo(int flags)
else
{
MidiInstrument* instr = mp->instrument();
- iPatch->setText(instr->getPatchName(outChannel, nprogram, song->mtype(), track->type() == Track::DRUM));
+ iPatch->setText(instr->getPatchName(outChannel, nprogram, song->mtype(), track->type() == Track::DRUM)); //FINDMICHJETZT was soll das?
}
}
else
@@ -1422,7 +1427,7 @@ void MidiTrackInfo::updateTrackInfo(int flags)
//else
//{
MidiInstrument* instr = mp->instrument();
- iPatch->setText(instr->getPatchName(outChannel, program, song->mtype(), track->type() == Track::DRUM));
+ iPatch->setText(instr->getPatchName(outChannel, program, song->mtype(), track->type() == Track::DRUM)); //FINDMICHJETZT was soll das?
int hb = ((program >> 16) & 0xff) + 1;
if (hb == 0x100)