summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/audio.cpp39
-rw-r--r--muse2/muse/audio.h32
-rw-r--r--muse2/muse/midiseq.cpp22
-rw-r--r--muse2/muse/seqmsg.cpp160
-rw-r--r--muse2/muse/widgets/mtrackinfo.cpp12
5 files changed, 3 insertions, 262 deletions
diff --git a/muse2/muse/audio.cpp b/muse2/muse/audio.cpp
index 914ff506..4eabe8ac 100644
--- a/muse2/muse/audio.cpp
+++ b/muse2/muse/audio.cpp
@@ -81,31 +81,21 @@ const char* seqMsgList[] = {
"SEQM_ADD_PART", "SEQM_REMOVE_PART",
"SEQM_ADD_EVENT", "SEQM_REMOVE_EVENT", "SEQM_CHANGE_EVENT",
"SEQM_ADD_TEMPO", "SEQM_SET_TEMPO", "SEQM_REMOVE_TEMPO", "SEQM_ADD_SIG", "SEQM_REMOVE_SIG",
+ "SEQM_ADD_KEY", "SEQM_REMOVE_KEY",
"SEQM_SET_GLOBAL_TEMPO",
"SEQM_UNDO", "SEQM_REDO",
"SEQM_RESET_DEVICES", "SEQM_INIT_DEVICES", "SEQM_PANIC",
"SEQM_MIDI_LOCAL_OFF",
- "SEQM_SET_MIDI_DEVICE",
"SEQM_PLAY_MIDI_EVENT",
"SEQM_SET_HW_CTRL_STATE",
"SEQM_SET_HW_CTRL_STATES",
- "SEQM_SET_TRACK_OUT_PORT",
- "SEQM_SET_TRACK_OUT_CHAN",
"SEQM_SET_TRACK_AUTO_TYPE",
- "SEQM_REMAP_PORT_DRUM_CTL_EVS",
- "SEQM_CHANGE_ALL_PORT_DRUM_CTL_EVS",
- "SEQM_SCAN_ALSA_MIDI_PORTS",
"SEQM_SET_AUX",
"SEQM_UPDATE_SOLO_STATES",
- //"MIDI_SHOW_INSTR_GUI", DELETETHIS
- //"MIDI_SHOW_INSTR_NATIVE_GUI", DELETETHIS
"AUDIO_RECORD",
"AUDIO_ROUTEADD", "AUDIO_ROUTEREMOVE", "AUDIO_REMOVEROUTES",
- //"AUDIO_VOL", "AUDIO_PAN", DELETETHIS
"AUDIO_ADDPLUGIN",
- "AUDIO_SET_SEG_SIZE",
"AUDIO_SET_PREFADER", "AUDIO_SET_CHANNELS",
- //"AUDIO_SET_PLUGIN_CTRL_VAL", DELETETHIS
"AUDIO_SWAP_CONTROLLER_IDX",
"AUDIO_CLEAR_CONTROLLER_EVENTS",
"AUDIO_SEEK_PREV_AC_EVENT",
@@ -688,17 +678,6 @@ void Audio::processMsg(AudioMsg* msg)
MusEGlobal::midiLearnCtrl = -1;
break;
- case AUDIO_SET_SEG_SIZE:
- MusEGlobal::segmentSize = msg->ival;
- MusEGlobal::sampleRate = msg->iival;
-#if 0 //TODO or DELETETHIS ?
- audioOutput.MusEGlobal::segmentSizeChanged();
- for (int i = 0; i < mixerGroups; ++i)
- audioGroups[i].MusEGlobal::segmentSizeChanged();
- for (iSynthI ii = synthiInstances.begin(); ii != synthiInstances.end();++ii)
- (*ii)->MusEGlobal::segmentSizeChanged();
-#endif
- break;
case SEQM_RESET_DEVICES:
for (int i = 0; i < MIDI_PORTS; ++i)
@@ -735,16 +714,6 @@ void Audio::processMsg(AudioMsg* msg)
port->setHwCtrlStates(msg->a, msg->b, msg->c, msg->ival);
}
break;
- case SEQM_SCAN_ALSA_MIDI_PORTS:
- alsaScanMidiPorts();
- break;
- //DELETETHIS 6
- //case MIDI_SHOW_INSTR_GUI:
- // MusEGlobal::midiSeq->msgUpdatePollFd();
- // break;
- //case MIDI_SHOW_INSTR_NATIVE_GUI:
- // MusEGlobal::midiSeq->msgUpdatePollFd();
- // break;
case SEQM_ADD_TEMPO:
case SEQM_REMOVE_TEMPO:
case SEQM_SET_GLOBAL_TEMPO:
@@ -762,12 +731,6 @@ void Audio::processMsg(AudioMsg* msg)
frameOffset = syncFrame - samplePos;
}
break;
- case SEQM_SET_TRACK_OUT_CHAN:
- case SEQM_SET_TRACK_OUT_PORT:
- case SEQM_REMAP_PORT_DRUM_CTL_EVS:
- case SEQM_CHANGE_ALL_PORT_DRUM_CTL_EVS:
- MusEGlobal::midiSeq->sendMsg(msg);
- break;
case SEQM_SET_TRACK_AUTO_TYPE:
msg->track->setAutomationType(AutomationType(msg->ival));
diff --git a/muse2/muse/audio.h b/muse2/muse/audio.h
index e8d22f78..4b81bb2a 100644
--- a/muse2/muse/audio.h
+++ b/muse2/muse/audio.h
@@ -70,27 +70,16 @@ enum {
SEQM_UNDO, SEQM_REDO,
SEQM_RESET_DEVICES, SEQM_INIT_DEVICES, SEQM_PANIC,
SEQM_MIDI_LOCAL_OFF,
- SEQM_SET_MIDI_DEVICE,
SEQM_PLAY_MIDI_EVENT,
SEQM_SET_HW_CTRL_STATE,
SEQM_SET_HW_CTRL_STATES,
- SEQM_SET_TRACK_OUT_PORT,
- SEQM_SET_TRACK_OUT_CHAN,
SEQM_SET_TRACK_AUTO_TYPE,
- SEQM_REMAP_PORT_DRUM_CTL_EVS,
- SEQM_CHANGE_ALL_PORT_DRUM_CTL_EVS,
- SEQM_SCAN_ALSA_MIDI_PORTS,
SEQM_SET_AUX,
SEQM_UPDATE_SOLO_STATES,
- //MIDI_SHOW_INSTR_GUI, DELETETHIS
- //MIDI_SHOW_INSTR_NATIVE_GUI, DELETETHIS
AUDIO_RECORD,
AUDIO_ROUTEADD, AUDIO_ROUTEREMOVE, AUDIO_REMOVEROUTES,
- //AUDIO_VOL, AUDIO_PAN, DELETETHIS
AUDIO_ADDPLUGIN,
- AUDIO_SET_SEG_SIZE,
AUDIO_SET_PREFADER, AUDIO_SET_CHANNELS,
- //AUDIO_SET_PLUGIN_CTRL_VAL, DELETETHIS
AUDIO_SWAP_CONTROLLER_IDX,
AUDIO_CLEAR_CONTROLLER_EVENTS,
AUDIO_SEEK_PREV_AC_EVENT,
@@ -240,19 +229,16 @@ class Audio {
void msgAddEvent(Event&, Part*, bool u = true, bool doCtrls = true, bool doClones = false);
void msgDeleteEvent(Event&, Part*, bool u = true, bool doCtrls = true, bool doClones = false);
void msgChangeEvent(Event&, Event&, Part*, bool u = true, bool doCtrls = true, bool doClones = false);
- void msgScanAlsaMidiPorts();
void msgAddTempo(int tick, int tempo, bool doUndoFlag = true);
void msgSetTempo(int tick, int tempo, bool doUndoFlag = true);
+ void msgDeleteTempo(int tick, int tempo, bool doUndoFlag = true);
void msgUpdateSoloStates();
void msgSetAux(AudioTrack*, int, double);
void msgSetGlobalTempo(int val);
- void msgDeleteTempo(int tick, int tempo, bool doUndoFlag = true);
void msgAddSig(int tick, int z, int n, bool doUndoFlag = true);
void msgRemoveSig(int tick, int z, int n, bool doUndoFlag = true);
void msgAddKey(int tick, int key, bool doUndoFlag = true);
void msgRemoveKey(int tick, int key, bool doUndoFlag = true);
- //void msgShowInstrumentGui(MidiInstrument*, bool); DELETETHIS
- //void msgShowInstrumentNativeGui(MidiInstrument*, bool); DELETETHIS
void msgPanic();
void sendMsg(AudioMsg*);
bool sendMessage(AudioMsg* m, bool doUndo);
@@ -263,15 +249,8 @@ class Audio {
void msgAddRoute(Route, Route);
void msgAddRoute1(Route, Route);
void msgAddPlugin(AudioTrack*, int idx, PluginI* plugin);
- void msgSetMute(AudioTrack*, bool val);
- //void msgSetVolume(AudioTrack*, double val); DELETETHIS
- //void msgSetPan(AudioTrack*, double val); DELETETHIS
- void msgAddSynthI(SynthI* synth);
- void msgRemoveSynthI(SynthI* synth);
- void msgSetSegSize(int, int);
void msgSetPrefader(AudioTrack*, int);
void msgSetChannels(AudioTrack*, int);
- void msgSetOff(AudioTrack*, bool);
void msgSetRecord(AudioTrack*, bool);
void msgUndo();
void msgRedo();
@@ -280,7 +259,6 @@ class Audio {
void msgResetMidiDevices();
void msgIdle(bool);
void msgBounce();
- //void msgSetPluginCtrlVal(AudioTrack*, int /*param*/, double /*val*/); DELETETHIS
void msgSwapControllerIDX(AudioTrack*, int, int);
void msgClearControllerEvents(AudioTrack*, int);
void msgSeekPrevACEvent(AudioTrack*, int);
@@ -292,17 +270,11 @@ class Audio {
void msgSetSolo(Track*, bool);
void msgSetHwCtrlState(MidiPort*, int, int, int);
void msgSetHwCtrlStates(MidiPort*, int, int, int, int);
- void msgSetTrackOutChannel(MidiTrack*, int);
- void msgSetTrackOutPort(MidiTrack*, int);
void msgSetTrackAutomationType(Track*, int);
- void msgRemapPortDrumCtlEvents(int, int, int, int);
- void msgChangeAllPortDrumCtrlEvents(bool, bool);
void msgSetSendMetronome(AudioTrack*, bool);
void msgStartMidiLearn();
-
void msgPlayMidiEvent(const MidiPlayEvent* event);
- void rescanAlsaPorts();
-
+
void midiPortsChanged();
const Pos& pos() const { return _pos; }
diff --git a/muse2/muse/midiseq.cpp b/muse2/muse/midiseq.cpp
index a2cb5c35..f6463d59 100644
--- a/muse2/muse/midiseq.cpp
+++ b/muse2/muse/midiseq.cpp
@@ -99,28 +99,6 @@ void MidiSeq::processMsg(const ThreadMsg* m)
break;
- case MusECore::SEQM_SET_TRACK_OUT_CHAN:
- {
- MidiTrack* track = (MidiTrack*)(msg->p1);
- track->setOutChanAndUpdate(msg->a);
- }
- break;
- case MusECore::SEQM_SET_TRACK_OUT_PORT:
- {
- MidiTrack* track = (MidiTrack*)(msg->p1);
- track->setOutPortAndUpdate(msg->a);
- }
- break;
- case MusECore::SEQM_REMAP_PORT_DRUM_CTL_EVS:
- MusEGlobal::song->remapPortDrumCtrlEvents(msg->ival, msg->a, msg->b, msg->c);
- break;
- case MusECore::SEQM_CHANGE_ALL_PORT_DRUM_CTL_EVS:
- MusEGlobal::song->changeAllPortDrumCtrlEvents((bool)msg->a, (bool)msg->b);
- break;
- case MusECore::SEQM_SET_MIDI_DEVICE:
- ((MidiPort*)(msg->p1))->setMidiDevice((MidiDevice*)(msg->p2));
- updatePollFd();
- break;
case MusECore::SEQM_IDLE:
idle = msg->a;
break;
diff --git a/muse2/muse/seqmsg.cpp b/muse2/muse/seqmsg.cpp
index 61714b98..4a51e7ce 100644
--- a/muse2/muse/seqmsg.cpp
+++ b/muse2/muse/seqmsg.cpp
@@ -319,38 +319,6 @@ void Audio::msgSetRecord(AudioTrack* node, bool val)
sendMsg(&msg);
}
-/* DELETETHIS 34
-//---------------------------------------------------------
-// msgSetVolume
-//---------------------------------------------------------
-
-void Audio::msgSetVolume(AudioTrack* src, double val)
- {
- AudioMsg msg;
- msg.id = AUDIO_VOL;
- msg.snode = src;
- msg.dval = val;
- sendMsg(&msg);
- //muse->arranger->controllerChanged(src);
- MusEGlobal::song->controllerChange(src);
- }
-
-//---------------------------------------------------------
-// msgSetPan
-//---------------------------------------------------------
-
-void Audio::msgSetPan(AudioTrack* node, double val)
- {
- AudioMsg msg;
- msg.id = AUDIO_PAN;
- msg.snode = node;
- msg.dval = val;
- sendMsg(&msg);
- //muse->arranger->controllerChanged(node);
- MusEGlobal::song->controllerChange(node);
- }
-*/
-
//---------------------------------------------------------
// msgSetPrefader
//---------------------------------------------------------
@@ -492,26 +460,6 @@ void Audio::msgSetChannels(AudioTrack* node, int n)
sendMsg(&msg);
}
-/* DELETETHIS 20
-//---------------------------------------------------------
-// msgSetPluginCtrlVal
-//---------------------------------------------------------
-
-void Audio::msgSetPluginCtrlVal(AudioTrack* track, int param, double val)
-{
- AudioMsg msg;
-
- msg.id = AUDIO_SET_PLUGIN_CTRL_VAL;
- msg.ival = param;
- msg.dval = val;
- //msg.plugin = plugin;
- msg.snode = track;
- sendMsg(&msg);
- //muse->arranger->controllerChanged(track);
- MusEGlobal::song->controllerChange(track);
-}
-*/
-
//---------------------------------------------------------
// msgSwapControllerIDX
//---------------------------------------------------------
@@ -646,18 +594,6 @@ void Audio::msgSetSolo(Track* track, bool val)
sendMsg(&msg);
}
-//---------------------------------------------------------
-// msgSetSegSize
-//---------------------------------------------------------
-
-void Audio::msgSetSegSize(int bs, int sr)
- {
- AudioMsg msg;
- msg.id = AUDIO_SET_SEG_SIZE;
- msg.ival = bs;
- msg.iival = sr;
- sendMsg(&msg);
- }
//---------------------------------------------------------
// msgSeek
@@ -714,38 +650,6 @@ void Audio::msgPlay(bool val)
}
}
-/* DELETETHIS 31
-//---------------------------------------------------------
-// msgShowInstrumentGui
-//---------------------------------------------------------
-
-void Audio::msgShowInstrumentGui(MidiInstrument* instr, bool val)
- {
- instr->showGui(val);
- // No need for this - it called msgUpdatePollFd which has nothing
- // to do with showing a gui.
- //AudioMsg msg;
- //msg.id = MIDI_SHOW_INSTR_GUI;
- //msg.p1 = instr;
- //msg.a = val;
- //sendMessage(&msg, false);
- }
-
-//---------------------------------------------------------
-// msgShowInstrumentNativeGui
-//---------------------------------------------------------
-
-void Audio::msgShowInstrumentNativeGui(MidiInstrument* instr, bool val)
- {
- instr->showNativeGui(val);
- //AudioMsg msg;
- //msg.id = MIDI_SHOW_INSTR_NATIVE_GUI;
- //msg.p1 = instr;
- //msg.a = val;
- //sendMessage(&msg, false);
- }
-*/
-
//---------------------------------------------------------
// msgAddTrack
//---------------------------------------------------------
@@ -1075,16 +979,6 @@ void Audio::msgRemoveKey(int tick, int key, bool doUndoFlag)
sendMessage(&msg, doUndoFlag);
}
-//---------------------------------------------------------
-// msgScanAlsaMidiPorts
-//---------------------------------------------------------
-
-void Audio::msgScanAlsaMidiPorts()
- {
- AudioMsg msg;
- msg.id = SEQM_SCAN_ALSA_MIDI_PORTS;
- sendMessage(&msg, false);
- }
//---------------------------------------------------------
// msgResetMidiDevices
@@ -1270,32 +1164,6 @@ void Audio::msgSetHwCtrlStates(MidiPort* port, int ch, int ctrl, int val, int la
}
//---------------------------------------------------------
-// msgSetTrackOutChannel
-//---------------------------------------------------------
-
-void Audio::msgSetTrackOutChannel(MidiTrack* track, int ch)
-{
- AudioMsg msg;
- msg.id = SEQM_SET_TRACK_OUT_CHAN;
- msg.p1 = track;
- msg.a = ch;
- sendMessage(&msg, false);
-}
-
-//---------------------------------------------------------
-// msgSetTrackOutPort
-//---------------------------------------------------------
-
-void Audio::msgSetTrackOutPort(MidiTrack* track, int port)
-{
- AudioMsg msg;
- msg.id = SEQM_SET_TRACK_OUT_PORT;
- msg.p1 = track;
- msg.a = port;
- sendMessage(&msg, false);
-}
-
-//---------------------------------------------------------
// msgSetTrackAutomationType
//---------------------------------------------------------
@@ -1309,34 +1177,6 @@ void Audio::msgSetTrackAutomationType(Track* track, int type)
}
//---------------------------------------------------------
-// msgRemapPortDrumCtlEvents
-//---------------------------------------------------------
-
-void Audio::msgRemapPortDrumCtlEvents(int mapidx, int newnote, int newchan, int newport)
-{
- AudioMsg msg;
- msg.id = SEQM_REMAP_PORT_DRUM_CTL_EVS;
- msg.ival = mapidx;
- msg.a = newnote;
- msg.b = newchan;
- msg.c = newport;
- sendMessage(&msg, false);
-}
-
-//---------------------------------------------------------
-// msgChangeAllPortDrumCtlEvents
-//---------------------------------------------------------
-
-void Audio::msgChangeAllPortDrumCtrlEvents(bool add, bool drumonly)
-{
- AudioMsg msg;
- msg.id = SEQM_CHANGE_ALL_PORT_DRUM_CTL_EVS;
- msg.a = (int)add;
- msg.b = (int)drumonly;
- sendMessage(&msg, false);
-}
-
-//---------------------------------------------------------
// msgSetSendMetronome
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp
index 09d45577..a73eb212 100644
--- a/muse2/muse/widgets/mtrackinfo.cpp
+++ b/muse2/muse/widgets/mtrackinfo.cpp
@@ -682,18 +682,11 @@ void MidiTrackInfo::iOutputChannelChanged(int channel)
MusECore::MidiTrack* track = (MusECore::MidiTrack*)selected;
if (channel != track->outChannel()) {
++_blockHeartbeatCount;
- // Changed by T356.
- //track->setOutChannel(channel);
MusEGlobal::audio->msgIdle(true);
- //audio->msgSetTrackOutChannel(track, channel);
track->setOutChanAndUpdate(channel);
MusEGlobal::audio->msgIdle(false);
- // may result in adding/removing mixer strip:
- //MusEGlobal::song->update(-1);
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP);
MusEGlobal::audio->msgUpdateSoloStates(); // p4.0.14
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP | SC_ROUTE); //
MusEGlobal::song->update(SC_MIDI_TRACK_PROP); //
--_blockHeartbeatCount;
}
@@ -714,16 +707,11 @@ void MidiTrackInfo::iOutputPortChanged(int index)
if (port_num == track->outPort())
return;
++_blockHeartbeatCount;
- // Changed by T356.
- //track->setOutPort(port_num);
MusEGlobal::audio->msgIdle(true);
- //audio->msgSetTrackOutPort(track, port_num);
track->setOutPortAndUpdate(port_num);
MusEGlobal::audio->msgIdle(false);
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP);
MusEGlobal::audio->msgUpdateSoloStates(); // p4.0.14
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP | SC_ROUTE); //
MusEGlobal::song->update(SC_MIDI_TRACK_PROP); //
--_blockHeartbeatCount;
}