diff options
author | Werner Schweer <ws.seh.de> | 2006-11-24 18:04:53 +0000 |
---|---|---|
committer | Werner Schweer <ws.seh.de> | 2006-11-24 18:04:53 +0000 |
commit | 53ec5d7c359e777fa1ed239ab73603d161070344 (patch) | |
tree | 937f80279be7cf8078a07f28123b674c3b888a5c | |
parent | aa8d044363ce8a9a85272ad5cea7362dd5405f1f (diff) |
dssi fixes
-rw-r--r-- | muse/muse/dssihost.cpp | 46 | ||||
-rw-r--r-- | muse/muse/dssihost.h | 11 | ||||
-rw-r--r-- | muse/muse/muse.cpp | 14 | ||||
-rw-r--r-- | muse/muse/shortcuts.cpp | 2 | ||||
-rw-r--r-- | muse/muse/songfile.cpp | 6 |
5 files changed, 38 insertions, 41 deletions
diff --git a/muse/muse/dssihost.cpp b/muse/muse/dssihost.cpp index 579a3642..2c0ef207 100644 --- a/muse/muse/dssihost.cpp +++ b/muse/muse/dssihost.cpp @@ -312,8 +312,13 @@ void DssiSynthIF::showGui(bool v) { if (v == guiVisible()) return; + for (int i = 0; i < 5; ++i) { + if (uiOscPath) + break; + sleep(1); + } if (uiOscPath == 0) { - printf("no uiOscPath\n"); + printf("DssiSynthIF::showGui(): no uiOscPath\n"); return; } char uiOscGuiPath[strlen(uiOscPath)+6]; @@ -363,6 +368,23 @@ bool DssiSynthIF::init(DssiSynth* s) } //--------------------------------------------------------- +// DssiSynthIF +//--------------------------------------------------------- + +DssiSynthIF::DssiSynthIF(SynthI* s) + : SynthIF(s) + { + _guiVisible = false; + uiTarget = 0; + uiOscShowPath = 0; + uiOscControlPath = 0; + uiOscConfigurePath = 0; + uiOscProgramPath = 0; + uiOscPath = 0; + guiPid = -1; + } + +//--------------------------------------------------------- // ~DssiSynthIF //--------------------------------------------------------- @@ -445,8 +467,7 @@ void DssiSynthIF::getData(MidiEventList* el, unsigned pos, int ch, unsigned samp dssi->select_program(handle, bank, prog); break; } -//printf("ctrl %x %d = %d\n", a, a, b); -// snd_seq_ev_set_controller(event, chn, a, b); + snd_seq_ev_set_controller(event, chn, a, b); break; case ME_PITCHBEND: snd_seq_ev_set_pitchbend(event, chn, a); @@ -624,22 +645,9 @@ int DssiSynthIF::oscProgram(lo_arg** argv) { int bank = argv[0]->i; int program = argv[1]->i; - CVal cval; - cval.i = (bank << 8) + program; - -printf("received oscProgram\n"); -#if 0 //TD - MidiTrackList* tl = song->midis(); - for (iMidiTrack i = tl->begin(); i != tl->end(); ++i) { - MidiTrack* t = *i; - MidiPort* port = &midiPorts[t->outPort()]; - MidiDevice* dev = port->device(); - if (dev == synti) { - song->setControllerVal(t, CTRL_PROGRAM, cval); - break; - } - } -#endif + int ch = 0; // TODO: ?? + MidiEvent event(0, ch, ME_CONTROLLER, CTRL_PROGRAM, (bank << 8) + program); + synti->playMidiEvent(&event); return 0; } diff --git a/muse/muse/dssihost.h b/muse/muse/dssihost.h index 272448d5..0ec251ac 100644 --- a/muse/muse/dssihost.h +++ b/muse/muse/dssihost.h @@ -86,16 +86,7 @@ class DssiSynthIF : public SynthIF int guiPid; public: - DssiSynthIF(SynthI* s) : SynthIF(s) { - _guiVisible = false; - uiTarget = 0; - uiOscShowPath = 0; - uiOscControlPath = 0; - uiOscConfigurePath = 0; - uiOscProgramPath = 0; - uiOscPath = 0; - guiPid = -1; - } + DssiSynthIF(SynthI* s); virtual ~DssiSynthIF(); virtual bool guiVisible() const; diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index a5eef6ce..df4f9a51 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -1538,7 +1538,7 @@ void MusE::startPianoroll(PartList* pl) { PianoRoll* pianoroll = new PianoRoll(pl, false); pianoroll->show(); - connect(muse, SIGNAL(configChanged()), pianoroll, SLOT(configChanged())); +// connect(muse, SIGNAL(configChanged()), pianoroll, SLOT(configChanged())); } //--------------------------------------------------------- @@ -1582,11 +1582,11 @@ void MusE::startMidiTrackerEditor() } void MusE::startMidiTrackerEditor(PartList* pl) -{ - MidiTrackerEditor* miditracker = new MidiTrackerEditor(pl, false); - miditracker->show(); - connect(muse, SIGNAL(configChanged()), miditracker, SLOT(configChanged())); -} + { + MidiTrackerEditor* miditracker = new MidiTrackerEditor(pl, false); + miditracker->show(); + connect(muse, SIGNAL(configChanged()), miditracker, SLOT(configChanged())); + } //--------------------------------------------------------- // startMasterEditor @@ -1625,7 +1625,7 @@ void MusE::startDrumEditor(PartList* pl) { DrumEdit* drumEditor = new DrumEdit(pl, false); drumEditor->show(); - connect(muse, SIGNAL(configChanged()), drumEditor, SLOT(configChanged())); +// connect(muse, SIGNAL(configChanged()), drumEditor, SLOT(configChanged())); } //--------------------------------------------------------- diff --git a/muse/muse/shortcuts.cpp b/muse/muse/shortcuts.cpp index 0df5f43e..a73b757f 100644 --- a/muse/muse/shortcuts.cpp +++ b/muse/muse/shortcuts.cpp @@ -998,7 +998,7 @@ void readShortCuts(QDomNode node) if (s) s->key = QKeySequence::fromString(e.text(), QKeySequence::PortableText); else - printf("MusE:readShortCuts: unknown tag %s\n", e.tagName().toLatin1().data()); + printf("MusE:readShortCuts: unknown tag <%s>\n", e.tagName().toLatin1().data()); } } diff --git a/muse/muse/songfile.cpp b/muse/muse/songfile.cpp index e12bb790..47aadff3 100644 --- a/muse/muse/songfile.cpp +++ b/muse/muse/songfile.cpp @@ -38,8 +38,6 @@ #include "midiedit/pianoroll.h" #include "part.h" #include "marker/markerview.h" -// #include "midioutport.h" -// #include "midiinport.h" #include "liste/listedit.h" //--------------------------------------------------------- @@ -90,14 +88,14 @@ void MusE::readToplevels(QDomNode node) } else if (tag == "PianoRoll") { PianoRoll* pianoroll = new PianoRoll(pl, true); - connect(muse, SIGNAL(configChanged()), pianoroll, SLOT(configChanged())); +// connect(muse, SIGNAL(configChanged()), pianoroll, SLOT(configChanged())); pianoroll->read(node); pianoroll->show(); pl = new PartList; } else if (tag == "DrumEdit") { DrumEdit* drumEditor = new DrumEdit(pl, true); - connect(muse, SIGNAL(configChanged()), drumEditor, SLOT(configChanged())); +// connect(muse, SIGNAL(configChanged()), drumEditor, SLOT(configChanged())); drumEditor->read(node); drumEditor->show(); pl = new PartList; |