summaryrefslogtreecommitdiff
path: root/muse2/muse/mixer
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-08 13:47:24 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-08 13:47:24 +0000
commita347445db32f51562aee5c6a786c312d1f612d2f (patch)
treeba3dc9a6e03eec2edf2c213b7f4d7e5e49903edc /muse2/muse/mixer
parent375d6a53630f364c6560eb40255a8cc4c0496b8c (diff)
parent5367067f7a36dce8a362dcc000d41ac581bffdfe (diff)
merged namespace changes. HOPEFULLY the last one.
Diffstat (limited to 'muse2/muse/mixer')
-rw-r--r--muse2/muse/mixer/amixer.cpp82
-rw-r--r--muse2/muse/mixer/amixer.h35
-rw-r--r--muse2/muse/mixer/astrip.cpp226
-rw-r--r--muse2/muse/mixer/astrip.h40
-rw-r--r--muse2/muse/mixer/auxknob.cpp10
-rw-r--r--muse2/muse/mixer/auxknob.h4
-rw-r--r--muse2/muse/mixer/mstrip.cpp260
-rw-r--r--muse2/muse/mixer/mstrip.h25
-rw-r--r--muse2/muse/mixer/panknob.cpp8
-rw-r--r--muse2/muse/mixer/panknob.h4
-rw-r--r--muse2/muse/mixer/rack.cpp88
-rw-r--r--muse2/muse/mixer/rack.h14
-rw-r--r--muse2/muse/mixer/routedialog.cpp62
-rw-r--r--muse2/muse/mixer/routedialog.h4
-rw-r--r--muse2/muse/mixer/strip.cpp66
-rw-r--r--muse2/muse/mixer/strip.h22
16 files changed, 474 insertions, 476 deletions
diff --git a/muse2/muse/mixer/amixer.cpp b/muse2/muse/mixer/amixer.cpp
index 082b9461..64ebda11 100644
--- a/muse2/muse/mixer/amixer.cpp
+++ b/muse2/muse/mixer/amixer.cpp
@@ -51,7 +51,7 @@
//typedef std::list<Strip*> StripList;
//static StripList stripList;
-namespace MusEMixer {
+namespace MusEGui {
/*
Nov 16, 2010: After making the strips variable width, we need a way to
@@ -158,7 +158,7 @@ bool ScrollArea::viewportEvent(QEvent* event)
// inputs | synthis | tracks | groups | master
//---------------------------------------------------------
-AudioMixerApp::AudioMixerApp(QWidget* parent, MusEConfig::MixerConfig* c)
+AudioMixerApp::AudioMixerApp(QWidget* parent, MixerConfig* c)
: QMainWindow(parent)
{
cfg = c;
@@ -169,8 +169,8 @@ AudioMixerApp::AudioMixerApp(QWidget* parent, MusEConfig::MixerConfig* c)
setWindowIcon(*museIcon);
QMenu* menuConfig = menuBar()->addMenu(tr("&Create"));
- MusEUtil::populateAddTrack(menuConfig);
- connect(menuConfig, SIGNAL(triggered(QAction *)), song, SLOT(addNewTrack(QAction *)));
+ MusEGui::populateAddTrack(menuConfig);
+ connect(menuConfig, SIGNAL(triggered(QAction *)), MusEGlobal::song, SLOT(addNewTrack(QAction *)));
QMenu* menuView = menuBar()->addMenu(tr("&View"));
routingId = menuView->addAction(tr("Routing"), this, SLOT(toggleRouteDialog()));
@@ -237,9 +237,9 @@ AudioMixerApp::AudioMixerApp(QWidget* parent, MusEConfig::MixerConfig* c)
connect(view, SIGNAL(layoutRequest()), SLOT(setSizing()));
///connect(this, SIGNAL(layoutRequest()), SLOT(setSizing()));
- connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
- song->update(); // calls update mixer
+ MusEGlobal::song->update(); // calls update mixer
}
/*
@@ -259,8 +259,8 @@ bool AudioMixerApp::event(QEvent* event)
//void AudioMixerApp::addNewTrack(QAction* action)
//{
- //song->addNewTrack(action, MusEGlobal::muse->arranger()->curTrack()); // Insert at current selected track.
-// song->addNewTrack(action); // Add at end.
+ //MusEGlobal::song->addNewTrack(action, MusEGlobal::muse->arranger()->curTrack()); // Insert at current selected track.
+// MusEGlobal::song->addNewTrack(action); // Add at end.
//}
void AudioMixerApp::setSizing()
@@ -292,7 +292,7 @@ void AudioMixerApp::setSizing()
// addStrip
//---------------------------------------------------------
-void AudioMixerApp::addStrip(Track* t, int idx)
+void AudioMixerApp::addStrip(MusECore::Track* t, int idx)
{
StripList::iterator si = stripList.begin();
for (int i = 0; i < idx; ++i) {
@@ -314,9 +314,9 @@ void AudioMixerApp::addStrip(Track* t, int idx)
else {
Strip* strip;
if (t->isMidiTrack())
- strip = new MidiStrip(central, (MidiTrack*)t);
+ strip = new MidiStrip(central, (MusECore::MidiTrack*)t);
else
- strip = new AudioStrip(central, (AudioTrack*)t);
+ strip = new AudioStrip(central, (MusECore::AudioTrack*)t);
layout->insertWidget(idx, strip);
stripList.insert(si, strip);
strip->show();
@@ -360,7 +360,7 @@ void AudioMixerApp::updateMixer(UpdateAction action)
showAuxTracksId->setChecked(cfg->showAuxTracks);
showSyntiTracksId->setChecked(cfg->showSyntiTracks);
- int auxsSize = song->auxs()->size();
+ int auxsSize = MusEGlobal::song->auxs()->size();
if ((action == UPDATE_ALL) || (auxsSize != oldAuxsSize)) {
clear();
oldAuxsSize = auxsSize;
@@ -369,9 +369,9 @@ void AudioMixerApp::updateMixer(UpdateAction action)
{
StripList::iterator si = stripList.begin();
for (; si != stripList.end();) {
- Track* track = (*si)->getTrack();
- TrackList* tl = song->tracks();
- iTrack it;
+ MusECore::Track* track = (*si)->getTrack();
+ MusECore::TrackList* tl = MusEGlobal::song->tracks();
+ MusECore::iTrack it;
for (it = tl->begin(); it != tl->end(); ++it) {
if (*it == track)
break;
@@ -404,7 +404,7 @@ void AudioMixerApp::updateMixer(UpdateAction action)
StripList::iterator si = stripList.begin();
for (; si != stripList.end(); ++i)
{
- Track* track = (*si)->getTrack();
+ MusECore::Track* track = (*si)->getTrack();
if(!track->isMidiTrack())
{
++si;
@@ -428,11 +428,11 @@ void AudioMixerApp::updateMixer(UpdateAction action)
// generate Midi channel/port Strips
//---------------------------------------------------
- MidiTrackList* mtl = song->midis();
- for (iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
+ MusECore::MidiTrackList* mtl = MusEGlobal::song->midis();
+ for (MusECore::iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
{
- MidiTrack* mt = *i;
- if((mt->type() == Track::MIDI && cfg->showMidiTracks) || (mt->type() == Track::DRUM && cfg->showDrumTracks) || (mt->type() == Track::NEW_DRUM && cfg->showNewDrumTracks))
+ MusECore::MidiTrack* mt = *i;
+ if((mt->type() == MusECore::Track::MIDI && cfg->showMidiTracks) || (mt->type() == MusECore::Track::DRUM && cfg->showDrumTracks) || (mt->type() == MusECore::Track::NEW_DRUM && cfg->showNewDrumTracks))
addStrip(*i, idx++);
}
@@ -454,8 +454,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
if(cfg->showInputTracks)
{
- InputList* itl = song->inputs();
- for (iAudioInput i = itl->begin(); i != itl->end(); ++i)
+ MusECore::InputList* itl = MusEGlobal::song->inputs();
+ for (MusECore::iAudioInput i = itl->begin(); i != itl->end(); ++i)
addStrip(*i, idx++);
}
@@ -465,8 +465,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
if(cfg->showSyntiTracks)
{
- SynthIList* sl = song->syntis();
- for (iSynthI i = sl->begin(); i != sl->end(); ++i)
+ MusECore::SynthIList* sl = MusEGlobal::song->syntis();
+ for (MusECore::iSynthI i = sl->begin(); i != sl->end(); ++i)
addStrip(*i, idx++);
}
@@ -476,8 +476,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
if(cfg->showWaveTracks)
{
- WaveTrackList* wtl = song->waves();
- for (iWaveTrack i = wtl->begin(); i != wtl->end(); ++i)
+ MusECore::WaveTrackList* wtl = MusEGlobal::song->waves();
+ for (MusECore::iWaveTrack i = wtl->begin(); i != wtl->end(); ++i)
addStrip(*i, idx++);
}
@@ -485,11 +485,11 @@ void AudioMixerApp::updateMixer(UpdateAction action)
// generate Midi channel/port Strips
//---------------------------------------------------
- MidiTrackList* mtl = song->midis();
- for (iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
+ MusECore::MidiTrackList* mtl = MusEGlobal::song->midis();
+ for (MusECore::iMidiTrack i = mtl->begin(); i != mtl->end(); ++i)
{
- MidiTrack* mt = *i;
- if((mt->type() == Track::MIDI && cfg->showMidiTracks) || (mt->type() == Track::DRUM && cfg->showDrumTracks) || (mt->type() == Track::NEW_DRUM && cfg->showNewDrumTracks))
+ MusECore::MidiTrack* mt = *i;
+ if((mt->type() == MusECore::Track::MIDI && cfg->showMidiTracks) || (mt->type() == MusECore::Track::DRUM && cfg->showDrumTracks) || (mt->type() == MusECore::Track::NEW_DRUM && cfg->showNewDrumTracks))
addStrip(*i, idx++);
}
@@ -499,8 +499,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
if(cfg->showGroupTracks)
{
- GroupList* gtl = song->groups();
- for (iAudioGroup i = gtl->begin(); i != gtl->end(); ++i)
+ MusECore::GroupList* gtl = MusEGlobal::song->groups();
+ for (MusECore::iAudioGroup i = gtl->begin(); i != gtl->end(); ++i)
addStrip(*i, idx++);
}
@@ -510,8 +510,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
if(cfg->showAuxTracks)
{
- AuxList* al = song->auxs();
- for (iAudioAux i = al->begin(); i != al->end(); ++i)
+ MusECore::AuxList* al = MusEGlobal::song->auxs();
+ for (MusECore::iAudioAux i = al->begin(); i != al->end(); ++i)
addStrip(*i, idx++);
}
@@ -521,8 +521,8 @@ void AudioMixerApp::updateMixer(UpdateAction action)
if(cfg->showOutputTracks)
{
- OutputList* otl = song->outputs();
- for (iAudioOutput i = otl->begin(); i != otl->end(); ++i)
+ MusECore::OutputList* otl = MusEGlobal::song->outputs();
+ for (MusECore::iAudioOutput i = otl->begin(); i != otl->end(); ++i)
addStrip(*i, idx++);
}
@@ -601,7 +601,7 @@ void AudioMixerApp::toggleRouteDialog()
void AudioMixerApp::showRouteDialog(bool on)
{
if (on && routingDialog == 0) {
- routingDialog = new MusEDialog::RouteDialog(this);
+ routingDialog = new MusEGui::RouteDialog(this);
connect(routingDialog, SIGNAL(closed()), SLOT(routingDialogClosed()));
}
if (routingDialog)
@@ -707,9 +707,9 @@ void AudioMixerApp::showSyntiTracksChanged(bool v)
// write
//---------------------------------------------------------
-//void AudioMixerApp::write(Xml& xml, const char* name)
-void AudioMixerApp::write(int level, Xml& xml)
-//void AudioMixerApp::write(int level, Xml& xml, const char* name)
+//void AudioMixerApp::write(MusECore::Xml& xml, const char* name)
+void AudioMixerApp::write(int level, MusECore::Xml& xml)
+//void AudioMixerApp::write(int level, MusECore::Xml& xml, const char* name)
{
//xml.stag(QString(name));
//xml.tag(level++, name.toLatin1());
@@ -735,4 +735,4 @@ void AudioMixerApp::write(int level, Xml& xml)
xml.etag(level, "Mixer");
}
-} // namespace MusEMixer
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/amixer.h b/muse2/muse/mixer/amixer.h
index 60a77f12..1f29c693 100644
--- a/muse2/muse/mixer/amixer.h
+++ b/muse2/muse/mixer/amixer.h
@@ -31,34 +31,29 @@
#include "node.h"
#include "routedialog.h"
+#define EFX_HEIGHT 16
+
class QHBoxLayout;
class QLabel;
class QMenu;
class QToolButton;
class QWidget;
+namespace MusECore {
class Xml;
class AudioTrack;
class Meter;
class Track;
-class Slider;
-class Knob;
-class DoubleLabel;
-class ComboBox;
-
-namespace MusEConfig {
-struct MixerConfig;
}
-namespace MusEDialog {
+namespace MusEGui {
+class ComboBox;
+class DoubleLabel;
+class Knob;
class RouteDialog;
-}
-
-#define EFX_HEIGHT 16
-
-namespace MusEMixer {
-
+class Slider;
class Strip;
+struct MixerConfig;
typedef std::list<Strip*> StripList;
//---------------------------------------------------------
@@ -87,7 +82,7 @@ class AudioMixerApp : public QMainWindow {
Q_OBJECT
//QString name;
- MusEConfig::MixerConfig* cfg;
+ MixerConfig* cfg;
StripList stripList;
QScrollArea* view;
QWidget* central;
@@ -95,7 +90,7 @@ class AudioMixerApp : public QMainWindow {
//Strip* master;
QHBoxLayout* layout;
QMenu* menuView;
- MusEDialog::RouteDialog* routingDialog;
+ MusEGui::RouteDialog* routingDialog;
QAction* routingId;
int oldAuxsSize;
@@ -112,7 +107,7 @@ class AudioMixerApp : public QMainWindow {
virtual void closeEvent(QCloseEvent*);
- void addStrip(Track*, int);
+ void addStrip(MusECore::Track*, int);
void showRouteDialog(bool);
enum UpdateAction {
@@ -148,14 +143,14 @@ class AudioMixerApp : public QMainWindow {
public:
//AudioMixerApp(QWidget* parent);
- AudioMixerApp(QWidget* parent, MusEConfig::MixerConfig* c);
+ AudioMixerApp(QWidget* parent, MixerConfig* c);
//void write(Xml&, const char* name);
//void write(int level, Xml& xml, const char* name);
- void write(int level, Xml& xml);
+ void write(int level, MusECore::Xml& xml);
void clear();
};
-} // namespace MusEMixer
+} // namespace MusEGui
#endif
diff --git a/muse2/muse/mixer/astrip.cpp b/muse2/muse/mixer/astrip.cpp
index bf31d820..10f281fb 100644
--- a/muse2/muse/mixer/astrip.cpp
+++ b/muse2/muse/mixer/astrip.cpp
@@ -68,7 +68,7 @@
//#include "popupmenu.h"
#include "routepopup.h"
-namespace MusEMixer {
+namespace MusEGui {
/*
//---------------------------------------------------------
@@ -133,9 +133,9 @@ void AudioStrip::songChanged(int val)
if (val == SC_MIDI_CONTROLLER)
return;
- AudioTrack* src = (AudioTrack*)track;
+ MusECore::AudioTrack* src = (MusECore::AudioTrack*)track;
- // Do channels before MusEConfig::config...
+ // Do channels before MusEGlobal::config...
if (val & SC_CHANNELS)
updateChannels();
@@ -145,12 +145,12 @@ void AudioStrip::songChanged(int val)
// Added by Tim. p3.3.9
// Set the strip label's font.
- //label->setFont(MusEConfig::config.fonts[1]);
+ //label->setFont(MusEGlobal::config.fonts[1]);
setLabelFont();
// Adjust minimum volume slider and label values.
- slider->setRange(MusEConfig::config.minSlider-0.1, 10.0);
- sl->setRange(MusEConfig::config.minSlider, 10.0);
+ slider->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
+ sl->setRange(MusEGlobal::config.minSlider, 10.0);
// Adjust minimum aux knob and label values.
int n = auxKnob.size();
@@ -158,15 +158,15 @@ void AudioStrip::songChanged(int val)
{
auxKnob[idx]->blockSignals(true);
auxLabel[idx]->blockSignals(true);
- auxKnob[idx]->setRange(MusEConfig::config.minSlider-0.1, 10.0);
- auxLabel[idx]->setRange(MusEConfig::config.minSlider, 10.1);
+ auxKnob[idx]->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
+ auxLabel[idx]->setRange(MusEGlobal::config.minSlider, 10.1);
auxKnob[idx]->blockSignals(false);
auxLabel[idx]->blockSignals(false);
}
// Adjust minimum meter values.
for(int c = 0; c < channel; ++c)
- meter[c]->setRange(MusEConfig::config.minMeter, 10.0);
+ meter[c]->setRange(MusEGlobal::config.minMeter, 10.0);
}
if (mute && (val & SC_MUTE)) { // mute && off
@@ -207,7 +207,7 @@ void AudioStrip::songChanged(int val)
if (val & SC_AUX) {
int n = auxKnob.size();
for (int idx = 0; idx < n; ++idx) {
- double val = fast_log10(src->auxSend(idx)) * 20.0;
+ double val = MusECore::fast_log10(src->auxSend(idx)) * 20.0;
auxKnob[idx]->blockSignals(true);
auxLabel[idx]->blockSignals(true);
auxKnob[idx]->setValue(val);
@@ -271,14 +271,14 @@ void AudioStrip::songChanged(int val)
void AudioStrip::updateVolume()
{
- double vol = ((AudioTrack*)track)->volume();
+ double vol = ((MusECore::AudioTrack*)track)->volume();
if (vol != volume)
{
//printf("AudioStrip::updateVolume setting slider and label\n");
slider->blockSignals(true);
sl->blockSignals(true);
- double val = fast_log10(vol) * 20.0;
+ double val = MusECore::fast_log10(vol) * 20.0;
slider->setValue(val);
sl->setValue(val);
sl->blockSignals(false);
@@ -293,7 +293,7 @@ void AudioStrip::updateVolume()
void AudioStrip::updatePan()
{
- double v = ((AudioTrack*)track)->pan();
+ double v = ((MusECore::AudioTrack*)track)->pan();
if (v != panVal)
{
//printf("AudioStrip::updatePan setting slider and label\n");
@@ -315,7 +315,7 @@ void AudioStrip::updatePan()
void AudioStrip::offToggled(bool val)
{
track->setOff(val);
- song->update(SC_MUTE);
+ MusEGlobal::song->update(SC_MUTE);
}
//---------------------------------------------------------
@@ -329,7 +329,7 @@ void AudioStrip::updateOffState()
sl->setEnabled(val);
pan->setEnabled(val);
panl->setEnabled(val);
- if (track->type() != Track::AUDIO_SOFTSYNTH)
+ if (track->type() != MusECore::Track::AUDIO_SOFTSYNTH)
stereo->setEnabled(val);
label->setEnabled(val);
@@ -369,9 +369,9 @@ void AudioStrip::updateOffState()
void AudioStrip::preToggled(bool val)
{
- audio->msgSetPrefader((AudioTrack*)track, val);
+ MusEGlobal::audio->msgSetPrefader((MusECore::AudioTrack*)track, val);
resetPeaks();
- song->update(SC_ROUTE);
+ MusEGlobal::song->update(SC_ROUTE);
}
//---------------------------------------------------------
@@ -385,8 +385,8 @@ void AudioStrip::stereoToggled(bool val)
// stereo->setIcon(nc == 2 ? *stereoIcon : *monoIcon);
if (oc == nc)
return;
- audio->msgSetChannels((AudioTrack*)track, nc);
- song->update(SC_CHANNELS);
+ MusEGlobal::audio->msgSetChannels((MusECore::AudioTrack*)track, nc);
+ MusEGlobal::song->update(SC_CHANNELS);
}
//---------------------------------------------------------
@@ -396,14 +396,14 @@ void AudioStrip::stereoToggled(bool val)
void AudioStrip::auxChanged(double val, int idx)
{
double vol;
- if (val <= MusEConfig::config.minSlider) {
+ if (val <= MusEGlobal::config.minSlider) {
vol = 0.0;
val -= 1.0; // display special value "off"
}
else
vol = pow(10.0, val/20.0);
- audio->msgSetAux((AudioTrack*)track, idx, vol);
- song->update(SC_AUX);
+ MusEGlobal::audio->msgSetAux((MusECore::AudioTrack*)track, idx, vol);
+ MusEGlobal::song->update(SC_AUX);
}
//---------------------------------------------------------
@@ -423,27 +423,27 @@ void AudioStrip::auxLabelChanged(double val, unsigned int idx)
void AudioStrip::volumeChanged(double val)
{
- AutomationType at = ((AudioTrack*)track)->automationType();
- if(at == AUTO_WRITE || (audio->isPlaying() && at == AUTO_TOUCH))
+ AutomationType at = ((MusECore::AudioTrack*)track)->automationType();
+ if(at == AUTO_WRITE || (MusEGlobal::audio->isPlaying() && at == AUTO_TOUCH))
track->enableVolumeController(false);
double vol;
- if (val <= MusEConfig::config.minSlider) {
+ if (val <= MusEGlobal::config.minSlider) {
vol = 0.0;
val -= 1.0; // display special value "off"
}
else
vol = pow(10.0, val/20.0);
volume = vol;
- //audio->msgSetVolume((AudioTrack*)track, vol);
- // p4.0.21 audio->msgXXX waits. Do we really need to?
- ((AudioTrack*)track)->setVolume(vol);
- song->controllerChange(track);
+ //MusEGlobal::audio->msgSetVolume((MusECore::AudioTrack*)track, vol);
+ // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to?
+ ((MusECore::AudioTrack*)track)->setVolume(vol);
+ MusEGlobal::song->controllerChange(track);
- ((AudioTrack*)track)->recordAutomation(AC_VOLUME, vol);
+ ((MusECore::AudioTrack*)track)->recordAutomation(MusECore::AC_VOLUME, vol);
- //song->update(SC_TRACK_MODIFIED); // for graphical automation update
- //song->controllerChange(track);
+ //MusEGlobal::song->update(SC_TRACK_MODIFIED); // for graphical automation update
+ //MusEGlobal::song->controllerChange(track);
}
//---------------------------------------------------------
@@ -452,25 +452,25 @@ void AudioStrip::volumeChanged(double val)
void AudioStrip::volumePressed()
{
- AutomationType at = ((AudioTrack*)track)->automationType();
+ AutomationType at = ((MusECore::AudioTrack*)track)->automationType();
if(at == AUTO_WRITE || (at == AUTO_READ || at == AUTO_TOUCH))
track->enableVolumeController(false);
double val = slider->value();
double vol;
- if (val <= MusEConfig::config.minSlider) {
+ if (val <= MusEGlobal::config.minSlider) {
vol = 0.0;
//val -= 1.0; // display special value "off"
}
else
vol = pow(10.0, val/20.0);
volume = vol;
- //audio->msgSetVolume((AudioTrack*)track, volume);
- // p4.0.21 audio->msgXXX waits. Do we really need to?
- ((AudioTrack*)track)->setVolume(volume);
- song->controllerChange(track);
+ //MusEGlobal::audio->msgSetVolume((MusECore::AudioTrack*)track, volume);
+ // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to?
+ ((MusECore::AudioTrack*)track)->setVolume(volume);
+ MusEGlobal::song->controllerChange(track);
- ((AudioTrack*)track)->startAutoRecord(AC_VOLUME, volume);
+ ((MusECore::AudioTrack*)track)->startAutoRecord(MusECore::AC_VOLUME, volume);
}
//---------------------------------------------------------
@@ -482,7 +482,7 @@ void AudioStrip::volumeReleased()
if(track->automationType() != AUTO_WRITE)
track->enableVolumeController(true);
- ((AudioTrack*)track)->stopAutoRecord(AC_VOLUME, volume);
+ ((MusECore::AudioTrack*)track)->stopAutoRecord(MusECore::AC_VOLUME, volume);
}
//---------------------------------------------------------
@@ -490,7 +490,7 @@ void AudioStrip::volumeReleased()
//---------------------------------------------------------
void AudioStrip::volumeRightClicked(const QPoint &p)
{
- song->execAutomationCtlPopup((AudioTrack*)track, p, AC_VOLUME);
+ MusEGlobal::song->execAutomationCtlPopup((MusECore::AudioTrack*)track, p, MusECore::AC_VOLUME);
}
//---------------------------------------------------------
@@ -499,12 +499,12 @@ void AudioStrip::volumeRightClicked(const QPoint &p)
void AudioStrip::volLabelChanged(double val)
{
- AutomationType at = ((AudioTrack*)track)->automationType();
- if(at == AUTO_WRITE || (audio->isPlaying() && at == AUTO_TOUCH))
+ AutomationType at = ((MusECore::AudioTrack*)track)->automationType();
+ if(at == AUTO_WRITE || (MusEGlobal::audio->isPlaying() && at == AUTO_TOUCH))
track->enableVolumeController(false);
double vol;
- if (val <= MusEConfig::config.minSlider) {
+ if (val <= MusEGlobal::config.minSlider) {
vol = 0.0;
val -= 1.0; // display special value "off"
}
@@ -512,12 +512,12 @@ void AudioStrip::volLabelChanged(double val)
vol = pow(10.0, val/20.0);
volume = vol;
slider->setValue(val);
- //audio->msgSetVolume((AudioTrack*)track, vol);
+ //audio->msgSetVolume((MusECore::AudioTrack*)track, vol);
// p4.0.21 audio->msgXXX waits. Do we really need to?
- ((AudioTrack*)track)->setVolume(vol);
- song->controllerChange(track);
+ ((MusECore::AudioTrack*)track)->setVolume(vol);
+ MusEGlobal::song->controllerChange(track);
- ((AudioTrack*)track)->startAutoRecord(AC_VOLUME, vol);
+ ((MusECore::AudioTrack*)track)->startAutoRecord(MusECore::AC_VOLUME, vol);
}
//---------------------------------------------------------
@@ -526,17 +526,17 @@ void AudioStrip::volLabelChanged(double val)
void AudioStrip::panChanged(double val)
{
- AutomationType at = ((AudioTrack*)track)->automationType();
- if(at == AUTO_WRITE || (audio->isPlaying() && at == AUTO_TOUCH))
+ AutomationType at = ((MusECore::AudioTrack*)track)->automationType();
+ if(at == AUTO_WRITE || (MusEGlobal::audio->isPlaying() && at == AUTO_TOUCH))
track->enablePanController(false);
panVal = val;
- //audio->msgSetPan(((AudioTrack*)track), val);
- // p4.0.21 audio->msgXXX waits. Do we really need to?
- ((AudioTrack*)track)->setPan(val);
- song->controllerChange(track);
+ //MusEGlobal::audio->msgSetPan(((MusECore::AudioTrack*)track), val);
+ // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to?
+ ((MusECore::AudioTrack*)track)->setPan(val);
+ MusEGlobal::song->controllerChange(track);
- ((AudioTrack*)track)->recordAutomation(AC_PAN, val);
+ ((MusECore::AudioTrack*)track)->recordAutomation(MusECore::AC_PAN, val);
}
//---------------------------------------------------------
@@ -545,17 +545,17 @@ void AudioStrip::panChanged(double val)
void AudioStrip::panPressed()
{
- AutomationType at = ((AudioTrack*)track)->automationType();
+ AutomationType at = ((MusECore::AudioTrack*)track)->automationType();
if(at == AUTO_WRITE || (at == AUTO_READ || at == AUTO_TOUCH))
track->enablePanController(false);
panVal = pan->value();
- //audio->msgSetPan(((AudioTrack*)track), panVal);
- // p4.0.21 audio->msgXXX waits. Do we really need to?
- ((AudioTrack*)track)->setPan(panVal);
- song->controllerChange(track);
+ //MusEGlobal::audio->msgSetPan(((MusECore::AudioTrack*)track), panVal);
+ // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to?
+ ((MusECore::AudioTrack*)track)->setPan(panVal);
+ MusEGlobal::song->controllerChange(track);
- ((AudioTrack*)track)->startAutoRecord(AC_PAN, panVal);
+ ((MusECore::AudioTrack*)track)->startAutoRecord(MusECore::AC_PAN, panVal);
}
//---------------------------------------------------------
@@ -566,7 +566,7 @@ void AudioStrip::panReleased()
{
if(track->automationType() != AUTO_WRITE)
track->enablePanController(true);
- ((AudioTrack*)track)->stopAutoRecord(AC_PAN, panVal);
+ ((MusECore::AudioTrack*)track)->stopAutoRecord(MusECore::AC_PAN, panVal);
}
//---------------------------------------------------------
@@ -574,7 +574,7 @@ void AudioStrip::panReleased()
//---------------------------------------------------------
void AudioStrip::panRightClicked(const QPoint &p)
{
- song->execAutomationCtlPopup((AudioTrack*)track, p, AC_PAN);
+ MusEGlobal::song->execAutomationCtlPopup((MusECore::AudioTrack*)track, p, MusECore::AC_PAN);
}
//---------------------------------------------------------
@@ -583,18 +583,18 @@ void AudioStrip::panRightClicked(const QPoint &p)
void AudioStrip::panLabelChanged(double val)
{
- AutomationType at = ((AudioTrack*)track)->automationType();
- if(at == AUTO_WRITE || (audio->isPlaying() && at == AUTO_TOUCH))
+ AutomationType at = ((MusECore::AudioTrack*)track)->automationType();
+ if(at == AUTO_WRITE || (MusEGlobal::audio->isPlaying() && at == AUTO_TOUCH))
track->enablePanController(false);
panVal = val;
pan->setValue(val);
- //audio->msgSetPan((AudioTrack*)track, val);
- // p4.0.21 audio->msgXXX waits. Do we really need to?
- ((AudioTrack*)track)->setPan(val);
- song->controllerChange(track);
+ //MusEGlobal::audio->msgSetPan((MusECore::AudioTrack*)track, val);
+ // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to?
+ ((MusECore::AudioTrack*)track)->setPan(val);
+ MusEGlobal::song->controllerChange(track);
- ((AudioTrack*)track)->startAutoRecord(AC_PAN, val);
+ ((MusECore::AudioTrack*)track)->startAutoRecord(MusECore::AC_PAN, val);
}
//---------------------------------------------------------
@@ -603,15 +603,15 @@ void AudioStrip::panLabelChanged(double val)
void AudioStrip::updateChannels()
{
- AudioTrack* t = (AudioTrack*)track;
+ MusECore::AudioTrack* t = (MusECore::AudioTrack*)track;
int c = t->channels();
//printf("AudioStrip::updateChannels track channels:%d current channels:%d\n", c, channel);
if (c > channel) {
for (int cc = channel; cc < c; ++cc) {
- meter[cc] = new MusEWidget::Meter(this);
- //meter[cc]->setRange(MusEConfig::config.minSlider, 10.0);
- meter[cc]->setRange(MusEConfig::config.minMeter, 10.0);
+ meter[cc] = new MusEGui::Meter(this);
+ //meter[cc]->setRange(MusEGlobal::config.minSlider, 10.0);
+ meter[cc]->setRange(MusEGlobal::config.minMeter, 10.0);
meter[cc]->setFixedWidth(15);
connect(meter[cc], SIGNAL(mousePress()), this, SLOT(resetPeaks()));
sliderGrid->addWidget(meter[cc], 0, cc+1, Qt::AlignLeft);
@@ -639,14 +639,14 @@ void AudioStrip::updateChannels()
// 1 - aux send
//---------------------------------------------------------
-MusEWidget::Knob* AudioStrip::addKnob(int type, int id, MusEWidget::DoubleLabel** dlabel)
+MusEGui::Knob* AudioStrip::addKnob(int type, int id, MusEGui::DoubleLabel** dlabel)
{
- MusEWidget::Knob* knob = new MusEWidget::Knob(this);
+ MusEGui::Knob* knob = new MusEGui::Knob(this);
knob->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
if (type == 0)
knob->setRange(-1.0, +1.0);
else
- knob->setRange(MusEConfig::config.minSlider-0.1, 10.0);
+ knob->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
knob->setBackgroundRole(QPalette::Mid);
if (type == 0)
@@ -654,16 +654,16 @@ MusEWidget::Knob* AudioStrip::addKnob(int type, int id, MusEWidget::DoubleLabel*
else
knob->setToolTip(tr("aux send level"));
- MusEWidget::DoubleLabel* pl;
+ MusEGui::DoubleLabel* pl;
if (type == 0)
- pl = new MusEWidget::DoubleLabel(0, -1.0, +1.0, this);
+ pl = new MusEGui::DoubleLabel(0, -1.0, +1.0, this);
else
- pl = new MusEWidget::DoubleLabel(0.0, MusEConfig::config.minSlider, 10.1, this);
+ pl = new MusEGui::DoubleLabel(0.0, MusEGlobal::config.minSlider, 10.1, this);
if (dlabel)
*dlabel = pl;
pl->setSlider(knob);
- pl->setFont(MusEConfig::config.fonts[1]);
+ pl->setFont(MusEGlobal::config.fonts[1]);
pl->setBackgroundRole(QPalette::Mid);
pl->setFrame(true);
if (type == 0)
@@ -680,7 +680,7 @@ MusEWidget::Knob* AudioStrip::addKnob(int type, int id, MusEWidget::DoubleLabel*
label.sprintf("Aux%d", id+1);
QLabel* plb = new QLabel(label, this);
- plb->setFont(MusEConfig::config.fonts[1]);
+ plb->setFont(MusEGlobal::config.fonts[1]);
plb->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
plb->setAlignment(Qt::AlignCenter);
@@ -728,7 +728,7 @@ AudioStrip::~AudioStrip()
// create mixer strip
//---------------------------------------------------------
-AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
+AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
: Strip(parent, at)
{
volume = -1.0;
@@ -737,13 +737,13 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
record = 0;
off = 0;
- AudioTrack* t = (AudioTrack*)track;
+ MusECore::AudioTrack* t = (MusECore::AudioTrack*)track;
channel = at->channels();
///setMinimumWidth(STRIP_WIDTH);
int ch = 0;
for (; ch < channel; ++ch)
- meter[ch] = new MusEWidget::Meter(this);
+ meter[ch] = new MusEGui::Meter(this);
for (; ch < MAX_CHANNELS; ++ch)
meter[ch] = 0;
@@ -760,7 +760,7 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
//---------------------------------------------------
stereo = new QToolButton();
- stereo->setFont(MusEConfig::config.fonts[1]);
+ stereo->setFont(MusEGlobal::config.fonts[1]);
stereo->setCheckable(true);
stereo->setToolTip(tr("1/2 channel"));
stereo->setChecked(channel == 2);
@@ -770,11 +770,11 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
connect(stereo, SIGNAL(clicked(bool)), SLOT(stereoToggled(bool)));
// disable mono/stereo for Synthesizer-Plugins
- if (t->type() == Track::AUDIO_SOFTSYNTH)
+ if (t->type() == MusECore::Track::AUDIO_SOFTSYNTH)
stereo->setEnabled(false);
pre = new QToolButton();
- pre->setFont(MusEConfig::config.fonts[1]);
+ pre->setFont(MusEGlobal::config.fonts[1]);
pre->setCheckable(true);
pre->setText(tr("Pre"));
pre->setToolTip(tr("pre fader - post fader"));
@@ -789,14 +789,14 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
// aux send
//---------------------------------------------------
- int auxsSize = song->auxs()->size();
+ int auxsSize = MusEGlobal::song->auxs()->size();
if (t->hasAuxSend()) {
for (int idx = 0; idx < auxsSize; ++idx) {
- MusEWidget::DoubleLabel* al;
- MusEWidget::Knob* ak = addKnob(1, idx, &al);
+ MusEGui::DoubleLabel* al;
+ MusEGui::Knob* ak = addKnob(1, idx, &al);
auxKnob.push_back(ak);
auxLabel.push_back(al);
- double val = fast_log10(t->auxSend(idx))*20.0;
+ double val = MusECore::fast_log10(t->auxSend(idx))*20.0;
ak->setValue(val);
al->setValue(val);
}
@@ -816,19 +816,19 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
sliderGrid->setContentsMargins(0, 0, 0, 0);
sliderGrid->setSpacing(0);
- slider = new MusEWidget::Slider(this, "vol", Qt::Vertical, MusEWidget::Slider::None);
+ slider = new MusEGui::Slider(this, "vol", Qt::Vertical, MusEGui::Slider::None);
slider->setCursorHoming(true);
- slider->setRange(MusEConfig::config.minSlider-0.1, 10.0);
+ slider->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
slider->setFixedWidth(20);
- slider->setFont(MusEConfig::config.fonts[1]);
- slider->setValue(fast_log10(t->volume())*20.0);
+ slider->setFont(MusEGlobal::config.fonts[1]);
+ slider->setValue(MusECore::fast_log10(t->volume())*20.0);
sliderGrid->addWidget(slider, 0, 0, Qt::AlignHCenter);
for (int i = 0; i < channel; ++i) {
- //meter[i]->setRange(MusEConfig::config.minSlider, 10.0);
- meter[i]->setRange(MusEConfig::config.minMeter, 10.0);
+ //meter[i]->setRange(MusEGlobal::config.minSlider, 10.0);
+ meter[i]->setRange(MusEGlobal::config.minMeter, 10.0);
meter[i]->setFixedWidth(15);
connect(meter[i], SIGNAL(mousePress()), this, SLOT(resetPeaks()));
sliderGrid->addWidget(meter[i], 0, i+1, Qt::AlignHCenter);
@@ -837,15 +837,15 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
sliderGrid->addItem(new QSpacerItem(2,0),0,3);
grid->addLayout(sliderGrid, _curGridRow++, 0, 1, 2);
- sl = new MusEWidget::DoubleLabel(0.0, MusEConfig::config.minSlider, 10.0, this);
+ sl = new MusEGui::DoubleLabel(0.0, MusEGlobal::config.minSlider, 10.0, this);
sl->setSlider(slider);
- sl->setFont(MusEConfig::config.fonts[1]);
+ sl->setFont(MusEGlobal::config.fonts[1]);
sl->setBackgroundRole(QPalette::Mid);
sl->setSuffix(tr("dB"));
sl->setFrame(true);
sl->setPrecision(0);
sl->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum));
- sl->setValue(fast_log10(t->volume()) * 20.0);
+ sl->setValue(MusECore::fast_log10(t->volume()) * 20.0);
connect(sl, SIGNAL(valueChanged(double,int)), SLOT(volLabelChanged(double)));
//connect(sl, SIGNAL(valueChanged(double,int)), SLOT(volumeChanged(double)));
@@ -868,7 +868,7 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
//---------------------------------------------------
if (track->canRecord()) {
- record = new MusEWidget::TransparentToolButton(this);
+ record = new MusEGui::TransparentToolButton(this);
record->setCheckable(true);
record->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
record->setBackgroundRole(QPalette::Mid);
@@ -879,7 +879,7 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
connect(record, SIGNAL(clicked(bool)), SLOT(recordToggled(bool)));
}
- Track::TrackType type = t->type();
+ MusECore::Track::TrackType type = t->type();
mute = new QToolButton();
mute->setCheckable(true);
@@ -901,7 +901,7 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
solo->setIconSize(soloIconOn->size());
solo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
connect(solo, SIGNAL(clicked(bool)), SLOT(soloToggled(bool)));
- if (type == Track::AUDIO_OUTPUT) {
+ if (type == MusECore::Track::AUDIO_OUTPUT) {
record->setToolTip(tr("record downmix"));
//solo->setToolTip(tr("solo mode (monitor)"));
solo->setToolTip(tr("solo mode"));
@@ -911,7 +911,7 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
solo->setToolTip(tr("solo mode"));
}
- off = new MusEWidget::TransparentToolButton(this);
+ off = new MusEGui::TransparentToolButton(this);
off->setBackgroundRole(QPalette::Mid);
off->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
off->setCheckable(true);
@@ -932,9 +932,9 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
// routing
//---------------------------------------------------
- if (type != Track::AUDIO_AUX) {
+ if (type != MusECore::Track::AUDIO_AUX) {
iR = new QToolButton();
- iR->setFont(MusEConfig::config.fonts[1]);
+ iR->setFont(MusEGlobal::config.fonts[1]);
iR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
iR->setText(tr("iR"));
iR->setCheckable(false);
@@ -944,7 +944,7 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
}
oR = new QToolButton();
- oR->setFont(MusEConfig::config.fonts[1]);
+ oR->setFont(MusEGlobal::config.fonts[1]);
oR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
oR->setText(tr("oR"));
oR->setCheckable(false);
@@ -956,8 +956,8 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
// automation type
//---------------------------------------------------
- autoType = new MusEWidget::ComboBox();
- autoType->setFont(MusEConfig::config.fonts[1]);
+ autoType = new MusEGui::ComboBox();
+ autoType->setFont(MusEGlobal::config.fonts[1]);
autoType->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
//autoType->setAutoFillBackground(true);
@@ -1025,7 +1025,7 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at)
void AudioStrip::iRoutePressed()
{
- MusEWidget::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
+ MusEGui::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
iR->setDown(false);
pup->exec(QCursor::pos(), track, false);
}
@@ -1036,9 +1036,9 @@ void AudioStrip::iRoutePressed()
void AudioStrip::oRoutePressed()
{
- MusEWidget::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
+ MusEGui::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
oR->setDown(false);
pup->exec(QCursor::pos(), track, true);
}
-} // namespace MusEMixer
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/astrip.h b/muse2/muse/mixer/astrip.h
index 3e2b6c1d..1ee40d97 100644
--- a/muse2/muse/mixer/astrip.h
+++ b/muse2/muse/mixer/astrip.h
@@ -30,24 +30,26 @@
#include "strip.h"
//#include "route.h"
-namespace MusEWidget {
-class DoubleLabel;
-class Slider;
-class Knob;
-class TransparentToolButton;
-}
-
//class QDialog;
class QToolButton;
//class QAction;
//class QPopupMenu;
//class PopupMenu;
class QButton;
-class AudioTrack;
-namespace MusEMixer {
+namespace MusEGui {
+}
+namespace MusECore {
+class AudioTrack;
+}
+
+namespace MusEGui {
+class DoubleLabel;
class EffectRack;
+class Knob;
+class Slider;
+class TransparentToolButton;
//---------------------------------------------------------
// AudioStrip
@@ -57,19 +59,19 @@ class AudioStrip : public Strip {
Q_OBJECT
int channel;
- MusEWidget::Slider* slider;
- MusEWidget::DoubleLabel* sl;
+ MusEGui::Slider* slider;
+ MusEGui::DoubleLabel* sl;
EffectRack* rack;
- MusEWidget::Knob* pan;
- MusEWidget::DoubleLabel* panl;
+ MusEGui::Knob* pan;
+ MusEGui::DoubleLabel* panl;
- std::vector<MusEWidget::Knob*> auxKnob;
- std::vector<MusEWidget::DoubleLabel*> auxLabel;
+ std::vector<MusEGui::Knob*> auxKnob;
+ std::vector<MusEGui::DoubleLabel*> auxLabel;
QToolButton* stereo;
QToolButton* pre;
- MusEWidget::TransparentToolButton* off;
+ MusEGui::TransparentToolButton* off;
double volume;
double panVal;
@@ -77,7 +79,7 @@ class AudioStrip : public Strip {
//QToolButton* iR;
//QToolButton* oR;
- MusEWidget::Knob* addKnob(int, int, MusEWidget::DoubleLabel**);
+ MusEGui::Knob* addKnob(int, int, MusEGui::DoubleLabel**);
void updateOffState();
void updateVolume();
@@ -111,13 +113,13 @@ class AudioStrip : public Strip {
virtual void songChanged(int);
public:
- AudioStrip(QWidget* parent, AudioTrack*);
+ AudioStrip(QWidget* parent, MusECore::AudioTrack*);
~AudioStrip();
///virtual QSize minimumSizeHint () const;
//virtual QSize sizeHint () const;
};
-} // namespace MusEMixer
+} // namespace MusEGui
#endif
diff --git a/muse2/muse/mixer/auxknob.cpp b/muse2/muse/mixer/auxknob.cpp
index a9b9c4e2..5e00f9b8 100644
--- a/muse2/muse/mixer/auxknob.cpp
+++ b/muse2/muse/mixer/auxknob.cpp
@@ -25,17 +25,17 @@
#include "auxknob.h"
#include "gconfig.h"
-namespace MusEWidget {
+namespace MusEGui {
//---------------------------------------------------------
// Aux
//---------------------------------------------------------
AuxKnob::AuxKnob(QWidget* parent, int i)
- : MusEWidget::Knob(parent, "aux")
+ : MusEGui::Knob(parent, "aux")
{
idx = i;
- setRange(MusEConfig::config.minSlider-0.1, 10.0);
+ setRange(MusEGlobal::config.minSlider-0.1, 10.0);
connect(this, SIGNAL(valueChanged(double,int)), SLOT(valueChanged(double)));
}
@@ -46,7 +46,7 @@ AuxKnob::AuxKnob(QWidget* parent, int i)
void AuxKnob::valueChanged(double val)
{
double vol;
- if (val <= MusEConfig::config.minSlider) {
+ if (val <= MusEGlobal::config.minSlider) {
vol = 0.0;
val -= 1.0; // display special value "off"
}
@@ -55,4 +55,4 @@ void AuxKnob::valueChanged(double val)
emit auxChanged(idx, vol);
}
-} // namespace MusEWidget
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/auxknob.h b/muse2/muse/mixer/auxknob.h
index c8693698..6d22508c 100644
--- a/muse2/muse/mixer/auxknob.h
+++ b/muse2/muse/mixer/auxknob.h
@@ -26,7 +26,7 @@
#include "knob.h"
-namespace MusEWidget {
+namespace MusEGui {
//---------------------------------------------------------
// AuxKnob
@@ -46,7 +46,7 @@ class AuxKnob : public Knob {
AuxKnob(QWidget* parent, int idx);
};
-} // namespace MusEWidget
+} // namespace MusEGui
#endif
diff --git a/muse2/muse/mixer/mstrip.cpp b/muse2/muse/mixer/mstrip.cpp
index c920d6c6..2e51feb9 100644
--- a/muse2/muse/mixer/mstrip.cpp
+++ b/muse2/muse/mixer/mstrip.cpp
@@ -62,7 +62,7 @@
//#include "popupmenu.h"
#include "routepopup.h"
-namespace MusEMixer {
+namespace MusEGui {
enum { KNOB_PAN, KNOB_VAR_SEND, KNOB_REV_SEND, KNOB_CHO_SEND };
@@ -73,29 +73,29 @@ enum { KNOB_PAN, KNOB_VAR_SEND, KNOB_REV_SEND, KNOB_CHO_SEND };
void MidiStrip::addKnob(int idx, const QString& tt, const QString& label,
const char* slot, bool enabled)
{
- int ctl = CTRL_PANPOT, mn, mx, v;
- int chan = ((MidiTrack*)track)->outChannel();
+ int ctl = MusECore::CTRL_PANPOT, mn, mx, v;
+ int chan = ((MusECore::MidiTrack*)track)->outChannel();
switch(idx)
{
//case KNOB_PAN:
- // ctl = CTRL_PANPOT;
+ // ctl = MusECore::CTRL_PANPOT;
//break;
case KNOB_VAR_SEND:
- ctl = CTRL_VARIATION_SEND;
+ ctl = MusECore::CTRL_VARIATION_SEND;
break;
case KNOB_REV_SEND:
- ctl = CTRL_REVERB_SEND;
+ ctl = MusECore::CTRL_REVERB_SEND;
break;
case KNOB_CHO_SEND:
- ctl = CTRL_CHORUS_SEND;
+ ctl = MusECore::CTRL_CHORUS_SEND;
break;
}
- MidiPort* mp = &midiPorts[((MidiTrack*)track)->outPort()];
- MidiController* mc = mp->midiController(ctl);
+ MusECore::MidiPort* mp = &MusEGlobal::midiPorts[((MusECore::MidiTrack*)track)->outPort()];
+ MusECore::MidiController* mc = mp->midiController(ctl);
mn = mc->minVal();
mx = mc->maxVal();
- MusEWidget::Knob* knob = new MusEWidget::Knob(this);
+ MusEGui::Knob* knob = new MusEGui::Knob(this);
knob->setRange(double(mn), double(mx), 1.0);
knob->setId(ctl);
@@ -105,12 +105,12 @@ void MidiStrip::addKnob(int idx, const QString& tt, const QString& label,
knob->setToolTip(tt);
knob->setEnabled(enabled);
- MusEWidget::DoubleLabel* dl = new MusEWidget::DoubleLabel(0.0, double(mn), double(mx), this);
+ MusEGui::DoubleLabel* dl = new MusEGui::DoubleLabel(0.0, double(mn), double(mx), this);
dl->setId(idx);
dl->setSpecialText(tr("off"));
dl->setToolTip(tr("double click on/off"));
controller[idx].dl = dl;
- dl->setFont(MusEConfig::config.fonts[1]);
+ dl->setFont(MusEGlobal::config.fonts[1]);
dl->setBackgroundRole(QPalette::Mid);
dl->setFrame(true);
dl->setPrecision(0);
@@ -119,16 +119,16 @@ void MidiStrip::addKnob(int idx, const QString& tt, const QString& label,
double dlv;
v = mp->hwCtrlState(chan, ctl);
- if(v == CTRL_VAL_UNKNOWN)
+ if(v == MusECore::CTRL_VAL_UNKNOWN)
{
//v = mc->initVal();
- //if(v == CTRL_VAL_UNKNOWN)
+ //if(v == MusECore::CTRL_VAL_UNKNOWN)
// v = 0;
// v = mn - 1;
int lastv = mp->lastValidHWCtrlState(chan, ctl);
- if(lastv == CTRL_VAL_UNKNOWN)
+ if(lastv == MusECore::CTRL_VAL_UNKNOWN)
{
- if(mc->initVal() == CTRL_VAL_UNKNOWN)
+ if(mc->initVal() == MusECore::CTRL_VAL_UNKNOWN)
v = 0;
else
v = mc->initVal();
@@ -153,7 +153,7 @@ void MidiStrip::addKnob(int idx, const QString& tt, const QString& label,
QLabel* lb = new QLabel(label, this);
controller[idx].lb = lb;
- lb->setFont(MusEConfig::config.fonts[1]);
+ lb->setFont(MusEGlobal::config.fonts[1]);
lb->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
lb->setAlignment(Qt::AlignCenter);
lb->setEnabled(enabled);
@@ -173,7 +173,7 @@ void MidiStrip::addKnob(int idx, const QString& tt, const QString& label,
// MidiStrip
//---------------------------------------------------------
-MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
+MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t)
: Strip(parent, t)
{
inHeartBeat = true;
@@ -182,16 +182,16 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
t->setActivity(0);
t->setLastActivity(0);
- volume = CTRL_VAL_UNKNOWN;
- pan = CTRL_VAL_UNKNOWN;
- variSend = CTRL_VAL_UNKNOWN;
- chorusSend = CTRL_VAL_UNKNOWN;
- reverbSend = CTRL_VAL_UNKNOWN;
+ volume = MusECore::CTRL_VAL_UNKNOWN;
+ pan = MusECore::CTRL_VAL_UNKNOWN;
+ variSend = MusECore::CTRL_VAL_UNKNOWN;
+ chorusSend = MusECore::CTRL_VAL_UNKNOWN;
+ reverbSend = MusECore::CTRL_VAL_UNKNOWN;
addKnob(KNOB_VAR_SEND, tr("VariationSend"), tr("Var"), SLOT(setVariSend(double)), false);
addKnob(KNOB_REV_SEND, tr("ReverbSend"), tr("Rev"), SLOT(setReverbSend(double)), false);
addKnob(KNOB_CHO_SEND, tr("ChorusSend"), tr("Cho"), SLOT(setChorusSend(double)), false);
- ///int auxsSize = song->auxs()->size();
+ ///int auxsSize = MusEGlobal::song->auxs()->size();
///if (auxsSize)
//layout->addSpacing((STRIP_WIDTH/2 + 1) * auxsSize);
///grid->addSpacing((STRIP_WIDTH/2 + 1) * auxsSize); // ??
@@ -200,21 +200,21 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
// slider, label, meter
//---------------------------------------------------
- MidiPort* mp = &midiPorts[t->outPort()];
- MidiController* mc = mp->midiController(CTRL_VOLUME);
+ MusECore::MidiPort* mp = &MusEGlobal::midiPorts[t->outPort()];
+ MusECore::MidiController* mc = mp->midiController(MusECore::CTRL_VOLUME);
int chan = t->outChannel();
int mn = mc->minVal();
int mx = mc->maxVal();
- slider = new MusEWidget::Slider(this, "vol", Qt::Vertical, MusEWidget::Slider::None,
+ slider = new MusEGui::Slider(this, "vol", Qt::Vertical, MusEGui::Slider::None,
QColor(100, 255, 100));
slider->setCursorHoming(true);
slider->setRange(double(mn), double(mx), 1.0);
slider->setFixedWidth(20);
- slider->setFont(MusEConfig::config.fonts[1]);
- slider->setId(CTRL_VOLUME);
+ slider->setFont(MusEGlobal::config.fonts[1]);
+ slider->setId(MusECore::CTRL_VOLUME);
- meter[0] = new MusEWidget::Meter(this, MusEWidget::Meter::LinMeter);
+ meter[0] = new MusEGui::Meter(this, MusEGui::Meter::LinMeter);
meter[0]->setRange(0, 127.0);
meter[0]->setFixedWidth(15);
connect(meter[0], SIGNAL(mousePress()), this, SLOT(resetPeaks()));
@@ -225,8 +225,8 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
sliderGrid->addWidget(meter[0], 0, 1, Qt::AlignHCenter);
grid->addLayout(sliderGrid, _curGridRow++, 0, 1, 2);
- sl = new MusEWidget::DoubleLabel(0.0, -98.0, 0.0, this);
- sl->setFont(MusEConfig::config.fonts[1]);
+ sl = new MusEGui::DoubleLabel(0.0, -98.0, 0.0, this);
+ sl->setFont(MusEGlobal::config.fonts[1]);
sl->setBackgroundRole(QPalette::Mid);
sl->setSpecialText(tr("off"));
sl->setSuffix(tr("dB"));
@@ -238,13 +238,13 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
sl->setSlider(slider);
double dlv;
- int v = mp->hwCtrlState(chan, CTRL_VOLUME);
- if(v == CTRL_VAL_UNKNOWN)
+ int v = mp->hwCtrlState(chan, MusECore::CTRL_VOLUME);
+ if(v == MusECore::CTRL_VAL_UNKNOWN)
{
- int lastv = mp->lastValidHWCtrlState(chan, CTRL_VOLUME);
- if(lastv == CTRL_VAL_UNKNOWN)
+ int lastv = mp->lastValidHWCtrlState(chan, MusECore::CTRL_VOLUME);
+ if(lastv == MusECore::CTRL_VAL_UNKNOWN)
{
- if(mc->initVal() == CTRL_VAL_UNKNOWN)
+ if(mc->initVal() == MusECore::CTRL_VAL_UNKNOWN)
v = 0;
else
v = mc->initVal();
@@ -259,7 +259,7 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
dlv = sl->minValue() - 0.5 * (sl->minValue() - sl->off());
else
{
- dlv = -fast_log10(float(127*127)/float(v*v))*20.0;
+ dlv = -MusECore::fast_log10(float(127*127)/float(v*v))*20.0;
if(dlv > sl->maxValue())
dlv = sl->maxValue();
}
@@ -293,7 +293,7 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
// record, mixdownfile
//---------------------------------------------------
- record = new MusEWidget::TransparentToolButton(this);
+ record = new MusEGui::TransparentToolButton(this);
record->setBackgroundRole(QPalette::Mid);
record->setCheckable(true);
record->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
@@ -335,7 +335,7 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
// Special here: Must make label same size as the 'exit' button would be IF this were an audio strip...
// (The 'exit1' icon is BIGGER than the 'record on' icon.)
- MusEWidget::TransparentToolButton* off = new MusEWidget::TransparentToolButton(this);
+ MusEGui::TransparentToolButton* off = new MusEGui::TransparentToolButton(this);
QIcon iconOff;
iconOff.addPixmap(*exit1Icon, QIcon::Normal, QIcon::On);
iconOff.addPixmap(*exitIcon, QIcon::Normal, QIcon::Off);
@@ -354,14 +354,14 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
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(MusEConfig::config.fonts[6]);
- dev_ch_label->setFont(MusEConfig::config.fonts[1]);
+ //dev_ch_label->setFont(MusEGlobal::config.fonts[6]);
+ dev_ch_label->setFont(MusEGlobal::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, MusEConfig::config.fonts[6].pointSize(), 5);
+ //autoAdjustFontSize(dev_ch_label, dev_ch_label->text(), false, true, MusEGlobal::config.fonts[6].pointSize(), 5);
QToolTip::add(dev_ch_label, tr("output port and channel"));
*/
- off = new MusEWidget::TransparentToolButton(this);
+ off = new MusEGui::TransparentToolButton(this);
off->setBackgroundRole(QPalette::Mid);
off->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
off->setCheckable(true);
@@ -381,7 +381,7 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
//---------------------------------------------------
iR = new QToolButton();
- iR->setFont(MusEConfig::config.fonts[1]);
+ iR->setFont(MusEGlobal::config.fonts[1]);
iR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
iR->setText(tr("iR"));
iR->setCheckable(false);
@@ -389,7 +389,7 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
grid->addWidget(iR, _curGridRow, 0);
connect(iR, SIGNAL(pressed()), SLOT(iRoutePressed()));
oR = new QToolButton();
- oR->setFont(MusEConfig::config.fonts[1]);
+ oR->setFont(MusEGlobal::config.fonts[1]);
oR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
oR->setText(tr("oR"));
oR->setCheckable(false);
@@ -404,8 +404,8 @@ MidiStrip::MidiStrip(QWidget* parent, MidiTrack* t)
// automation mode
//---------------------------------------------------
- autoType = new MusEWidget::ComboBox();
- autoType->setFont(MusEConfig::config.fonts[1]);
+ autoType = new MusEGui::ComboBox();
+ autoType->setFont(MusEGlobal::config.fonts[1]);
autoType->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
autoType->setEnabled(false);
@@ -502,7 +502,7 @@ void MidiStrip::songChanged(int val)
if (val & SC_CONFIG)
{
// Set the strip label's font.
- //label->setFont(MusEConfig::config.fonts[1]);
+ //label->setFont(MusEGlobal::config.fonts[1]);
setLabelFont();
}
}
@@ -513,7 +513,7 @@ void MidiStrip::songChanged(int val)
void MidiStrip::controlRightClicked(const QPoint &p, int id)
{
- song->execMidiAutomationCtlPopup((MidiTrack*)track, 0, p, id);
+ MusEGlobal::song->execMidiAutomationCtlPopup((MusECore::MidiTrack*)track, 0, p, id);
}
//---------------------------------------------------------
@@ -523,40 +523,40 @@ void MidiStrip::controlRightClicked(const QPoint &p, int id)
void MidiStrip::labelDoubleClicked(int idx)
{
//int mn, mx, v;
- //int num = CTRL_VOLUME;
+ //int num = MusECore::CTRL_VOLUME;
int num;
switch(idx)
{
case KNOB_PAN:
- num = CTRL_PANPOT;
+ num = MusECore::CTRL_PANPOT;
break;
case KNOB_VAR_SEND:
- num = CTRL_VARIATION_SEND;
+ num = MusECore::CTRL_VARIATION_SEND;
break;
case KNOB_REV_SEND:
- num = CTRL_REVERB_SEND;
+ num = MusECore::CTRL_REVERB_SEND;
break;
case KNOB_CHO_SEND:
- num = CTRL_CHORUS_SEND;
+ num = MusECore::CTRL_CHORUS_SEND;
break;
//case -1:
default:
- num = CTRL_VOLUME;
+ num = MusECore::CTRL_VOLUME;
break;
}
- int outport = ((MidiTrack*)track)->outPort();
- int chan = ((MidiTrack*)track)->outChannel();
- MidiPort* mp = &midiPorts[outport];
- MidiController* mc = mp->midiController(num);
+ int outport = ((MusECore::MidiTrack*)track)->outPort();
+ int chan = ((MusECore::MidiTrack*)track)->outChannel();
+ MusECore::MidiPort* mp = &MusEGlobal::midiPorts[outport];
+ MusECore::MidiController* mc = mp->midiController(num);
int lastv = mp->lastValidHWCtrlState(chan, num);
int curv = mp->hwCtrlState(chan, num);
- if(curv == CTRL_VAL_UNKNOWN)
+ if(curv == MusECore::CTRL_VAL_UNKNOWN)
{
// If no value has ever been set yet, use the current knob value
// (or the controller's initial value?) to 'turn on' the controller.
- if(lastv == CTRL_VAL_UNKNOWN)
+ if(lastv == MusECore::CTRL_VAL_UNKNOWN)
{
//int kiv = _ctrl->initVal());
int kiv;
@@ -570,23 +570,23 @@ void MidiStrip::labelDoubleClicked(int idx)
kiv = mc->maxVal();
kiv += mc->bias();
- //MidiPlayEvent ev(song->cpos(), outport, chan, ME_CONTROLLER, num, kiv);
- MidiPlayEvent ev(0, outport, chan, ME_CONTROLLER, num, kiv);
- audio->msgPlayMidiEvent(&ev);
+ //MusECore::MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, num, kiv);
+ MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, num, kiv);
+ MusEGlobal::audio->msgPlayMidiEvent(&ev);
}
else
{
- //MidiPlayEvent ev(song->cpos(), outport, chan, ME_CONTROLLER, num, lastv);
- MidiPlayEvent ev(0, outport, chan, ME_CONTROLLER, num, lastv);
- audio->msgPlayMidiEvent(&ev);
+ //MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, num, lastv);
+ MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, num, lastv);
+ MusEGlobal::audio->msgPlayMidiEvent(&ev);
}
}
else
{
- if(mp->hwCtrlState(chan, num) != CTRL_VAL_UNKNOWN)
- audio->msgSetHwCtrlState(mp, chan, num, CTRL_VAL_UNKNOWN);
+ if(mp->hwCtrlState(chan, num) != MusECore::CTRL_VAL_UNKNOWN)
+ MusEGlobal::audio->msgSetHwCtrlState(mp, chan, num, MusECore::CTRL_VAL_UNKNOWN);
}
- song->update(SC_MIDI_CONTROLLER);
+ MusEGlobal::song->update(SC_MIDI_CONTROLLER);
}
@@ -597,7 +597,7 @@ void MidiStrip::labelDoubleClicked(int idx)
void MidiStrip::offToggled(bool val)
{
track->setOff(val);
- song->update(SC_MUTE);
+ MusEGlobal::song->update(SC_MUTE);
}
/*
@@ -645,25 +645,25 @@ void MidiStrip::heartBeat()
void MidiStrip::updateControls()
{
bool en;
- int channel = ((MidiTrack*)track)->outChannel();
- MidiPort* mp = &midiPorts[((MidiTrack*)track)->outPort()];
- MidiCtrlValListList* mc = mp->controller();
- ciMidiCtrlValList icl;
+ int channel = ((MusECore::MidiTrack*)track)->outChannel();
+ MusECore::MidiPort* mp = &MusEGlobal::midiPorts[((MusECore::MidiTrack*)track)->outPort()];
+ MusECore::MidiCtrlValListList* mc = mp->controller();
+ MusECore::ciMidiCtrlValList icl;
- MidiController* ctrl = mp->midiController(CTRL_VOLUME);
- int nvolume = mp->hwCtrlState(channel, CTRL_VOLUME);
- if(nvolume == CTRL_VAL_UNKNOWN)
+ MusECore::MidiController* ctrl = mp->midiController(MusECore::CTRL_VOLUME);
+ int nvolume = mp->hwCtrlState(channel, MusECore::CTRL_VOLUME);
+ if(nvolume == MusECore::CTRL_VAL_UNKNOWN)
{
//if(nvolume != volume)
//{
- // MusEWidget::DoubleLabel ignores the value if already set...
+ // MusEGui::DoubleLabel ignores the value if already set...
sl->setValue(sl->off() - 1.0);
//volume = nvolume;
//}
- volume = CTRL_VAL_UNKNOWN;
- nvolume = mp->lastValidHWCtrlState(channel, CTRL_VOLUME);
+ volume = MusECore::CTRL_VAL_UNKNOWN;
+ nvolume = mp->lastValidHWCtrlState(channel, MusECore::CTRL_VOLUME);
//if(nvolume != volume)
- if(nvolume != CTRL_VAL_UNKNOWN)
+ if(nvolume != MusECore::CTRL_VAL_UNKNOWN)
{
nvolume -= ctrl->bias();
//slider->blockSignals(true);
@@ -693,7 +693,7 @@ void MidiStrip::updateControls()
}
else
{
- double v = -fast_log10(float(127*127)/float(ivol*ivol))*20.0;
+ double v = -MusECore::fast_log10(float(127*127)/float(ivol*ivol))*20.0;
if(v > sl->maxValue())
{
//printf("MidiStrip::updateControls setting volume slider label\n");
@@ -714,19 +714,19 @@ void MidiStrip::updateControls()
KNOB* gcon = &controller[KNOB_PAN];
- ctrl = mp->midiController(CTRL_PANPOT);
- int npan = mp->hwCtrlState(channel, CTRL_PANPOT);
- if(npan == CTRL_VAL_UNKNOWN)
+ ctrl = mp->midiController(MusECore::CTRL_PANPOT);
+ int npan = mp->hwCtrlState(channel, MusECore::CTRL_PANPOT);
+ if(npan == MusECore::CTRL_VAL_UNKNOWN)
{
- // MusEWidget::DoubleLabel ignores the value if already set...
+ // MusEGui::DoubleLabel ignores the value if already set...
//if(npan != pan)
//{
gcon->dl->setValue(gcon->dl->off() - 1.0);
//pan = npan;
//}
- pan = CTRL_VAL_UNKNOWN;
- npan = mp->lastValidHWCtrlState(channel, CTRL_PANPOT);
- if(npan != CTRL_VAL_UNKNOWN)
+ pan = MusECore::CTRL_VAL_UNKNOWN;
+ npan = mp->lastValidHWCtrlState(channel, MusECore::CTRL_PANPOT);
+ if(npan != MusECore::CTRL_VAL_UNKNOWN)
{
npan -= ctrl->bias();
if(double(npan) != gcon->knob->value())
@@ -753,7 +753,7 @@ void MidiStrip::updateControls()
}
- icl = mc->find(channel, CTRL_VARIATION_SEND);
+ icl = mc->find(channel, MusECore::CTRL_VARIATION_SEND);
en = icl != mc->end();
gcon = &controller[KNOB_VAR_SEND];
@@ -766,19 +766,19 @@ void MidiStrip::updateControls()
if(en)
{
- ctrl = mp->midiController(CTRL_VARIATION_SEND);
+ ctrl = mp->midiController(MusECore::CTRL_VARIATION_SEND);
int nvariSend = icl->second->hwVal();
- if(nvariSend == CTRL_VAL_UNKNOWN)
+ if(nvariSend == MusECore::CTRL_VAL_UNKNOWN)
{
- // MusEWidget::DoubleLabel ignores the value if already set...
+ // MusEGui::DoubleLabel ignores the value if already set...
//if(nvariSend != variSend)
//{
gcon->dl->setValue(gcon->dl->off() - 1.0);
//variSend = nvariSend;
//}
- variSend = CTRL_VAL_UNKNOWN;
- nvariSend = mp->lastValidHWCtrlState(channel, CTRL_VARIATION_SEND);
- if(nvariSend != CTRL_VAL_UNKNOWN)
+ variSend = MusECore::CTRL_VAL_UNKNOWN;
+ nvariSend = mp->lastValidHWCtrlState(channel, MusECore::CTRL_VARIATION_SEND);
+ if(nvariSend != MusECore::CTRL_VAL_UNKNOWN)
{
nvariSend -= ctrl->bias();
if(double(nvariSend) != gcon->knob->value())
@@ -801,7 +801,7 @@ void MidiStrip::updateControls()
}
}
- icl = mc->find(channel, CTRL_REVERB_SEND);
+ icl = mc->find(channel, MusECore::CTRL_REVERB_SEND);
en = icl != mc->end();
gcon = &controller[KNOB_REV_SEND];
@@ -814,19 +814,19 @@ void MidiStrip::updateControls()
if(en)
{
- ctrl = mp->midiController(CTRL_REVERB_SEND);
+ ctrl = mp->midiController(MusECore::CTRL_REVERB_SEND);
int nreverbSend = icl->second->hwVal();
- if(nreverbSend == CTRL_VAL_UNKNOWN)
+ if(nreverbSend == MusECore::CTRL_VAL_UNKNOWN)
{
- // MusEWidget::DoubleLabel ignores the value if already set...
+ // MusEGui::DoubleLabel ignores the value if already set...
//if(nreverbSend != reverbSend)
//{
gcon->dl->setValue(gcon->dl->off() - 1.0);
//reverbSend = nreverbSend;
//}
- reverbSend = CTRL_VAL_UNKNOWN;
- nreverbSend = mp->lastValidHWCtrlState(channel, CTRL_REVERB_SEND);
- if(nreverbSend != CTRL_VAL_UNKNOWN)
+ reverbSend = MusECore::CTRL_VAL_UNKNOWN;
+ nreverbSend = mp->lastValidHWCtrlState(channel, MusECore::CTRL_REVERB_SEND);
+ if(nreverbSend != MusECore::CTRL_VAL_UNKNOWN)
{
nreverbSend -= ctrl->bias();
if(double(nreverbSend) != gcon->knob->value())
@@ -849,7 +849,7 @@ void MidiStrip::updateControls()
}
}
- icl = mc->find(channel, CTRL_CHORUS_SEND);
+ icl = mc->find(channel, MusECore::CTRL_CHORUS_SEND);
en = icl != mc->end();
gcon = &controller[KNOB_CHO_SEND];
@@ -862,19 +862,19 @@ void MidiStrip::updateControls()
if(en)
{
- ctrl = mp->midiController(CTRL_CHORUS_SEND);
+ ctrl = mp->midiController(MusECore::CTRL_CHORUS_SEND);
int nchorusSend = icl->second->hwVal();
- if(nchorusSend == CTRL_VAL_UNKNOWN)
+ if(nchorusSend == MusECore::CTRL_VAL_UNKNOWN)
{
- // MusEWidget::DoubleLabel ignores the value if already set...
+ // MusEGui::DoubleLabel ignores the value if already set...
//if(nchorusSend != chorusSend)
//{
gcon->dl->setValue(gcon->dl->off() - 1.0);
//chorusSend = nchorusSend;
//}
- chorusSend = CTRL_VAL_UNKNOWN;
- nchorusSend = mp->lastValidHWCtrlState(channel, CTRL_CHORUS_SEND);
- if(nchorusSend != CTRL_VAL_UNKNOWN)
+ chorusSend = MusECore::CTRL_VAL_UNKNOWN;
+ nchorusSend = mp->lastValidHWCtrlState(channel, MusECore::CTRL_CHORUS_SEND);
+ if(nchorusSend != MusECore::CTRL_VAL_UNKNOWN)
{
nchorusSend -= ctrl->bias();
if(double(nchorusSend) != gcon->knob->value())
@@ -904,28 +904,28 @@ void MidiStrip::ctrlChanged(int num, int val)
if (inHeartBeat)
return;
- MidiTrack* t = (MidiTrack*) track;
+ MusECore::MidiTrack* t = (MusECore::MidiTrack*) track;
int port = t->outPort();
int chan = t->outChannel();
- MidiPort* mp = &midiPorts[port];
- MidiController* mctl = mp->midiController(num);
+ MusECore::MidiPort* mp = &MusEGlobal::midiPorts[port];
+ MusECore::MidiController* mctl = mp->midiController(num);
if((val < mctl->minVal()) || (val > mctl->maxVal()))
{
- if(mp->hwCtrlState(chan, num) != CTRL_VAL_UNKNOWN)
- audio->msgSetHwCtrlState(mp, chan, num, CTRL_VAL_UNKNOWN);
+ if(mp->hwCtrlState(chan, num) != MusECore::CTRL_VAL_UNKNOWN)
+ MusEGlobal::audio->msgSetHwCtrlState(mp, chan, num, MusECore::CTRL_VAL_UNKNOWN);
}
else
{
val += mctl->bias();
- int tick = song->cpos();
+ int tick = MusEGlobal::song->cpos();
- MidiPlayEvent ev(tick, port, chan, ME_CONTROLLER, num, val);
+ MusECore::MidiPlayEvent ev(tick, port, chan, MusECore::ME_CONTROLLER, num, val);
- audio->msgPlayMidiEvent(&ev);
+ MusEGlobal::audio->msgPlayMidiEvent(&ev);
}
- song->update(SC_MIDI_CONTROLLER);
+ MusEGlobal::song->update(SC_MIDI_CONTROLLER);
}
//---------------------------------------------------------
@@ -936,7 +936,7 @@ void MidiStrip::volLabelChanged(double val)
{
val = sqrt( float(127*127) / pow(10.0, -val/20.0) );
- ctrlChanged(CTRL_VOLUME, lrint(val));
+ ctrlChanged(MusECore::CTRL_VOLUME, lrint(val));
}
@@ -948,7 +948,7 @@ void MidiStrip::setVolume(double val)
{
// printf("Vol %d\n", lrint(val));
- ctrlChanged(CTRL_VOLUME, lrint(val));
+ ctrlChanged(MusECore::CTRL_VOLUME, lrint(val));
}
//---------------------------------------------------------
@@ -958,7 +958,7 @@ void MidiStrip::setVolume(double val)
void MidiStrip::setPan(double val)
{
- ctrlChanged(CTRL_PANPOT, lrint(val));
+ ctrlChanged(MusECore::CTRL_PANPOT, lrint(val));
}
//---------------------------------------------------------
@@ -967,7 +967,7 @@ void MidiStrip::setPan(double val)
void MidiStrip::setVariSend(double val)
{
- ctrlChanged(CTRL_VARIATION_SEND, lrint(val));
+ ctrlChanged(MusECore::CTRL_VARIATION_SEND, lrint(val));
}
//---------------------------------------------------------
@@ -976,7 +976,7 @@ void MidiStrip::setVariSend(double val)
void MidiStrip::setChorusSend(double val)
{
- ctrlChanged(CTRL_CHORUS_SEND, lrint(val));
+ ctrlChanged(MusECore::CTRL_CHORUS_SEND, lrint(val));
}
//---------------------------------------------------------
@@ -985,7 +985,7 @@ void MidiStrip::setChorusSend(double val)
void MidiStrip::setReverbSend(double val)
{
- ctrlChanged(CTRL_REVERB_SEND, lrint(val));
+ ctrlChanged(MusECore::CTRL_REVERB_SEND, lrint(val));
}
//---------------------------------------------------------
@@ -994,7 +994,7 @@ void MidiStrip::setReverbSend(double val)
void MidiStrip::iRoutePressed()
{
- MusEWidget::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
+ MusEGui::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
iR->setDown(false);
pup->exec(QCursor::pos(), track, false);
}
@@ -1005,9 +1005,9 @@ void MidiStrip::iRoutePressed()
void MidiStrip::oRoutePressed()
{
- MusEWidget::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
+ MusEGui::RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
oR->setDown(false);
pup->exec(QCursor::pos(), track, true);
}
-} // namespace MusEMixer
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/mstrip.h b/muse2/muse/mixer/mstrip.h
index 0535eaa8..bb095363 100644
--- a/muse2/muse/mixer/mstrip.h
+++ b/muse2/muse/mixer/mstrip.h
@@ -33,16 +33,15 @@ class QDialog;
class QLabel;
class QString;
-namespace MusEWidget {
+namespace MusECore {
+class MidiTrack;
+}
+
+namespace MusEGui {
class DoubleLabel;
class Knob;
class Slider;
class TransparentToolButton;
-}
-
-class MidiTrack;
-
-namespace MusEMixer {
//---------------------------------------------------------
// MidiStrip
@@ -51,13 +50,13 @@ namespace MusEMixer {
class MidiStrip : public Strip {
Q_OBJECT
- MusEWidget::Slider* slider;
- MusEWidget::DoubleLabel* sl;
- MusEWidget::TransparentToolButton* off;
+ MusEGui::Slider* slider;
+ MusEGui::DoubleLabel* sl;
+ MusEGui::TransparentToolButton* off;
struct KNOB {
- MusEWidget::Knob* knob;
- MusEWidget::DoubleLabel* dl;
+ MusEGui::Knob* knob;
+ MusEGui::DoubleLabel* dl;
QLabel* lb;
} controller[4]; // pan variation reverb chorus
@@ -93,10 +92,10 @@ class MidiStrip : public Strip {
virtual void songChanged(int);
public:
- MidiStrip(QWidget* parent, MidiTrack*);
+ MidiStrip(QWidget* parent, MusECore::MidiTrack*);
};
-} // namespace MusEMixer
+} // namespace MusEGui
#endif
diff --git a/muse2/muse/mixer/panknob.cpp b/muse2/muse/mixer/panknob.cpp
index 9a12d58f..dc2564a7 100644
--- a/muse2/muse/mixer/panknob.cpp
+++ b/muse2/muse/mixer/panknob.cpp
@@ -26,14 +26,14 @@
#include "panknob.h"
#include "track.h"
-namespace MusEWidget {
+namespace MusEGui {
//---------------------------------------------------------
// PanKnob
//---------------------------------------------------------
PanKnob::PanKnob(QWidget* parent, AudioTrack* s)
- : MusEWidget::Knob(parent, "pan")
+ : MusEGui::Knob(parent, "pan")
{
src = s;
connect(this, SIGNAL(valueChanged(double,int)), SLOT(valueChanged(double)));
@@ -48,7 +48,7 @@ void PanKnob::valueChanged(double val)
//audio->msgSetPan(src, val);
// p4.0.21 audio->msgXXX waits. Do we really need to?
src->setPan(val);
- song->controllerChange(src);
+ MusEGlobal::song->controllerChange(src);
}
-} // namespace MusEWidget
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/panknob.h b/muse2/muse/mixer/panknob.h
index 7f0d3232..3e6ecb4c 100644
--- a/muse2/muse/mixer/panknob.h
+++ b/muse2/muse/mixer/panknob.h
@@ -28,7 +28,7 @@
class AudioTrack;
-namespace MusEWidget {
+namespace MusEGui {
//---------------------------------------------------------
// PanKnob
@@ -45,7 +45,7 @@ class PanKnob : public Knob {
PanKnob(QWidget* parent, AudioTrack*);
};
-} // namespace MusEWidget
+} // namespace MusEGui
#endif
diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp
index 7daf142d..0ba03beb 100644
--- a/muse2/muse/mixer/rack.cpp
+++ b/muse2/muse/mixer/rack.cpp
@@ -46,7 +46,7 @@
#include "plugin.h"
#include "filedialog.h"
-namespace MusEMixer {
+namespace MusEGui {
//---------------------------------------------------------
// class EffectRackDelegate
@@ -55,16 +55,16 @@ namespace MusEMixer {
class EffectRackDelegate : public QStyledItemDelegate {
EffectRack* er;
- AudioTrack* tr;
+ MusECore::AudioTrack* tr;
public:
void paint ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const;
- EffectRackDelegate(QObject * parent, AudioTrack* at );
+ EffectRackDelegate(QObject * parent, MusECore::AudioTrack* at );
};
-EffectRackDelegate::EffectRackDelegate(QObject * parent, AudioTrack* at ) : QStyledItemDelegate(parent) {
+EffectRackDelegate::EffectRackDelegate(QObject * parent, MusECore::AudioTrack* at ) : QStyledItemDelegate(parent) {
er = (EffectRack*) parent;
tr = at;
}
@@ -125,10 +125,10 @@ void EffectRackDelegate::paint ( QPainter * painter, const QStyleOptionViewItem
class RackSlot : public QListWidgetItem {
int idx;
- AudioTrack* node;
+ MusECore::AudioTrack* node;
public:
- RackSlot(QListWidget* lb, AudioTrack* t, int i, int h);
+ RackSlot(QListWidget* lb, MusECore::AudioTrack* t, int i, int h);
~RackSlot();
void setBackgroundColor(const QBrush& brush) {setBackground(brush);};
};
@@ -142,7 +142,7 @@ RackSlot::~RackSlot()
// RackSlot
//---------------------------------------------------------
-RackSlot::RackSlot(QListWidget* b, AudioTrack* t, int i, int h)
+RackSlot::RackSlot(QListWidget* b, MusECore::AudioTrack* t, int i, int h)
: QListWidgetItem(b)
{
node = t;
@@ -154,14 +154,14 @@ RackSlot::RackSlot(QListWidget* b, AudioTrack* t, int i, int h)
// EffectRack
//---------------------------------------------------------
-EffectRack::EffectRack(QWidget* parent, AudioTrack* t)
+EffectRack::EffectRack(QWidget* parent, MusECore::AudioTrack* t)
: QListWidget(parent)
{
setObjectName("Rack");
setAttribute(Qt::WA_DeleteOnClose);
track = t;
itemheight = 19;
- setFont(MusEConfig::config.fonts[1]);
+ setFont(MusEGlobal::config.fonts[1]);
activeColor = QColor(74, 165, 49);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -174,7 +174,7 @@ EffectRack::EffectRack(QWidget* parent, AudioTrack* t)
connect(this, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
this, SLOT(doubleClicked(QListWidgetItem*)));
- connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
EffectRackDelegate* er_delegate = new EffectRackDelegate(this, track);
setItemDelegate(er_delegate);
@@ -235,9 +235,9 @@ QSize EffectRack::sizeHint() const
void EffectRack::choosePlugin(QListWidgetItem* it, bool replace)
{
- Plugin* plugin = PluginDialog::getPlugin(this);
+ MusECore::Plugin* plugin = PluginDialog::getPlugin(this);
if (plugin) {
- PluginI* plugi = new PluginI();
+ MusECore::PluginI* plugi = new MusECore::PluginI();
if (plugi->initPluginInstance(plugin, track->channels())) {
printf("cannot instantiate plugin <%s>\n",
plugin->name().toLatin1().constData());
@@ -246,8 +246,8 @@ void EffectRack::choosePlugin(QListWidgetItem* it, bool replace)
}
int idx = row(it);
if (replace)
- audio->msgAddPlugin(track, idx, 0);
- audio->msgAddPlugin(track, idx, plugi);
+ MusEGlobal::audio->msgAddPlugin(track, idx, 0);
+ MusEGlobal::audio->msgAddPlugin(track, idx, plugi);
updateContents();
}
}
@@ -264,7 +264,7 @@ void EffectRack::menuRequested(QListWidgetItem* it)
int idx = row(curitem);
QString name;
//bool mute;
- Pipeline* pipe = track->efxPipe();
+ MusECore::Pipeline* pipe = track->efxPipe();
if (pipe) {
name = pipe->name(idx);
//mute = pipe->isOn(idx);
@@ -351,7 +351,7 @@ void EffectRack::menuRequested(QListWidgetItem* it)
break;
}
case REMOVE:
- audio->msgAddPlugin(track, idx, 0);
+ MusEGlobal::audio->msgAddPlugin(track, idx, 0);
break;
case BYPASS:
{
@@ -388,7 +388,7 @@ void EffectRack::menuRequested(QListWidgetItem* it)
break;
}
updateContents();
- song->update(SC_RACK);
+ MusEGlobal::song->update(SC_RACK);
}
//---------------------------------------------------------
@@ -403,7 +403,7 @@ void EffectRack::doubleClicked(QListWidgetItem* it)
RackSlot* item = (RackSlot*)it;
int idx = row(item);
- Pipeline* pipe = track->efxPipe();
+ MusECore::Pipeline* pipe = track->efxPipe();
if (pipe->name(idx) == QString("empty")) {
choosePlugin(it);
@@ -417,8 +417,8 @@ void EffectRack::doubleClicked(QListWidgetItem* it)
void EffectRack::savePreset(int idx)
{
- //QString name = MusEWidget::getSaveFileName(QString(""), plug_file_pattern, this,
- QString name = MusEWidget::getSaveFileName(QString(""), MusEGlobal::preset_file_save_pattern, this,
+ //QString name = MusEGui::getSaveFileName(QString(""), plug_file_pattern, this,
+ QString name = MusEGui::getSaveFileName(QString(""), MusEGlobal::preset_file_save_pattern, this,
tr("MusE: Save Preset"));
if(name.isEmpty())
@@ -426,14 +426,14 @@ void EffectRack::savePreset(int idx)
//FILE* presetFp = fopen(name.ascii(),"w+");
bool popenFlag;
- FILE* presetFp = MusEWidget::fileOpen(this, name, QString(".pre"), "w", popenFlag, false, true);
+ FILE* presetFp = MusEGui::fileOpen(this, name, QString(".pre"), "w", popenFlag, false, true);
if (presetFp == 0) {
//fprintf(stderr, "EffectRack::savePreset() fopen failed: %s\n",
// strerror(errno));
return;
}
- Xml xml(presetFp);
- Pipeline* pipe = track->efxPipe();
+ MusECore::Xml xml(presetFp);
+ MusECore::Pipeline* pipe = track->efxPipe();
if (pipe) {
if ((*pipe)[idx] != NULL) {
xml.header();
@@ -486,8 +486,8 @@ void EffectRack::startDrag(int idx)
strerror(errno));
return;
}
- Xml xml(tmp);
- Pipeline* pipe = track->efxPipe();
+ MusECore::Xml xml(tmp);
+ MusECore::Pipeline* pipe = track->efxPipe();
if (pipe) {
if ((*pipe)[idx] != NULL) {
xml.header();
@@ -541,7 +541,7 @@ void EffectRack::dropEvent(QDropEvent *event)
return;
int idx = row(i);
- Pipeline* pipe = track->efxPipe();
+ MusECore::Pipeline* pipe = track->efxPipe();
if (pipe)
{
if ((*pipe)[idx] != NULL) {
@@ -551,7 +551,7 @@ void EffectRack::dropEvent(QDropEvent *event)
if(strcmp(sw->metaObject()->className(), "EffectRack") == 0)
{
EffectRack *ser = (EffectRack*)sw;
- Pipeline* spipe = ser->getTrack()->efxPipe();
+ MusECore::Pipeline* spipe = ser->getTrack()->efxPipe();
if(!spipe)
return;
@@ -565,8 +565,8 @@ void EffectRack::dropEvent(QDropEvent *event)
if(QMessageBox::question(this, tr("Replace effect"),tr("Do you really want to replace the effect %1?").arg(pipe->name(idx)),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
{
- audio->msgAddPlugin(track, idx, 0);
- song->update(SC_RACK);
+ MusEGlobal::audio->msgAddPlugin(track, idx, 0);
+ MusEGlobal::song->update(SC_RACK);
}
else {
return;
@@ -577,7 +577,7 @@ void EffectRack::dropEvent(QDropEvent *event)
{
char *tmpStr = new char[event->mimeData()->data("text/x-muse-plugin").size()];
strcpy(tmpStr, event->mimeData()->data("text/x-muse-plugin").data());
- Xml xml(tmpStr);
+ MusECore::Xml xml(tmpStr);
initPlugin(xml, idx);
delete tmpStr;
}
@@ -593,10 +593,10 @@ void EffectRack::dropEvent(QDropEvent *event)
{
//bool popenFlag = false;
bool popenFlag;
- FILE* fp = MusEWidget::fileOpen(this, text, ".pre", "r", popenFlag, false, false);
+ FILE* fp = MusEGui::fileOpen(this, text, ".pre", "r", popenFlag, false, false);
if (fp)
{
- Xml xml(fp);
+ MusECore::Xml xml(fp);
initPlugin(xml, idx);
// Added by T356.
@@ -639,7 +639,7 @@ void EffectRack::mousePressEvent(QMouseEvent *event)
void EffectRack::mouseMoveEvent(QMouseEvent *event)
{
if (event->buttons() & Qt::LeftButton) {
- Pipeline* pipe = track->efxPipe();
+ MusECore::Pipeline* pipe = track->efxPipe();
if(!pipe)
return;
@@ -661,18 +661,18 @@ void EffectRack::mouseMoveEvent(QMouseEvent *event)
}
-void EffectRack::initPlugin(Xml xml, int idx)
+void EffectRack::initPlugin(MusECore::Xml xml, int idx)
{
for (;;) {
- Xml::Token token = xml.parse();
+ MusECore::Xml::Token token = xml.parse();
QString tag = xml.s1();
switch (token) {
- case Xml::Error:
- case Xml::End:
+ case MusECore::Xml::Error:
+ case MusECore::Xml::End:
return;
- case Xml::TagStart:
+ case MusECore::Xml::TagStart:
if (tag == "plugin") {
- PluginI* plugi = new PluginI();
+ MusECore::PluginI* plugi = new MusECore::PluginI();
if (plugi->readConfiguration(xml, false)) {
//QString d;
//xml.dump(d);
@@ -681,8 +681,8 @@ void EffectRack::initPlugin(Xml xml, int idx)
}
else {
//printf("instantiated!\n");
- audio->msgAddPlugin(track, idx, plugi);
- song->update(SC_RACK);
+ MusEGlobal::audio->msgAddPlugin(track, idx, plugi);
+ MusEGlobal::song->update(SC_RACK);
return;
}
}
@@ -691,9 +691,9 @@ void EffectRack::initPlugin(Xml xml, int idx)
else
xml.unknown("EffectRack");
break;
- case Xml::Attribut:
+ case MusECore::Xml::Attribut:
break;
- case Xml::TagEnd:
+ case MusECore::Xml::TagEnd:
if (tag == "muse")
return;
default:
@@ -702,4 +702,4 @@ void EffectRack::initPlugin(Xml xml, int idx)
}
}
-} // namespace MusEMixer
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/rack.h b/muse2/muse/mixer/rack.h
index 2ea053bf..49905f48 100644
--- a/muse2/muse/mixer/rack.h
+++ b/muse2/muse/mixer/rack.h
@@ -31,10 +31,12 @@ class QDragLeaveEvent;
class QDropEvent;
class QMouseEvent;
+namespace MusECore {
class AudioTrack;
class Xml;
+}
-namespace MusEMixer {
+namespace MusEGui {
//---------------------------------------------------------
// EffectRack
@@ -44,7 +46,7 @@ class EffectRack : public QListWidget {
Q_OBJECT
- AudioTrack* track;
+ MusECore::AudioTrack* track;
int itemheight;
QColor activeColor;
@@ -52,7 +54,7 @@ class EffectRack : public QListWidget {
virtual QSize sizeHint() const;
void startDrag(int idx);
- void initPlugin(Xml xml, int idx);
+ void initPlugin(MusECore::Xml xml, int idx);
QPoint dragPos;
void savePreset(int idx);
void choosePlugin(QListWidgetItem* item, bool replace = false);
@@ -73,16 +75,16 @@ class EffectRack : public QListWidget {
Qt::DropActions supportedDropActions () const;
public:
- EffectRack(QWidget*, AudioTrack* t);
+ EffectRack(QWidget*, MusECore::AudioTrack* t);
~EffectRack();
- AudioTrack* getTrack() { return track; }
+ MusECore::AudioTrack* getTrack() { return track; }
QPoint getDragPos() { return dragPos; }
QColor getActiveColor() { return activeColor; }
};
-} // namespace MusEMixer
+} // namespace MusEGui
#endif
diff --git a/muse2/muse/mixer/routedialog.cpp b/muse2/muse/mixer/routedialog.cpp
index a9441343..a0b00278 100644
--- a/muse2/muse/mixer/routedialog.cpp
+++ b/muse2/muse/mixer/routedialog.cpp
@@ -32,7 +32,7 @@
#include "audio.h"
#include "driver/jackaudio.h"
-namespace MusEDialog {
+namespace MusEGui {
//---------------------------------------------------------
// RouteDialog
@@ -47,7 +47,7 @@ RouteDialog::RouteDialog(QWidget* parent)
connect(newDstList, SIGNAL(itemSelectionChanged()), SLOT(dstSelectionChanged()));
connect(removeButton, SIGNAL(clicked()), SLOT(removeRoute()));
connect(connectButton, SIGNAL(clicked()), SLOT(addRoute()));
- connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
routingChanged();
}
@@ -65,49 +65,49 @@ void RouteDialog::routingChanged()
newSrcList->clear();
newDstList->clear();
- TrackList* tl = song->tracks();
- for (ciTrack i = tl->begin(); i != tl->end(); ++i) {
+ MusECore::TrackList* tl = MusEGlobal::song->tracks();
+ for (MusECore::ciTrack i = tl->begin(); i != tl->end(); ++i) {
if ((*i)->isMidiTrack())
continue;
// p3.3.38
//WaveTrack* track = (WaveTrack*)(*i);
- AudioTrack* track = (AudioTrack*)(*i);
- if (track->type() == Track::AUDIO_INPUT) {
+ MusECore::AudioTrack* track = (MusECore::AudioTrack*)(*i);
+ if (track->type() == MusECore::Track::AUDIO_INPUT) {
for (int channel = 0; channel < track->channels(); ++channel)
- newDstList->addItem(Route(track, channel).name());
- const RouteList* rl = track->inRoutes();
- for (ciRoute r = rl->begin(); r != rl->end(); ++r) {
- //Route dst(track->name(), true, r->channel);
- Route dst(track->name(), true, r->channel, Route::TRACK_ROUTE);
+ newDstList->addItem(MusECore::Route(track, channel).name());
+ const MusECore::RouteList* rl = track->inRoutes();
+ for (MusECore::ciRoute r = rl->begin(); r != rl->end(); ++r) {
+ //MusECore::Route dst(track->name(), true, r->channel);
+ MusECore::Route dst(track->name(), true, r->channel, MusECore::Route::TRACK_ROUTE);
new QTreeWidgetItem(routeList, QStringList() << r->name() << dst.name());
}
}
- else if (track->type() != Track::AUDIO_AUX)
- newDstList->addItem(Route(track, -1).name());
- if (track->type() == Track::AUDIO_OUTPUT) {
+ else if (track->type() != MusECore::Track::AUDIO_AUX)
+ newDstList->addItem(MusECore::Route(track, -1).name());
+ if (track->type() == MusECore::Track::AUDIO_OUTPUT) {
for (int channel = 0; channel < track->channels(); ++channel) {
- Route r(track, channel);
+ MusECore::Route r(track, channel);
newSrcList->addItem(r.name());
}
}
else
- newSrcList->addItem(Route(track, -1).name());
+ newSrcList->addItem(MusECore::Route(track, -1).name());
- const RouteList* rl = track->outRoutes();
- for (ciRoute r = rl->begin(); r != rl->end(); ++r) {
+ const MusECore::RouteList* rl = track->outRoutes();
+ for (MusECore::ciRoute r = rl->begin(); r != rl->end(); ++r) {
QString src(track->name());
- if (track->type() == Track::AUDIO_OUTPUT) {
- Route s(src, false, r->channel);
+ if (track->type() == MusECore::Track::AUDIO_OUTPUT) {
+ MusECore::Route s(src, false, r->channel);
src = s.name();
}
new QTreeWidgetItem(routeList, QStringList() << src << r->name());
}
}
if (!MusEGlobal::checkAudioDevice()) return;
- std::list<QString> sl = audioDevice->outputPorts();
+ std::list<QString> sl = MusEGlobal::audioDevice->outputPorts();
for (std::list<QString>::iterator i = sl.begin(); i != sl.end(); ++i)
newSrcList->addItem(*i);
- sl = audioDevice->inputPorts();
+ sl = MusEGlobal::audioDevice->inputPorts();
for (std::list<QString>::iterator i = sl.begin(); i != sl.end(); ++i)
newDstList->addItem(*i);
routeSelectionChanged(); // init remove button
@@ -144,9 +144,9 @@ void RouteDialog::removeRoute()
QTreeWidgetItem* item = routeList->currentItem();
if (item == 0)
return;
- audio->msgRemoveRoute(Route(item->text(0), false, -1), Route(item->text(1), true, -1));
- audio->msgUpdateSoloStates();
- song->update(SC_SOLO);
+ MusEGlobal::audio->msgRemoveRoute(MusECore::Route(item->text(0), false, -1), MusECore::Route(item->text(1), true, -1));
+ MusEGlobal::audio->msgUpdateSoloStates();
+ MusEGlobal::song->update(SC_SOLO);
delete item;
}
@@ -160,9 +160,9 @@ void RouteDialog::addRoute()
QListWidgetItem* dstItem = newDstList->currentItem();
if (srcItem == 0 || dstItem == 0)
return;
- audio->msgAddRoute(Route(srcItem->text(), false, -1), Route(dstItem->text(), true, -1));
- audio->msgUpdateSoloStates();
- song->update(SC_SOLO);
+ MusEGlobal::audio->msgAddRoute(MusECore::Route(srcItem->text(), false, -1), MusECore::Route(dstItem->text(), true, -1));
+ MusEGlobal::audio->msgUpdateSoloStates();
+ MusEGlobal::song->update(SC_SOLO);
new QTreeWidgetItem(routeList, QStringList() << srcItem->text() << dstItem->text());
}
@@ -176,7 +176,7 @@ void RouteDialog::srcSelectionChanged()
QListWidgetItem* dstItem = newDstList->currentItem();
connectButton->setEnabled((srcItem != 0)
&& (dstItem != 0)
- && checkRoute(srcItem->text(), dstItem->text()));
+ && MusECore::checkRoute(srcItem->text(), dstItem->text()));
}
//---------------------------------------------------------
@@ -189,7 +189,7 @@ void RouteDialog::dstSelectionChanged()
QListWidgetItem* srcItem = newSrcList->currentItem();
connectButton->setEnabled((srcItem != 0)
&& (dstItem != 0)
- && checkRoute(srcItem->text(), dstItem->text()));
+ && MusECore::checkRoute(srcItem->text(), dstItem->text()));
}
//---------------------------------------------------------
@@ -202,4 +202,4 @@ void RouteDialog::closeEvent(QCloseEvent* e)
e->accept();
}
-} // namespace MusEDialog
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/routedialog.h b/muse2/muse/mixer/routedialog.h
index de5dfbc3..4d1856e5 100644
--- a/muse2/muse/mixer/routedialog.h
+++ b/muse2/muse/mixer/routedialog.h
@@ -29,7 +29,7 @@
class QCloseEvent;
class QDialog;
-namespace MusEDialog {
+namespace MusEGui {
//---------------------------------------------------------
// RouteDialog
@@ -57,7 +57,7 @@ class RouteDialog : public QDialog, public Ui::RouteDialogBase {
};
-} // namespace MusEDialog
+} // namespace MusEGui
#endif
diff --git a/muse2/muse/mixer/strip.cpp b/muse2/muse/mixer/strip.cpp
index 67594e3a..5f5e5e39 100644
--- a/muse2/muse/mixer/strip.cpp
+++ b/muse2/muse/mixer/strip.cpp
@@ -41,7 +41,7 @@
#include "utils.h"
#include "icons.h"
-namespace MusEMixer {
+namespace MusEGui {
//---------------------------------------------------------
// setRecordFlag
@@ -73,12 +73,12 @@ void Strip::resetPeaks()
void Strip::recordToggled(bool val)
{
- if (track->type() == Track::AUDIO_OUTPUT) {
+ if (track->type() == MusECore::Track::AUDIO_OUTPUT) {
if (val && track->recordFlag() == false) {
- MusEGlobal::muse->bounceToFile((AudioOutput*)track);
+ MusEGlobal::muse->bounceToFile((MusECore::AudioOutput*)track);
}
- audio->msgSetRecord((AudioOutput*)track, val);
- if (!((AudioOutput*)track)->recFile())
+ MusEGlobal::audio->msgSetRecord((MusECore::AudioOutput*)track, val);
+ if (!((MusECore::AudioOutput*)track)->recFile())
{
record->setChecked(false);
record->setIcon(QIcon(*record_off_Icon));
@@ -86,7 +86,7 @@ void Strip::recordToggled(bool val)
}
return;
}
- song->setRecordFlag(track, val);
+ MusEGlobal::song->setRecordFlag(track, val);
}
//---------------------------------------------------------
// heartBeat
@@ -105,9 +105,9 @@ void Strip::setLabelFont()
{
// Use the new font #6 I created just for these labels (so far).
// Set the label's font.
- label->setFont(MusEConfig::config.fonts[6]);
+ label->setFont(MusEGlobal::config.fonts[6]);
// Dealing with a horizontally constrained label. Ignore vertical. Use a minimum readable point size.
- MusEUtil::autoAdjustFontSize(label, label->text(), false, true, MusEConfig::config.fonts[6].pointSize(), 5);
+ MusECore::autoAdjustFontSize(label, label->text(), false, true, MusEGlobal::config.fonts[6].pointSize(), 5);
}
//---------------------------------------------------------
@@ -118,41 +118,41 @@ void Strip::setLabelText()
{
QColor c;
switch(track->type()) {
- case Track::AUDIO_OUTPUT:
+ case MusECore::Track::AUDIO_OUTPUT:
//c = Qt::green;
- c = MusEConfig::config.outputTrackLabelBg;
+ c = MusEGlobal::config.outputTrackLabelBg;
break;
- case Track::AUDIO_GROUP:
+ case MusECore::Track::AUDIO_GROUP:
//c = Qt::yellow;
- c = MusEConfig::config.groupTrackLabelBg;
+ c = MusEGlobal::config.groupTrackLabelBg;
break;
- case Track::AUDIO_AUX:
+ case MusECore::Track::AUDIO_AUX:
//c = QColor(120, 255, 255); // Light blue
- c = MusEConfig::config.auxTrackLabelBg;
+ c = MusEGlobal::config.auxTrackLabelBg;
break;
- case Track::WAVE:
+ case MusECore::Track::WAVE:
//c = Qt::magenta;
- c = MusEConfig::config.waveTrackLabelBg;
+ c = MusEGlobal::config.waveTrackLabelBg;
break;
- case Track::AUDIO_INPUT:
+ case MusECore::Track::AUDIO_INPUT:
//c = Qt::red;
- c = MusEConfig::config.inputTrackLabelBg;
+ c = MusEGlobal::config.inputTrackLabelBg;
break;
- case Track::AUDIO_SOFTSYNTH:
+ case MusECore::Track::AUDIO_SOFTSYNTH:
//c = QColor(255, 130, 0); // Med orange
- c = MusEConfig::config.synthTrackLabelBg;
+ c = MusEGlobal::config.synthTrackLabelBg;
break;
- case Track::MIDI:
+ case MusECore::Track::MIDI:
//c = QColor(0, 160, 255); // Med blue
- c = MusEConfig::config.midiTrackLabelBg;
+ c = MusEGlobal::config.midiTrackLabelBg;
break;
- case Track::DRUM:
+ case MusECore::Track::DRUM:
//c = QColor(0, 160, 255); // Med blue
- c = MusEConfig::config.drumTrackLabelBg;
+ c = MusEGlobal::config.drumTrackLabelBg;
break;
- case Track::NEW_DRUM:
+ case MusECore::Track::NEW_DRUM:
//c = QColor(0, 160, 255); // Med blue
- c = MusEConfig::config.newDrumTrackLabelBg;
+ c = MusEGlobal::config.newDrumTrackLabelBg;
break;
default:
return;
@@ -182,7 +182,7 @@ void Strip::setLabelText()
void Strip::muteToggled(bool val)
{
track->setMute(val);
- song->update(SC_MUTE);
+ MusEGlobal::song->update(SC_MUTE);
}
//---------------------------------------------------------
@@ -191,8 +191,8 @@ void Strip::muteToggled(bool val)
void Strip::soloToggled(bool val)
{
- audio->msgSetSolo(track, val);
- song->update(SC_SOLO);
+ MusEGlobal::audio->msgSetSolo(track, val);
+ MusEGlobal::song->update(SC_SOLO);
}
//---------------------------------------------------------
@@ -200,7 +200,7 @@ void Strip::soloToggled(bool val)
// create mixer strip
//---------------------------------------------------------
-Strip::Strip(QWidget* parent, Track* t)
+Strip::Strip(QWidget* parent, MusECore::Track* t)
: QFrame(parent)
{
_curGridRow = 0;
@@ -244,7 +244,7 @@ Strip::Strip(QWidget* parent, Track* t)
// Moved by Tim. p3.3.9
//setLabelText();
- //label->setFont(MusEConfig::config.fonts[1]);
+ //label->setFont(MusEGlobal::config.fonts[1]);
//printf("Strip::Strip w:%d frw:%d layoutmarg:%d lx:%d ly:%d lw:%d lh:%d\n", STRIP_WIDTH, frameWidth(), layout->margin(), label->x(), label->y(), label->width(), label->height());
@@ -297,7 +297,7 @@ Strip::~Strip()
void Strip::setAutomationType(int t)
{
track->setAutomationType(AutomationType(t));
- song->update(SC_AUTOMATION);
+ MusEGlobal::song->update(SC_AUTOMATION);
}
void Strip::resizeEvent(QResizeEvent* ev)
@@ -309,4 +309,4 @@ void Strip::resizeEvent(QResizeEvent* ev)
}
-} // namespace MusEMixer
+} // namespace MusEGui
diff --git a/muse2/muse/mixer/strip.h b/muse2/muse/mixer/strip.h
index f5749177..5b3b541b 100644
--- a/muse2/muse/mixer/strip.h
+++ b/muse2/muse/mixer/strip.h
@@ -34,18 +34,18 @@
#include "globaldefs.h"
//#include "route.h"
-class Track;
class QLabel;
//class QVBoxLayout;
class QToolButton;
class QGridLayout;
-namespace MusEWidget {
-class ComboBox;
-class Meter;
+namespace MusECore {
+class Track;
}
-namespace MusEMixer {
+namespace MusEGui {
+class ComboBox;
+class Meter;
static const int STRIP_WIDTH = 65;
@@ -57,12 +57,12 @@ class Strip : public QFrame {
Q_OBJECT
protected:
- Track* track;
+ MusECore::Track* track;
QLabel* label;
//QVBoxLayout* layout;
QGridLayout* grid;
int _curGridRow;
- MusEWidget::Meter* meter[MAX_CHANNELS];
+ MusEGui::Meter* meter[MAX_CHANNELS];
QToolButton* record;
QToolButton* solo;
@@ -70,7 +70,7 @@ class Strip : public QFrame {
QToolButton* iR; // Input routing button
QToolButton* oR; // Output routing button
QGridLayout* sliderGrid;
- MusEWidget::ComboBox* autoType;
+ MusEGui::ComboBox* autoType;
void setLabelText();
virtual void resizeEvent(QResizeEvent*);
@@ -88,14 +88,14 @@ class Strip : public QFrame {
virtual void songChanged(int) = 0;
public:
- Strip(QWidget* parent, Track* t);
+ Strip(QWidget* parent, MusECore::Track* t);
~Strip();
void setRecordFlag(bool flag);
- Track* getTrack() const { return track; }
+ MusECore::Track* getTrack() const { return track; }
void setLabelFont();
};
-} // namespace MusEMixer
+} // namespace MusEGui
#endif