From e40fc849149dd97c248866a4a1d026dda5e57b62 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Mon, 7 Mar 2011 19:01:11 +0000 Subject: clean3 --- .../midiplugins/trigg/CMakeLists.txt | 47 -------- muse_qt4_evolution/midiplugins/trigg/trigg.cpp | 131 --------------------- muse_qt4_evolution/midiplugins/trigg/trigg.h | 49 -------- muse_qt4_evolution/midiplugins/trigg/trigggui.cpp | 56 --------- muse_qt4_evolution/midiplugins/trigg/trigggui.h | 48 -------- muse_qt4_evolution/midiplugins/trigg/trigggui.ui | 109 ----------------- 6 files changed, 440 deletions(-) delete mode 100644 muse_qt4_evolution/midiplugins/trigg/CMakeLists.txt delete mode 100644 muse_qt4_evolution/midiplugins/trigg/trigg.cpp delete mode 100644 muse_qt4_evolution/midiplugins/trigg/trigg.h delete mode 100644 muse_qt4_evolution/midiplugins/trigg/trigggui.cpp delete mode 100644 muse_qt4_evolution/midiplugins/trigg/trigggui.h delete mode 100644 muse_qt4_evolution/midiplugins/trigg/trigggui.ui (limited to 'muse_qt4_evolution/midiplugins/trigg') diff --git a/muse_qt4_evolution/midiplugins/trigg/CMakeLists.txt b/muse_qt4_evolution/midiplugins/trigg/CMakeLists.txt deleted file mode 100644 index 397ccf81..00000000 --- a/muse_qt4_evolution/midiplugins/trigg/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -#============================================================================= -# MusE -# Linux Music Editor -# $Id:$ -# -# Copyright (C) 2002-2006 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 ( trigg_mocs trigggui.h ) -QT4_WRAP_UI ( trigg_uis trigggui.ui ) - -add_library ( trigg SHARED - trigg.cpp - trigggui.cpp - trigggui.h - ${trigg_mocs} - ${trigg_uis} - ) - -target_link_libraries( trigg - midiplugin awl - ${QT_LIBRARIES} - ) - -# - tell cmake to name target name.so instead of -# libname.so -# - use precompiled header files -# -set_target_properties ( trigg - PROPERTIES PREFIX "" - COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" - ) - -install_targets ( /${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/midiplugins/ trigg ) - diff --git a/muse_qt4_evolution/midiplugins/trigg/trigg.cpp b/muse_qt4_evolution/midiplugins/trigg/trigg.cpp deleted file mode 100644 index fb3703cb..00000000 --- a/muse_qt4_evolution/midiplugins/trigg/trigg.cpp +++ /dev/null @@ -1,131 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// $Id: filter.cpp,v 1.10 2005/11/06 17:49:34 wschweer Exp $ -// -// filter - simple midi filter -// -// (C) Copyright 2005 Werner Schweer (ws@seh.de) -//========================================================= - -#include "trigggui.h" -#include "trigg.h" -#include "midi.h" -#include "midievent.h" - -//--------------------------------------------------------- -// Trigg -//--------------------------------------------------------- - -Trigg::Trigg(const char* name, const MempiHost* h) - : Mempi(name, h) - { - data.note=30; // allow any events - data.velocity=127; - gui = 0; - } - -//--------------------------------------------------------- -// Trigg -//--------------------------------------------------------- - -Trigg::~Trigg() - { - if (gui) - delete gui; - } - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -bool Trigg::init() - { - gui = new TriggGui(this, 0); - gui->setWindowTitle("MusE: "+QString(name())); - gui->show(); - return false; - } - -//--------------------------------------------------------- -// getGeometry -//--------------------------------------------------------- - -void Trigg::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 Trigg::setGeometry(int x, int y, int w, int h) - { - gui->resize(QSize(w, h)); - gui->move(QPoint(x, y)); - } - -//--------------------------------------------------------- -// process -//--------------------------------------------------------- - -void Trigg::process(unsigned , unsigned , MidiEventList* il, MidiEventList* ol) - { - - for (iMidiEvent i = il->begin(); i != il->end(); ++i) { - MidiEvent temp=*i; - if (temp.isNote() || temp.isNoteOff()) - { - // for each event modify note and velocity - printf("a=%d b=%d isNote=%d isNoteOff=%d\n",temp.dataA(),temp.dataB(),temp.isNote(),temp.isNoteOff()); - temp.setA(data.note); - if (!temp.isNoteOff()) - temp.setB(data.velocity); - printf("AFTER a=%d b=%d\n",temp.dataA(),temp.dataB()); - } - ol->insert(temp); - } - } - -void Trigg::getInitData(int* n, const unsigned char** p) const - { - *n = sizeof(data); - *p = (unsigned char*)&data; - printf("::getInitData note=%d vel=%d\n",data.note,data.velocity); - } - -void Trigg::setInitData(int n, const unsigned char* p) - { - memcpy((void*)&data, p, n); - if (gui) - gui->init(); - } - -//--------------------------------------------------------- -// inst -//--------------------------------------------------------- - -static Mempi* instantiate(const char* name, const MempiHost* h) - { - return new Trigg(name, h); - } - -extern "C" { - static MEMPI descriptor = { - "Trigg", - "Any note triggers a specified note with specified velocity", - "1.0", // 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/trigg/trigg.h b/muse_qt4_evolution/midiplugins/trigg/trigg.h deleted file mode 100644 index c29a06a0..00000000 --- a/muse_qt4_evolution/midiplugins/trigg/trigg.h +++ /dev/null @@ -1,49 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// $Id: filter.h,v 1.4 2005/06/12 08:18:37 wschweer Exp $ -// -// filter - simple midi filter -// -// (C) Copyright 2005 Werner Schweer (ws@seh.de) -//========================================================= - -#ifndef __TRIGG_H__ -#define __TRIGG_H__ - -#include "../libmidiplugin/mempi.h" - -//--------------------------------------------------------- -// filter - simple midi filter -//--------------------------------------------------------- -class Trigg : public Mempi { - struct initData { - int note; - int velocity; - } data; - friend class TriggGui; - - TriggGui* gui; - - virtual void process(unsigned, unsigned, MidiEventList*, MidiEventList*); - - public: - Trigg(const char* name, const MempiHost*); - ~Trigg(); - virtual bool init(); - - void setNote(int t) { data.note = t; } - void setVelocity(int t) { data.velocity = t; } - - 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/trigg/trigggui.cpp b/muse_qt4_evolution/midiplugins/trigg/trigggui.cpp deleted file mode 100644 index 0fd3c4c6..00000000 --- a/muse_qt4_evolution/midiplugins/trigg/trigggui.cpp +++ /dev/null @@ -1,56 +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 "trigggui.h" -#include "trigg.h" - -//--------------------------------------------------------- -// MidiTriggConfig -//--------------------------------------------------------- - -TriggGui::TriggGui(Trigg* f, QWidget* parent) - : QDialog(parent) - { - setupUi(this); - filter = f; - - connect(noteEntry, SIGNAL(valueChanged(int)), SLOT(setNote(int))); - connect(velocityEntry, SIGNAL(valueChanged(int)), SLOT(setVelocity(int))); - } - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- -void TriggGui::init() - { - Trigg::initData *data; - int n; - filter->getInitData(&n,(const unsigned char **)&data); - printf("::init note=%d vel=%d\n",data->note,data->velocity); - noteEntry->setValue(data->note); - velocityEntry->setValue(data->velocity); - } - -//--------------------------------------------------------- -// setNote -//--------------------------------------------------------- -void TriggGui::setNote(int value) - { - printf("TriggGui::setNote %d\n",value); - filter->setNote(value); - } - -//--------------------------------------------------------- -// setVelocity -//--------------------------------------------------------- -void TriggGui::setVelocity(int value) - { - printf("TriggGui::setVelocity %d\n",value); - filter->setVelocity(value); - } - diff --git a/muse_qt4_evolution/midiplugins/trigg/trigggui.h b/muse_qt4_evolution/midiplugins/trigg/trigggui.h deleted file mode 100644 index f4c597fa..00000000 --- a/muse_qt4_evolution/midiplugins/trigg/trigggui.h +++ /dev/null @@ -1,48 +0,0 @@ -//========================================================= -// MusE -// Linux Music Editor -// $Id: filtergui.h,v 1.4 2005/11/06 17:49:34 wschweer Exp $ -// -// (C) Copyright 2005 Werner Schweer (ws@seh.de) -//========================================================= - -#ifndef __FILTERGUI_H__ -#define __FILTERGUI_H__ - -#include "ui_trigggui.h" - -class Trigg; - -enum { - MIDI_FILTER_NOTEON = 1, - MIDI_FILTER_POLYP = 2, - MIDI_FILTER_CTRL = 4, - MIDI_FILTER_PROGRAM = 8, - MIDI_FILTER_AT = 16, - MIDI_FILTER_PITCH = 32, - MIDI_FILTER_SYSEX = 64 - }; - -//--------------------------------------------------------- -// TriggGui -//--------------------------------------------------------- - -class TriggGui : public QDialog, public Ui::TriggBase { - Q_OBJECT - - Trigg* filter; - - signals: - void hideWindow(); - - private slots: - void setNote(int ); - void setVelocity(int ); - - public: - TriggGui(Trigg*, QWidget* parent=0); - void init(); - }; - -#endif - diff --git a/muse_qt4_evolution/midiplugins/trigg/trigggui.ui b/muse_qt4_evolution/midiplugins/trigg/trigggui.ui deleted file mode 100644 index 5c096e24..00000000 --- a/muse_qt4_evolution/midiplugins/trigg/trigggui.ui +++ /dev/null @@ -1,109 +0,0 @@ - - - - - TriggBase - - - - 0 - 0 - 233 - 125 - - - - - 3 - 5 - 0 - 0 - - - - MusE: Midi Input Trigg - - - - 9 - - - 6 - - - - - - 5 - 5 - 0 - 0 - - - - Trigg - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - Velocity - - - - - - - 127 - - - 30 - - - - - - - 127 - - - 0 - - - 127 - - - - - - - Note - - - - - - - - - - - - - - - -- cgit v1.2.3