summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2012-12-10 02:31:35 +0000
committerTim E. Real <termtech@rogers.com>2012-12-10 02:31:35 +0000
commitf26abd714f485fa04c3b1480cd0c712403d74e8f (patch)
tree94fe30bf80f32c7defa55bbb8485bff62e9afc0c /muse2
parent4679425f17799eacd79941287c979a10f2e6b990 (diff)
Fix VST names: Use filename if effect name or product name blank.
Fix bug 3594221: End-to-end midi notes don't retrigger. My bad.
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog4
-rw-r--r--muse2/muse/mpevent.cpp2
-rw-r--r--muse2/muse/vst_native.cpp24
-rw-r--r--muse2/muse/widgets/vst_native_editor.cpp14
4 files changed, 30 insertions, 14 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 5c4b3d42..df71c19d 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,7 @@
+09.12.2012:
+ - Fix VST names: Use filename if effect name or product name blank. (Tim)
+ - Fix bug 3594221: End-to-end midi notes don't retrigger. My bad. (Tim)
+ In MEvent::sortingWeight(): Note-ons with zero velocity are really note-offs.
08.12.2012:
- Native VST fixes and changes. (Tim)
Redid cmake options. Please do 'prune' and carefully reconfigure.
diff --git a/muse2/muse/mpevent.cpp b/muse2/muse/mpevent.cpp
index 54546e89..a760be8b 100644
--- a/muse2/muse/mpevent.cpp
+++ b/muse2/muse/mpevent.cpp
@@ -103,6 +103,8 @@ int MEvent::sortingWeight() const
switch(_type)
{
case ME_NOTEON:
+ if(_b == 0) // Is it really a note off?
+ return 7;
return 98;
case ME_NOTEOFF:
return 7;
diff --git a/muse2/muse/vst_native.cpp b/muse2/muse/vst_native.cpp
index 8cc16227..4cfc6113 100644
--- a/muse2/muse/vst_native.cpp
+++ b/muse2/muse/vst_native.cpp
@@ -302,6 +302,7 @@ static void scanVstNativeLib(QFileInfo& fi)
QString effectName;
QString vendorString;
QString productString;
+ int vendorVersion;
std::vector<Synth*>::iterator is;
int vst_version = 0;
VstNativeSynth* new_synth = NULL;
@@ -382,6 +383,14 @@ static void scanVstNativeLib(QFileInfo& fi)
plugin->dispatcher(plugin, effGetProductString, 0, 0, buffer, 0);
if (buffer[0])
productString = QString(buffer);
+
+ vendorVersion = plugin->dispatcher(plugin, effGetVendorVersion, 0, 0, NULL, 0);
+
+ if(effectName.isEmpty())
+ effectName = fi.completeBaseName();
+ if(productString.isEmpty())
+ //productString = fi.completeBaseName();
+ productString = effectName;
// Make sure it doesn't already exist.
for(is = MusEGlobal::synthis.begin(); is != MusEGlobal::synthis.end(); ++is)
@@ -397,7 +406,7 @@ static void scanVstNativeLib(QFileInfo& fi)
goto _ending;
}
- new_synth = new VstNativeSynth(fi, plugin, effectName, productString, vendorString, QString()); // TODO Version string?
+ new_synth = new VstNativeSynth(fi, plugin, effectName, productString, vendorString, QString::number(vendorVersion));
if(MusEGlobal::debugMsg)
fprintf(stderr, "scanVstNativeLib: adding vst synth plugin:%s name:%s effectName:%s vendorString:%s productString:%s vstver:%d\n",
@@ -1019,9 +1028,9 @@ VstIntPtr VstNativeSynthIF::hostCallback(VstInt32 opcode, VstInt32 index, VstInt
case audioMasterCanDo:
// string in ptr, see below
if(!strcmp((char*)ptr, "sendVstEvents") ||
- !strcmp((char*)ptr, "receiveVstMidiEvent") ||
+ // !strcmp((char*)ptr, "receiveVstMidiEvent") || // TODO
!strcmp((char*)ptr, "sendVstMidiEvent") ||
- !strcmp((char*)ptr, "sendVstTimeInfo") ||
+ // !strcmp((char*)ptr, "sendVstTimeInfo") || // TODO
!strcmp((char*)ptr, "sizeWindow") ||
!strcmp((char*)ptr, "supplyIdle"))
return 1;
@@ -1228,15 +1237,6 @@ void VstNativeSynthIF::showNativeGui(bool v)
| Qt::WindowCloseButtonHint;
_editor = new MusEGui::VstNativeEditor(NULL, wflags);
_editor->open(this);
-
- // TODO TEST Test if these might be helpful, especially opaque event.
- // _editor->setBackgroundRole(QPalette::NoRole);
- // _editor->setAttribute(Qt::WA_NoSystemBackground);
- // _editor->setAttribute(Qt::WA_StaticContents);
- // // This is absolutely required for speed! Otherwise painfully slow because of full background
- // // filling, even when requesting small udpdates! Background is drawn by us.
- // _editor->setAttribute(Qt::WA_OpaquePaintEvent);
- // //_editor->setFrameStyle(QFrame::Raised | QFrame::StyledPanel);
}
}
else
diff --git a/muse2/muse/widgets/vst_native_editor.cpp b/muse2/muse/widgets/vst_native_editor.cpp
index 8f739041..9c5b59d1 100644
--- a/muse2/muse/widgets/vst_native_editor.cpp
+++ b/muse2/muse/widgets/vst_native_editor.cpp
@@ -87,6 +87,15 @@ VstNativeEditor::VstNativeEditor(QWidget *parent, Qt::WindowFlags wflags)
_sif(0)
{
setAttribute(Qt::WA_DeleteOnClose);
+
+ // TODO TEST Test if these might be helpful, especially opaque event.
+ //setBackgroundRole(QPalette::NoRole);
+ //setAttribute(Qt::WA_NoSystemBackground);
+ // setAttribute(Qt::WA_StaticContents);
+ // // This is absolutely required for speed! Otherwise painfully slow because of full background
+ // // filling, even when requesting small udpdates! Background is drawn by us.
+ //setAttribute(Qt::WA_OpaquePaintEvent);
+ // //setFrameStyle(QFrame::Raised | QFrame::StyledPanel);
}
VstNativeEditor::~VstNativeEditor()
@@ -123,8 +132,9 @@ void VstNativeEditor::open(MusECore::VstNativeSynthIF* sif)
QWidget::setFixedSize(w, h);
}
- _sif->dispatch(effEditOpen, 0, value, ptr, 0.0f);
-
+ int rv = _sif->dispatch(effEditOpen, 0, value, ptr, 0.0f);
+ //fprintf(stderr, "VstNativeEditor::open effEditOpen returned:%d effEditGetRect rect l:%d r:%d t:%d b:%d\n", rv, pRect->left, pRect->right, pRect->top, pRect->bottom); // REMOVE Tim.
+
#if defined(Q_WS_X11)
_vstEditor = getXChildWindow(_display, (Window) winId());
if(_vstEditor)