From e40fc849149dd97c248866a4a1d026dda5e57b62 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Mon, 7 Mar 2011 19:01:11 +0000 Subject: clean3 --- .../midiplugins/drumglue/CMakeLists.txt | 50 ---- .../midiplugins/drumglue/drumglue.cpp | 250 ------------------ muse_qt4_evolution/midiplugins/drumglue/drumglue.h | 86 ------ .../midiplugins/drumglue/drumgluegui.cpp | 68 ----- .../midiplugins/drumglue/drumgluegui.h | 41 --- .../midiplugins/drumglue/drumgluegui.ui | 91 ------- .../midiplugins/drumglue/globalinstrumentview.cpp | 153 ----------- .../midiplugins/drumglue/globalinstrumentview.h | 41 --- .../midiplugins/drumglue/globalinstrumentview.ui | 102 ------- .../midiplugins/drumglue/outputinstrumentview.cpp | 45 ---- .../midiplugins/drumglue/outputinstrumentview.h | 31 --- .../midiplugins/drumglue/outputinstrumentview.ui | 292 --------------------- 12 files changed, 1250 deletions(-) delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/CMakeLists.txt delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/drumglue.cpp delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/drumglue.h delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/drumgluegui.h delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/drumgluegui.ui delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.cpp delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.h delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.ui delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.h delete mode 100644 muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.ui (limited to 'muse_qt4_evolution/midiplugins/drumglue') diff --git a/muse_qt4_evolution/midiplugins/drumglue/CMakeLists.txt b/muse_qt4_evolution/midiplugins/drumglue/CMakeLists.txt deleted file mode 100644 index f824c54b..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -#============================================================================= -# MusE -# Linux Music Editor -# $Id:$ -# -# Copyright (C) 2002-2008 by Werner Schweer and others -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2. -# -# 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., 675 Mass Ave, Cambridge, MA 02139, USA. -#============================================================================= - -QT4_WRAP_CPP ( drumglue_mocs drumgluegui.h globalinstrumentview.h outputinstrumentview.h ) -QT4_WRAP_UI ( drumglue_uis drumgluegui.ui globalinstrumentview.ui outputinstrumentview.ui ) - -add_library ( drumglue SHARED - drumglue.cpp - drumgluegui.cpp - drumgluegui.h - globalinstrumentview.cpp - globalinstrumentview.h - outputinstrumentview.cpp - outputinstrumentview.h - ${drumglue_mocs} - ${drumglue_uis} - ) - -target_link_libraries( drumglue - midiplugin awl - ${QT_LIBRARIES} - ) - -# - tell cmake to name target name.so instead of -# libname.so -# - use precompiled header files -set_target_properties ( drumglue - PROPERTIES PREFIX "" - COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" - ) - -install_targets ( /${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/midiplugins/ drumglue ) - diff --git a/muse_qt4_evolution/midiplugins/drumglue/drumglue.cpp b/muse_qt4_evolution/midiplugins/drumglue/drumglue.cpp deleted file mode 100644 index 7a9b6ed2..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/drumglue.cpp +++ /dev/null @@ -1,250 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// -// drumglue - filter -// -// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se) -// (C) Copyright 2005- Werner Schweer (ws@seh.de) -// Copyright: See COPYING file that comes with this distribution -//========================================================= - -#include "drumgluegui.h" -#include "drumglue.h" -#include "midi.h" -#include "midievent.h" - - - -//--------------------------------------------------------- -// DrumInstrument - get next index -// - next output instrument to use -//--------------------------------------------------------- -int DrumInstrument::getNextIndex(int /*velocity*/) -{ - // for now we simply do a round robin - // - // future improvements are to keep track of - // the time since the last hit and the - // weight set for each instrument. - // the incoming velocity should be checked that it's in range - if (outputInstruments.size() == 0) - return -1; - - if (lastOutputIndex+1 > outputInstruments.size()-1) - return 0; - else - return lastOutputIndex+1; -} - -//--------------------------------------------------------- -// DrumInstrument - get velocity -// - velocity value to use -//--------------------------------------------------------- -int DrumInstrument::getVelocity(int /*index*/, int velocity) -{ - // for now we just return the same velocity - // future improvements are to allow for some - return velocity; -} - - -//--------------------------------------------------------- -// DrumGlue - constructor -//--------------------------------------------------------- -DrumGlue::DrumGlue(const char* name, const MempiHost* h) - : Mempi(name, h) - { - gui = 0; - saveData = NULL; - } - -//--------------------------------------------------------- -// DrumGlue - destructor -//--------------------------------------------------------- -DrumGlue::~DrumGlue() - { - if (gui) - delete gui; - if (saveData) - delete saveData; - } - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -bool DrumGlue::init() - { - gui = new DrumGlueGui(this, 0); - gui->setWindowTitle("MusE: "+QString(name())); - gui->show(); - return false; - } - -//--------------------------------------------------------- -// getGeometry -//--------------------------------------------------------- - -void DrumGlue::getGeometry(int* x, int* y, int* w, int* h) const - { - QPoint pos(gui->pos()); - QSize size(gui->size()); - *x = pos.x(); - *y = pos.y(); - *w = size.width(); - *h = size.height(); - } - -//--------------------------------------------------------- -// setGeometry -//--------------------------------------------------------- - -void DrumGlue::setGeometry(int x, int y, int w, int h) - { - gui->resize(QSize(w, h)); - gui->move(QPoint(x, y)); - } - -//--------------------------------------------------------- -// process -//--------------------------------------------------------- - -void DrumGlue::process(unsigned , unsigned , MidiEventList* il, MidiEventList* ol) - { - - for (iMidiEvent i = il->begin(); i != il->end(); ++i) { - MidiEvent temp=*i; - if (temp.isNote() && !temp.isNoteOff()) - { - foreach(DrumInstrument *di, drumInstruments) { - if (temp.dataA() == di->inKey) { - int inVelocity = temp.dataB(); - int instrumentIdx = di->getNextIndex(inVelocity); - if (instrumentIdx==-1) { - // no instrument defined, yet, skip it - break; - } - int outKey = di->outputInstruments[instrumentIdx]->outKey; - int outVelocity= di->getVelocity(instrumentIdx, inVelocity); - printf("inKey=%d outKey =%d outVelocity=%d instrumentIdx=%d\n", di->inKey, outKey, outVelocity, instrumentIdx); - temp.setA(outKey); - temp.setB(outVelocity); - - ol->insert(temp); // note on - - temp.setB(0); - ol->insert(temp); // note off - - di->lastOutputIndex = instrumentIdx; - di->outputTime = temp.time(); - break; - } - } - } - if (temp.isNoteOff()) ; // we just throw it away, we will insert noteoffs for each note on - } - } - -// -// getInitData - return configuration to MusE -// -void DrumGlue::getInitData(int* n, const unsigned char** p) const - { - QString saveStr; - - foreach (DrumInstrument *di, drumInstruments) { - QString drumline = "DRUM " +di->name + " " + QString("%1").arg(di->inKey) + "\n"; - saveStr.append(drumline); - foreach (DrumOutputInstrument *doi, di->outputInstruments) { - QString outputline = "OUTPUT " + - QString("%1").arg(doi->outKey) + " " + - QString("%1").arg(doi->lowestVelocity) + " " + - QString("%1").arg(doi->highestVelocity) + " " + - QString("%1").arg(doi->prefer) + " " + - QString("%1").arg(doi->preferFast) + "\n"; - saveStr.append(outputline); - - } - } - - *n = saveStr.length(); - - if (saveData) - delete saveData; - - - saveData = new unsigned char[saveStr.length()]; - - strncpy((char*)saveData, saveStr.toLatin1().data(), saveStr.length()); - saveData[saveStr.length()]=0; - printf("getInitData -\n%s\n",saveData); - - *p = saveData; - - } - -void DrumGlue::setInitData(int n, const unsigned char* p) - { - if (saveData) - delete saveData; - saveData = new unsigned char[n+1]; - - strncpy((char*)saveData,(char*)p,n); - saveData[n]=0; - - QString loadStr = (char*)saveData; - printf("setInitData -\n%s\n",saveData); - - QStringList loadList = loadStr.split("\n"); - - DrumInstrument *currentInstrument=NULL; - foreach (QString line, loadList) { - QStringList splitLine = line.split(" "); - if (splitLine[0] == "DRUM") { - if (currentInstrument) - drumInstruments.append(currentInstrument); - - currentInstrument = new DrumInstrument(); - currentInstrument->name = splitLine[1]; - currentInstrument->inKey = splitLine[2].toInt(); - } - if (splitLine[0] == "OUTPUT") { - DrumOutputInstrument *doi = new DrumOutputInstrument; - doi->outKey = splitLine[1].toInt(); - doi->lowestVelocity = splitLine[2].toInt(); - doi->highestVelocity = splitLine[3].toInt(); - doi->prefer = splitLine[4].toInt(); - doi->preferFast = splitLine[5].toInt(); - currentInstrument->outputInstruments.append(doi); - } - } - if (currentInstrument) - drumInstruments.append(currentInstrument); - - if (gui) - gui->init(); - } - -//--------------------------------------------------------- -// inst -//--------------------------------------------------------- - -static Mempi* instantiate(const char* name, const MempiHost* h) - { - return new DrumGlue(name, h); - } - -extern "C" { - static MEMPI descriptor = { - "DrumGlue", - "Drum instrument mux filter", - "0.1", // filter version string - MEMPI_FILTER, // plugin type - MEMPI_MAJOR_VERSION, MEMPI_MINOR_VERSION, - instantiate - }; - - const MEMPI* mempi_descriptor() { return &descriptor; } - } - diff --git a/muse_qt4_evolution/midiplugins/drumglue/drumglue.h b/muse_qt4_evolution/midiplugins/drumglue/drumglue.h deleted file mode 100644 index 49a19b55..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/drumglue.h +++ /dev/null @@ -1,86 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// -// drumglue - filter -// -// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se) -// (C) Copyright 2005- Werner Schweer (ws@seh.de) -// Copyright: See COPYING file that comes with this distribution -//========================================================= - -#ifndef __DRUMGLUE_H__ -#define __DRUMGLUE_H__ - -#include - -#include "../libmidiplugin/mempi.h" - -#include "drumgluegui.h" -//--------------------------------------------------------- -// drumglue - filter -//--------------------------------------------------------- - -struct DrumOutputInstrument { - int outKey; // key to send - int lowestVelocity; // lower velocity valid for this instrument - int highestVelocity; // highest velocity valid for this instrument - bool prefer; // true if this instrument is preferred - bool preferFast; // true if this instrument is preferred for fast transitions -}; - -class DrumInstrument { - public: - DrumInstrument() - { - inKey=0; - lastOutputIndex=0; - outputTime=0; - } - - int getNextIndex(int velocity); - int getVelocity(int index, int velocity); - - - int inKey; // the key which triggers this instrument - QString name; - QList outputInstruments; - -// storage of runtime variables - int lastOutputIndex; - unsigned int outputTime; -}; - - - - -class DrumGlue : public Mempi { - friend class DrumGlueGui; - friend class GlobalInstrumentView; - friend class OutputInstrumentView; - - QList drumInstruments; - - DrumGlueGui* gui; - - mutable unsigned char *saveData; - - virtual void process(unsigned, unsigned, MidiEventList*, MidiEventList*); - - public: - DrumGlue(const char* name, const MempiHost*); - ~DrumGlue(); - virtual bool init(); - - virtual bool hasGui() const { return true; } - virtual bool guiVisible() const { return gui->isVisible(); } - virtual void showGui(bool val) { gui->setShown(val); } - virtual void getGeometry(int* x, int* y, int* w, int* h) const; - virtual void setGeometry(int, int, int, int); - - virtual void getInitData(int*, const unsigned char**) const; - virtual void setInitData(int, const unsigned char*); - }; - -#endif - diff --git a/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp b/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp deleted file mode 100644 index 562adf2c..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// -// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se) -// (C) Copyright 2005- Werner Schweer (ws@seh.de) -// Copyright: See COPYING file that comes with this distribution -//========================================================= - -#include "drumgluegui.h" -#include "drumglue.h" -#include "globalinstrumentview.h" - -//--------------------------------------------------------- -// DrumGlueGui -//--------------------------------------------------------- - -DrumGlueGui::DrumGlueGui(DrumGlue* f, QWidget* parent) - : QDialog(parent) - { - drumGlue = f; - setupUi(this); - instrumentsTabWidget->clear(); - - connect (addInstrumentButton, SIGNAL(clicked()), this, SLOT(addInstrument())); - } - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- -void DrumGlueGui::init() - { - foreach(DrumInstrument *di, drumGlue->drumInstruments) { - GlobalInstrumentView *giView = new GlobalInstrumentView(drumGlue,this, di->name); - instrumentsTabWidget->addTab(giView, di->name); - } - } - -//--------------------------------------------------------- -// addInstrument -//--------------------------------------------------------- -void DrumGlueGui::addInstrument() - { - bool ok; - QString text = QInputDialog::getText(this, tr("Instrument name"), - tr("Name of instrument:"), QLineEdit::Normal, - "", &ok); - if (ok && !text.isEmpty()) { - DrumInstrument *di = new DrumInstrument(); - di->name = text; - drumGlue->drumInstruments.append(di); - GlobalInstrumentView *giView = new GlobalInstrumentView(drumGlue,this, text); - instrumentsTabWidget->addTab(giView, text); - } - } - -//--------------------------------------------------------- -// removeInstrument -//--------------------------------------------------------- -void DrumGlueGui::removeInstrument() - { - int ret = QMessageBox::warning(this, tr("Remove instrument"), - tr("Are you sure you want to remove current instrument?"), - QMessageBox::No, - QMessageBox::Yes); - if (ret == QMessageBox::Yes) - instrumentsTabWidget->removeTab(instrumentsTabWidget->currentIndex()); - } diff --git a/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.h b/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.h deleted file mode 100644 index cdbac7a3..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.h +++ /dev/null @@ -1,41 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// -// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se) -// (C) Copyright 2005- Werner Schweer (ws@seh.de) -// Copyright: See COPYING file that comes with this distribution -//========================================================= - -#ifndef __DRUMGLUEGUI_H__ -#define __DRUMGLUEGUI_H__ - -//#include "ui_drumglue.h" -#include "ui_drumgluegui.h" - - -//--------------------------------------------------------- -// DrumGlueGui -//--------------------------------------------------------- -class DrumGlue; - -class DrumGlueGui : public QDialog, public Ui::DrumGlueBase { - Q_OBJECT - - DrumGlue* drumGlue; - - signals: - void hideWindow(); - - public: - DrumGlueGui(DrumGlue*, QWidget* parent=0); - void init(); - - private slots: - void addInstrument(); - void removeInstrument(); - - }; - -#endif - diff --git a/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.ui b/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.ui deleted file mode 100644 index ddd402c4..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.ui +++ /dev/null @@ -1,91 +0,0 @@ - - DrumGlueBase - - - - 0 - 0 - 444 - 270 - - - - Drumglue - midi filter - - - - - - - - - - Add instrument - - - - - - - Remove current - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - Arial - 14 - 75 - true - - - - DrumGlue 0.1 - - - - - - - - - QTabWidget::North - - - QTabWidget::Rounded - - - 0 - - - Qt::ElideLeft - - - - Snare - - - - - - - - - - - diff --git a/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.cpp b/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.cpp deleted file mode 100644 index 5ca81054..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.cpp +++ /dev/null @@ -1,153 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// -// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se) -// (C) Copyright 2005- Werner Schweer (ws@seh.de) -// Copyright: See COPYING file that comes with this distribution -//========================================================= - -#include "globalinstrumentview.h" -#include "outputinstrumentview.h" -#include "drumglue.h" - -//--------------------------------------------------------- -// GlobalInstrumentView -//--------------------------------------------------------- - -GlobalInstrumentView::GlobalInstrumentView(DrumGlue* f, QWidget* parent, QString name) - : QWidget(parent) - { - setupUi(this); - drumGlue = f; - - instrumentName=name; - - DrumInstrument *di =getCurrentOutputInstrument(); - printf("di->inKey=%d\n", di->inKey); - if (di) - inKeySpinBox->setValue(di->inKey); - - connect (addOutputButton, SIGNAL(clicked()), this, SLOT(addOutput())); - connect (editOutputButton, SIGNAL(clicked()), this, SLOT(editOutput())); - connect (removeOutputButton, SIGNAL(clicked()), this, SLOT(removeOutput())); - connect (inKeySpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateInKey())); - updateList(); - } - - -DrumInstrument *GlobalInstrumentView::getCurrentOutputInstrument() -{ - // get the global instrument belonging to this instance - QList::iterator iter = drumGlue->drumInstruments.begin(); - while(iter != drumGlue->drumInstruments.end()) { - printf("name = %s instrumentName= %s\n", (*iter)->name.toLatin1().data(), instrumentName.toLatin1().data()); - if ((*iter)->name == instrumentName) { - break; - } - iter++; - } - if (iter == drumGlue->drumInstruments.end()) { - printf("Reached the end without getting a hit\n"); - return NULL; - } - return *iter; -} - -void GlobalInstrumentView::addOutput() - { - DrumInstrument *di = getCurrentOutputInstrument(); - if (!di) - return; - // create new output - DrumOutputInstrument *doi = new DrumOutputInstrument; - di->outputInstruments.append(doi); - - OutputInstrumentView *outputView = new OutputInstrumentView(doi,this); - int res = outputView->exec(); - if (res == QDialog::Rejected) { - // roll back - di->outputInstruments.removeAll(doi); - delete doi; - } - delete outputView; - updateList(); - } - -void GlobalInstrumentView::editOutput() - { - DrumInstrument *di = getCurrentOutputInstrument(); - - int currIdx = outputListWidget->currentRow(); - if (currIdx < 0 || currIdx >= di->outputInstruments.size()) { - printf("out of range!!\n"); - return; - } - - DrumOutputInstrument *doi = di->outputInstruments[currIdx]; - - DrumOutputInstrument doi_backup = *doi; - OutputInstrumentView *outputView = new OutputInstrumentView(doi,this); - int res = outputView->exec(); - if (res == QDialog::Rejected) { - // roll back - *doi = doi_backup; - } - delete outputView; - updateList(); - } - -void GlobalInstrumentView::removeOutput() - { - int ret = QMessageBox::warning(this, tr("Remove output"), - tr("Are you sure you want to remove current output?"), - QMessageBox::No, - QMessageBox::Yes); - if (ret == QMessageBox::Yes) { - DrumInstrument *di = getCurrentOutputInstrument(); - - int currIdx = outputListWidget->currentRow(); - if (currIdx < 0 || currIdx >= di->outputInstruments.size()) { - printf("out of range!!\n"); - return; - } - - DrumOutputInstrument *doi = di->outputInstruments[currIdx]; - di->outputInstruments.removeAll(doi); - delete doi; - } - updateList(); - } - -void GlobalInstrumentView::updateList() -{ - printf("updateList\n"); - outputListWidget->clear(); - - QList::iterator iter = drumGlue->drumInstruments.begin(); - while(iter != drumGlue->drumInstruments.end()) { - printf("name = %s instrumentName= %s\n", (*iter)->name.toLatin1().data(), instrumentName.toLatin1().data()); - if ((*iter)->name == instrumentName) { - printf("updating current list\n"); - foreach (DrumOutputInstrument *doi, (*iter)->outputInstruments) { - QListWidgetItem *outDrumItem = new QListWidgetItem(outputListWidget); - QString str = QString("%1 %2 %3 %4 %5").arg(doi->outKey).arg(doi->lowestVelocity).arg(doi->highestVelocity).arg(doi->prefer).arg(doi->preferFast); - printf("setting item to %s\n",str.toLatin1().data()); - outDrumItem->setText(str); - } - } - iter++; - } -} - -void GlobalInstrumentView::updateInKey() -{ - QList::iterator iter = drumGlue->drumInstruments.begin(); - while(iter != drumGlue->drumInstruments.end()) { - if ((*iter)->name == instrumentName) { - (*iter)->inKey = inKeySpinBox->value(); - } - iter++; - } - -} diff --git a/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.h b/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.h deleted file mode 100644 index f923ec49..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.h +++ /dev/null @@ -1,41 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// -// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se) -// (C) Copyright 2005- Werner Schweer (ws@seh.de) -// Copyright: See COPYING file that comes with this distribution -//========================================================= - -#ifndef __GLOBALINSTRUMENTVIEW_H__ -#define __GLOBALINSTRUMENTVIEW_H__ - -#include "ui_globalinstrumentview.h" - -#include "drumglue.h" -//--------------------------------------------------------- -// GlobalInstrumentView -//--------------------------------------------------------- -class DrumGlue; - -class GlobalInstrumentView : public QWidget, public Ui::GlobalInstrumentViewBase { - Q_OBJECT - - DrumGlue *drumGlue; - QString instrumentName; - DrumInstrument *getCurrentOutputInstrument(); - - public: - GlobalInstrumentView(DrumGlue*, QWidget* parent, QString name); - private slots: - void addOutput(); - void editOutput(); - void removeOutput(); - void updateInKey(); - - public slots: - void updateList(); - }; - -#endif - diff --git a/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.ui b/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.ui deleted file mode 100644 index e817906a..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/globalinstrumentview.ui +++ /dev/null @@ -1,102 +0,0 @@ - - GlobalInstrumentViewBase - - - - 0 - 0 - 386 - 256 - - - - Form - - - - -1 - - - - - -1 - - - - - -1 - - - - - Midi input key: - - - - - - - 1 - - - 127 - - - - - - - Add output - - - - - - - Remove output - - - - - - - Edit output - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Midi output definitions: - - - - - - - - - - - - - - - diff --git a/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp b/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp deleted file mode 100644 index 2e4c97ce..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// $Id: filtergui.cpp,v 1.4 2005/11/06 17:49:34 wschweer Exp $ -// -// (C) Copyright 2005 Werner Schweer (ws@seh.de) -//========================================================= - -#include "outputinstrumentview.h" -#include "drumglue.h" -#include -//--------------------------------------------------------- -// OutputInstrumentView -//--------------------------------------------------------- - -OutputInstrumentView::OutputInstrumentView(DrumOutputInstrument* doi, QWidget* parent) - : QDialog(parent) - { - outputInstrument= doi; - setupUi(this); - - midiOutputSpinBox->setValue(outputInstrument->outKey); - highRangeSlider->setValue(outputInstrument->highestVelocity); - lowRangeSlider->setValue(outputInstrument->lowestVelocity); - preferWhenFastCheckBox->setChecked(outputInstrument->preferFast); - highProbabiltyCheckBox->setChecked(outputInstrument->prefer); - - - connect(midiOutputSpinBox,SIGNAL(valueChanged(int)),this, SLOT(update())); - connect(highRangeSlider,SIGNAL(valueChanged(int)),this, SLOT(update())); - connect(lowRangeSlider,SIGNAL(valueChanged(int)),this, SLOT(update())); - connect(preferWhenFastCheckBox,SIGNAL(stateChanged(int)),this, SLOT(update())); - connect(highProbabiltyCheckBox,SIGNAL(stateChanged(int)),this, SLOT(update())); - } - - -void OutputInstrumentView::update() -{ - outputInstrument->outKey = midiOutputSpinBox->value(); - outputInstrument->highestVelocity = highRangeSlider->value(); - outputInstrument->lowestVelocity = lowRangeSlider->value(); - outputInstrument->preferFast = preferWhenFastCheckBox->isChecked(); - outputInstrument->prefer = highProbabiltyCheckBox->isChecked(); - -} diff --git a/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.h b/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.h deleted file mode 100644 index b2b5dc12..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.h +++ /dev/null @@ -1,31 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// -// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se) -// (C) Copyright 2005- Werner Schweer (ws@seh.de) -// Copyright: See COPYING file that comes with this distribution -//========================================================= - -#ifndef __OUTPUTINSTRUMENTVIEW_H__ -#define __OUTPUTINSTRUMENTVIEW_H__ - -#include "ui_outputinstrumentview.h" - -#include "drumglue.h" -//--------------------------------------------------------- -// OutputInstrumentView -//--------------------------------------------------------- -class DrumGlue; - -class OutputInstrumentView : public QDialog, public Ui::OutputInstrumentViewBase { - Q_OBJECT - DrumOutputInstrument *outputInstrument; - public: - OutputInstrumentView(DrumOutputInstrument*, QWidget* parent); - private slots: - void update(); - }; - -#endif - diff --git a/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.ui b/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.ui deleted file mode 100644 index 250c2010..00000000 --- a/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.ui +++ /dev/null @@ -1,292 +0,0 @@ - - OutputInstrumentViewBase - - - - 0 - 0 - 449 - 150 - - - - Dialog - - - - - - - - - - Midi output key: - - - - - - - 1 - - - 127 - - - - - - - If this instrument is to be used more often than others check this box. - - - - - - Prefer always - - - - - - - If this instrument is to be used more often when used often, check this checkbox. - - - - - - Prefer when fast - - - - - - - - - Qt::Horizontal - - - - - - - - - - 0 - 0 - - - - [low] - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - Qt::RightToLeft - - - [high] - - - - - - - - - - - - - - 24 - 0 - - - - QFrame::Box - - - 1 - - - - - - - 1 - - - 127 - - - Qt::Horizontal - - - - - - - - - use in range - - - - - - - - - - 24 - 0 - - - - QFrame::Box - - - 127 - - - - - - - 1 - - - 127 - - - 127 - - - Qt::Horizontal - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - - - buttonBox - accepted() - OutputInstrumentViewBase - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - OutputInstrumentViewBase - reject() - - - 316 - 260 - - - 286 - 274 - - - - - highRangeSlider - valueChanged(int) - highRangeLabel - setNum(int) - - - 215 - 107 - - - 165 - 108 - - - - - lowRangeSlider - valueChanged(int) - lowRangeLabel - setNum(int) - - - 75 - 107 - - - 25 - 108 - - - - - -- cgit v1.2.3