qtractor: remove unused patches
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
@@ -1,95 +0,0 @@
|
||||
From e96d295e0d6b36b9b722ad3d4c0b2013e569e9d5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Tue, 3 Oct 2017 21:45:43 +0200
|
||||
Subject: [PATCH 2/2] Add ARM NEON acceleration for time stretch - not yet
|
||||
tested
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
---
|
||||
src/qtractorTimeStretch.cpp | 58 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 58 insertions(+)
|
||||
|
||||
diff --git a/src/qtractorTimeStretch.cpp b/src/qtractorTimeStretch.cpp
|
||||
index 751b9bc..6461b8b 100644
|
||||
--- a/src/qtractorTimeStretch.cpp
|
||||
+++ b/src/qtractorTimeStretch.cpp
|
||||
@@ -121,6 +121,60 @@ static inline float sse_cross_corr (
|
||||
|
||||
#endif
|
||||
|
||||
+#if defined(__ARM_NEON__)
|
||||
+#include "arm_neon.h"
|
||||
+
|
||||
+// NEON enabled version.
|
||||
+static inline float neon_cross_corr (
|
||||
+ const float *pV1, const float *pV2, unsigned int iOverlapLength )
|
||||
+{
|
||||
+ float32x4_t vCorr, vNorm, vTemp;
|
||||
+
|
||||
+ // See notes in sse_cross_corr
|
||||
+
|
||||
+ // Ensure overlapLength is divisible by 8
|
||||
+ // assert((m_iOverlapLength % 8) == 0);
|
||||
+ iOverlapLength >>= 4;
|
||||
+
|
||||
+ // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
|
||||
+ vCorr = vdupq_n_f32(0.0);
|
||||
+ vNorm = vdupq_n_f32(0.0);
|
||||
+
|
||||
+ // Unroll the loop by factor of 4 * 4 operations
|
||||
+ for (unsigned int i = 0; i < iOverlapLength; ++i) {
|
||||
+ // vCorr += pV1[0..3] * pV2[0..3]
|
||||
+ vTemp = vld1q_f32(pV1);
|
||||
+ vCorr = vmlaq_f32(vCorr, vTemp, vld1q_f32(pV2));
|
||||
+ vNorm = vmlaq_f32(vNorm, vTemp, vTemp);
|
||||
+ // vCorr += pV1[4..7] * pV2[4..7]
|
||||
+ vTemp = vld1q_f32(pV1 + 4);
|
||||
+ vCorr = vmlaq_f32(vCorr, vTemp, vld1q_f32(pV2 + 4));
|
||||
+ vNorm = vmlaq_f32(vNorm, vTemp, vTemp);
|
||||
+ // vCorr += pV1[8..11] * pV2[8..11]
|
||||
+ vTemp = vld1q_f32(pV1 + 8);
|
||||
+ vCorr = vmlaq_f32(vCorr, vTemp, vld1q_f32(pV2 + 8));
|
||||
+ vNorm = vmlaq_f32(vNorm, vTemp, vTemp);
|
||||
+ // vCorr += pV1[12..15] * pV2[12..15]
|
||||
+ vTemp = vld1q_f32(pV1 + 12);
|
||||
+ vCorr = vmlaq_f32(vCorr, vTemp, vld1q_f32(pV2 + 12));
|
||||
+ vNorm = vmlaq_f32(vNorm, vTemp, vTemp);
|
||||
+ pV1 += 16;
|
||||
+ pV2 += 16;
|
||||
+ }
|
||||
+
|
||||
+ float pvNorm[4];
|
||||
+ vst1q_f32(pvNorm, vNorm);
|
||||
+ float fNorm = (pvNorm[0] + pvNorm[1] + pvNorm[2] + pvNorm[3]);
|
||||
+
|
||||
+ if (fNorm < 1e-9f) fNorm = 1.0f; // avoid div by zero
|
||||
+
|
||||
+ float pvCorr[4];
|
||||
+ vst1q_f32(pvCorr, vCorr);
|
||||
+ return (pvCorr[0] + pvCorr[1] + pvCorr[2] + pvCorr[3]) / ::sqrtf(fNorm);
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
|
||||
// Standard (slow) version.
|
||||
static inline float std_cross_corr (
|
||||
@@ -167,6 +221,10 @@ qtractorTimeStretch::qtractorTimeStretch (
|
||||
m_pfnCrossCorr = sse_cross_corr;
|
||||
else
|
||||
#endif
|
||||
+#if defined(__ARM_NEON__)
|
||||
+ m_pfnCrossCorr = neon_cross_corr;
|
||||
+ if(false)
|
||||
+#endif
|
||||
m_pfnCrossCorr = std_cross_corr;
|
||||
|
||||
setParameters(iSampleRate);
|
||||
--
|
||||
2.9.5
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
From ee8c6f6e374459078c20d2793cc5821a44ed9948 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Sat, 4 Nov 2017 20:41:50 +0100
|
||||
Subject: [PATCH 1/2] Add qtractorPluginListDocument to save/load plugin-lists
|
||||
to XML
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
For MIDI Import dialog it is necessary to save/load plugin-lists. The easiest
|
||||
way to do is to reuse the code used when saving/loading sessions. To perform
|
||||
save/load only on plugin-lists an own document class has to be created.
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
---
|
||||
src/qtractorPluginListDocument.cpp | 54 ++++++++++++++++++++++++++++++++++++++
|
||||
src/qtractorPluginListDocument.h | 49 ++++++++++++++++++++++++++++++++++
|
||||
src/src.pro | 2 ++
|
||||
3 files changed, 105 insertions(+)
|
||||
create mode 100644 src/qtractorPluginListDocument.cpp
|
||||
create mode 100644 src/qtractorPluginListDocument.h
|
||||
|
||||
diff --git a/src/qtractorPluginListDocument.cpp b/src/qtractorPluginListDocument.cpp
|
||||
new file mode 100644
|
||||
index 0000000..4b895ed
|
||||
--- /dev/null
|
||||
+++ b/src/qtractorPluginListDocument.cpp
|
||||
@@ -0,0 +1,54 @@
|
||||
+// qtractorPluginListDocument.cpp
|
||||
+//
|
||||
+/****************************************************************************
|
||||
+ Copyright (C) 2005-2017, rncbc aka Rui Nuno Capela. All rights reserved.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU General Public License
|
||||
+ as published by the Free Software Foundation; either version 2
|
||||
+ of the License, or (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along
|
||||
+ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+
|
||||
+*****************************************************************************/
|
||||
+
|
||||
+#include "qtractorPluginListDocument.h"
|
||||
+#include "qtractorPlugin.h"
|
||||
+
|
||||
+
|
||||
+// Constructor.
|
||||
+qtractorPluginListDocument::qtractorPluginListDocument(
|
||||
+ QDomDocument *pDocument, qtractorPluginList *pPluginList)
|
||||
+ : qtractorDocument(pDocument, "qtractorPluginList"),
|
||||
+ m_pPluginList(pPluginList)
|
||||
+
|
||||
+{
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
+// Destructor.
|
||||
+qtractorPluginListDocument::~qtractorPluginListDocument()
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+
|
||||
+bool qtractorPluginListDocument::loadElement(QDomElement *pElement)
|
||||
+{
|
||||
+ return m_pPluginList->loadElement(this, pElement);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+bool qtractorPluginListDocument::saveElement(QDomElement *pElement)
|
||||
+{
|
||||
+ return m_pPluginList->saveElement(this, pElement);
|
||||
+}
|
||||
+
|
||||
+// end of qtractorPluginListDocument.cpp
|
||||
diff --git a/src/qtractorPluginListDocument.h b/src/qtractorPluginListDocument.h
|
||||
new file mode 100644
|
||||
index 0000000..57464d7
|
||||
--- /dev/null
|
||||
+++ b/src/qtractorPluginListDocument.h
|
||||
@@ -0,0 +1,49 @@
|
||||
+// qtractorPluginListDocument.h
|
||||
+//
|
||||
+/****************************************************************************
|
||||
+ Copyright (C) 2005-2017, rncbc aka Rui Nuno Capela. All rights reserved.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU General Public License
|
||||
+ as published by the Free Software Foundation; either version 2
|
||||
+ of the License, or (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along
|
||||
+ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+
|
||||
+*****************************************************************************/
|
||||
+
|
||||
+#ifndef __qtractorPluginListDocument_h
|
||||
+#define __qtractorPluginListDocument_h
|
||||
+
|
||||
+#include "qtractorDocument.h"
|
||||
+
|
||||
+// Forward declarations.
|
||||
+class qtractorPluginList;
|
||||
+
|
||||
+class qtractorPluginListDocument : public qtractorDocument
|
||||
+{
|
||||
+public:
|
||||
+
|
||||
+ // Constructor.
|
||||
+ qtractorPluginListDocument(QDomDocument *pDocument, qtractorPluginList *pPluginList);
|
||||
+ // Destructor.
|
||||
+ ~qtractorPluginListDocument();
|
||||
+
|
||||
+ // External storage element overrides.
|
||||
+ virtual bool loadElement (QDomElement *pElement);
|
||||
+ virtual bool saveElement (QDomElement *pElement);
|
||||
+
|
||||
+private:
|
||||
+ qtractorPluginList *m_pPluginList;
|
||||
+};
|
||||
+
|
||||
+#endif // __qtractorPluginListDocument_h
|
||||
+
|
||||
+// end of qtractorPluginListDocument.h
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
index b4bd0e3..949bded 100644
|
||||
--- a/src/src.pro
|
||||
+++ b/src/src.pro
|
||||
@@ -95,6 +95,7 @@ HEADERS += config.h \
|
||||
qtractorPlugin.h \
|
||||
qtractorPluginFactory.h \
|
||||
qtractorPluginCommand.h \
|
||||
+ qtractorPluginListDocument.h \
|
||||
qtractorPluginListView.h \
|
||||
qtractorPropertyCommand.h \
|
||||
qtractorRingBuffer.h \
|
||||
@@ -220,6 +221,7 @@ SOURCES += \
|
||||
qtractorPlugin.cpp \
|
||||
qtractorPluginFactory.cpp \
|
||||
qtractorPluginCommand.cpp \
|
||||
+ qtractorPluginListDocument.cpp \
|
||||
qtractorPluginListView.cpp \
|
||||
qtractorRubberBand.cpp \
|
||||
qtractorScrollView.cpp \
|
||||
--
|
||||
2.9.5
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
||||
From 5702e0b1c514aae433886f8574c0a43de10cde14 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
|
||||
Date: Mon, 27 Nov 2017 18:39:07 +0100
|
||||
Subject: [PATCH 1/2] MidiImportExtender: ensure not to use track properties
|
||||
before they are set
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
src/qtractorMidiImportExtender.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/qtractorMidiImportExtender.cpp b/src/qtractorMidiImportExtender.cpp
|
||||
index ea72b8a..0129d0f 100644
|
||||
--- a/src/qtractorMidiImportExtender.cpp
|
||||
+++ b/src/qtractorMidiImportExtender.cpp
|
||||
@@ -369,7 +369,7 @@ bool qtractorMidiImportExtender::finishTracksForExtension(
|
||||
// import. This indicates from first glance that track is special or
|
||||
// broken or...
|
||||
QString sTrackName;
|
||||
- if (pTrack->midiBank() >= 0 && pTrack->midiProg() >= 0) {
|
||||
+ if (properties.midiBank >= 0 && properties.midiProg >= 0) {
|
||||
// Set track name based upon type set up.
|
||||
switch (m_extendedSettings.eMidiImportTrackNameType) {
|
||||
case Midifile:
|
||||
@@ -395,12 +395,12 @@ bool qtractorMidiImportExtender::finishTracksForExtension(
|
||||
|
||||
const qtractorMidiManager::Banks& banks
|
||||
= list[sInstrumentName];
|
||||
- if (!banks.contains(pTrack->midiBank()))
|
||||
+ if (!banks.contains(properties.midiBank))
|
||||
break;
|
||||
|
||||
// A patch name was found!
|
||||
- const qtractorMidiManager::Progs& progs = banks[pTrack->midiBank()].progs;
|
||||
- sTrackName = progs[pTrack->midiProg()];
|
||||
+ const qtractorMidiManager::Progs& progs = banks[properties.midiBank].progs;
|
||||
+ sTrackName = progs[properties.midiProg];
|
||||
}
|
||||
|
||||
// Drum track's name is fixed - patch names are not really useful at drums.
|
||||
--
|
||||
2.9.5
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From d63c75a654c797360b4f98cba736084a987ab828 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
|
||||
Date: Mon, 27 Nov 2017 19:41:04 +0100
|
||||
Subject: [PATCH 2/2] MidiImportExtender: return track change for midi program
|
||||
change only
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
src/qtractorMidiImportExtender.cpp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qtractorMidiImportExtender.cpp b/src/qtractorMidiImportExtender.cpp
|
||||
index 0129d0f..0e11a7f 100644
|
||||
--- a/src/qtractorMidiImportExtender.cpp
|
||||
+++ b/src/qtractorMidiImportExtender.cpp
|
||||
@@ -338,11 +338,12 @@ bool qtractorMidiImportExtender::finishTracksForExtension(
|
||||
// Midi prog.
|
||||
// Special case for drum-tracks program: Some MIDI files out in the wild do
|
||||
// not set program for drum tracks. Give those a reasonable default.
|
||||
- if (bIsDrumTrack && properties.midiProg < 0) {
|
||||
+ if (bIsDrumTrack && properties.midiProg < 0)
|
||||
// Set standard drums.
|
||||
properties.midiProg = 0;
|
||||
+ // Initial program change was missed likely (plugins did not process).
|
||||
+ if (properties.midiProg >= 0)
|
||||
bOneOrMoreTracksChanged = true;
|
||||
- }
|
||||
|
||||
// Instrument.
|
||||
QString strInstrumentNew = bIsDrumTrack ?
|
||||
--
|
||||
2.9.5
|
||||
|
||||
Reference in New Issue
Block a user