summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2010-01-07 00:27:25 +0000
committerTim E. Real <termtech@rogers.com>2010-01-07 00:27:25 +0000
commitd819cbfc6e6232d66b0472471b593932c42f290c (patch)
treedee765172c708086ef0ba555ef5d749911753462
parent9eabbfa460b5e4a2f24ace6146df6df59ddcfdbd (diff)
Midi mixer strips: One per-channel now.
-rw-r--r--muse/ChangeLog3
-rw-r--r--muse/muse/mixer/amixer.cpp16
-rw-r--r--muse/muse/mixer/mstrip.cpp31
-rw-r--r--muse/muse/mixer/strip.cpp4
4 files changed, 51 insertions, 3 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index efadbae6..797c8715 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,3 +1,6 @@
+06.02.2010
+ * Fixed: Midi meters now show for each track even if they're all on same device and channel. (T356)
+ - Oversight, long overdue. The meters AND automation control needed to be 'per-track'.
06.01.2010
* Feature: Jack transport enable/disable in Midi Sync settings window. Stores setting per-song. (T356)
- Should be Ok to use and test. Needs a bit more work. See jack.cpp and jackaudio.h
diff --git a/muse/muse/mixer/amixer.cpp b/muse/muse/mixer/amixer.cpp
index c92b7842..6f79216a 100644
--- a/muse/muse/mixer/amixer.cpp
+++ b/muse/muse/mixer/amixer.cpp
@@ -176,6 +176,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
// generate Midi channel/port Strips
//---------------------------------------------------
+ // Changed by Tim. p3.3.21
+ /*
MidiTrackList* mtl = song->midis();
int ports[MIDI_PORTS];
memset(ports, 0, MIDI_PORTS * sizeof(int));
@@ -188,6 +190,12 @@ void AudioMixerApp::updateMixer(UpdateAction action)
ports[port] |= 1 << channel;
}
}
+ */
+ MidiTrackList* mtl = song->midis();
+ for (iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
+ {
+ addStrip(*i, idx++);
+ }
setMaximumWidth(STRIP_WIDTH * stripList.size());
if (stripList.size() < 8)
@@ -224,6 +232,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
// generate Midi channel/port Strips
//---------------------------------------------------
+ // Changed by Tim. p3.3.21
+ /*
MidiTrackList* mtl = song->midis();
int ports[MIDI_PORTS];
memset(ports, 0, MIDI_PORTS * sizeof(int));
@@ -236,6 +246,12 @@ void AudioMixerApp::updateMixer(UpdateAction action)
ports[port] |= 1 << channel;
}
}
+ */
+ MidiTrackList* mtl = song->midis();
+ for (iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
+ {
+ addStrip(*i, idx++);
+ }
//---------------------------------------------------
// Groups
diff --git a/muse/muse/mixer/mstrip.cpp b/muse/muse/mixer/mstrip.cpp
index 28657f99..bf626f35 100644
--- a/muse/muse/mixer/mstrip.cpp
+++ b/muse/muse/mixer/mstrip.cpp
@@ -37,6 +37,7 @@
#include "icons.h"
#include "gconfig.h"
#include "ttoolbutton.h"
+//#include "utils.h"
enum { KNOB_PAN, KNOB_VAR_SEND, KNOB_REV_SEND, KNOB_CHO_SEND };
@@ -273,7 +274,11 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
record = new TransparentToolButton(this);
record->setBackgroundMode(PaletteMid);
record->setToggleButton(true);
- record->setFixedWidth(STRIP_WIDTH/2);
+
+ //record->setFixedWidth(STRIP_WIDTH/2);
+ //record->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
+ record->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
+
QIconSet iconSet;
iconSet.setPixmap(*record_on_Icon, QIconSet::Automatic, QIconSet::Normal, QIconSet::On);
iconSet.setPixmap(*record_off_Icon, QIconSet::Automatic, QIconSet::Normal, QIconSet::Off);
@@ -318,9 +323,29 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
smBox2->addWidget(mute);
smBox2->addWidget(solo);
- QToolTip::add(record, tr("record"));
- smBox1->addStretch(100);
+ // Changed by Tim. p3.3.21
+ //QToolTip::add(record, tr("record"));
+ //smBox1->addStretch(100);
+ //smBox1->addWidget(record);
+ QLabel* dev_ch_label = new QLabel(this);
+ dev_ch_label->setMinimumWidth(STRIP_WIDTH/2);
+ //dev_ch_label->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
+ dev_ch_label->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum));
+ dev_ch_label->setAlignment(AlignCenter);
+ int port = t->outPort();
+ int channel = t->outChannel();
+ QString dcs;
+ dcs.sprintf("%d-%d", port + 1, channel + 1);
+ dev_ch_label->setText(dcs);
+ //dev_ch_label->setBackgroundColor(QColor(0, 160, 255)); // Med blue
+ //dev_ch_label->setFont(config.fonts[6]);
+ dev_ch_label->setFont(config.fonts[1]);
+ // Dealing with a horizontally constrained label. Ignore vertical. Use a minimum readable point size.
+ //autoAdjustFontSize(dev_ch_label, dev_ch_label->text(), false, true, config.fonts[6].pointSize(), 5);
+ QToolTip::add(dev_ch_label, tr("output: device - channel"));
+ smBox1->addWidget(dev_ch_label);
smBox1->addWidget(record);
+
layout->addLayout(smBox1);
layout->addLayout(smBox2);
diff --git a/muse/muse/mixer/strip.cpp b/muse/muse/mixer/strip.cpp
index 366ecf82..e07f1d10 100644
--- a/muse/muse/mixer/strip.cpp
+++ b/muse/muse/mixer/strip.cpp
@@ -119,6 +119,8 @@ void Strip::setLabelText()
case Track::MIDI:
case Track::DRUM:
{
+ // Changed by Tim. p3.3.21
+ /*
MidiTrack* mt = (MidiTrack*)track;
int port = mt->outPort();
int channel = mt->outChannel();
@@ -126,7 +128,9 @@ void Strip::setLabelText()
s.sprintf("%d-%d", port + 1, channel + 1);
//label->setText(s);
//label->setBackgroundColor(gray);
+ */
label->setBackgroundColor(QColor(0, 160, 255)); // Med blue
+ s = track->name();
}
break;
}