summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/ChangeLog20
-rw-r--r--muse/muse/ctrl/configmidictrl.cpp5
-rw-r--r--muse/muse/ctrl/definemidictrl.cpp66
-rw-r--r--muse/muse/ctrl/definemidictrl.h4
-rw-r--r--muse/muse/ctrl/definemidictrl.ui67
-rw-r--r--muse/muse/liste/ctrllistedit.ui19
6 files changed, 131 insertions, 50 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index 4892c302..2673b782 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,3 +1,5 @@
+12.12 (ws)
+ - added possibility to define a new midicontroller
10.12 (ng)
- items in pianoroll play the right pitch (event.pitch + transpose)
- items in pianoroll are displayed correctly according to Y zoom
@@ -27,7 +29,7 @@
- application spanning drag&drop of parts
- cut/copy/paste for parts
24.11 (ws)
- - added new make target: "doxy" to generate doxygen source
+ - added new make target: "doxy" to generate doxygen source
documentation
21.11 (ws)
- fixed DSSI support
@@ -59,12 +61,12 @@
are no longer const;
- Added getBankName() to interface to allow for simple structuring
of patches.
- - queue midi events which cannot be send to busy(locked) software
+ - queue midi events which cannot be send to busy(locked) software
synthesizer
- zynaddsubfx: implement locking, showGui(), and getControllerInfo();
cache patch names
29.10 (ws)
- - fixed crash after some time of midi recording: made midi
+ - fixed crash after some time of midi recording: made midi
input queue thread safe.
27.10 (ws)
- added a MESS port of the Zynaddsubfx software synthesizer
@@ -78,7 +80,7 @@
18.10 (ws)
- added routing for jack midi ports. Fixes for "mus".
17.10 (ws)
- - added new program "mus". Mus is a wrapper to operate MusE MESS
+ - added new program "mus". Mus is a wrapper to operate MusE MESS
synthesizer standalone with JACK audio/midi interface. The
plan is to use them to test the upcoming jack midi implementation.
15.10 (ng)
@@ -123,7 +125,7 @@
- change german documentation encoding to utf8
- dont assume system encoding is isoLatin1, first patches
(ubuntu and others use utf8)
-4.9
+4.9
(ws)
- remove html documentation and replace with *pdf version
(ng)
@@ -151,7 +153,7 @@
22.8 (rj)
* playing with midi plugins, one new example plugin: trigg
29.7 (ws)
- * fixed drawing of waveform in wave track. Concurrent wave file
+ * fixed drawing of waveform in wave track. Concurrent wave file
accesses from gui and rt task produced distortions ("crackling").
25.7 (ng) DeicsOnze
* add panic button
@@ -190,9 +192,9 @@
* drag/drop of projects in project dialog
* added Roland JV-1010 instrument definitions from f.fabre
29.5 (ws)
- * the list of available software synthesizer in
+ * the list of available software synthesizer in
edit->AddTrack->AddSoftSynth was always empty
- * properly ignore close event in MusE::closeEvent() if the
+ * properly ignore close event in MusE::closeEvent() if the
user aborts operation
25.5 (ws)
* remove automation buttons from midi track in arranger
@@ -381,7 +383,7 @@
3.1 (rj)
* fixed search box in plugin dialog
2.1 (ws)
- * fix recording of note off events when part does not start at zero
+ * fix recording of note off events when part does not start at zero
31.12 (ws)
* fixes for audio prefetch thread
30.12 (ws)
diff --git a/muse/muse/ctrl/configmidictrl.cpp b/muse/muse/ctrl/configmidictrl.cpp
index 6f9187c9..395518a8 100644
--- a/muse/muse/ctrl/configmidictrl.cpp
+++ b/muse/muse/ctrl/configmidictrl.cpp
@@ -193,7 +193,10 @@ void ConfigMidiCtrl::done(int code)
void ConfigMidiCtrl::defineClicked()
{
DefineMidiCtrl dc(track, this);
- if (dc.exec())
+ if (dc.exec()) {
+ Ctrl* ctrl = new Ctrl(dc.midiController());
+ track->addController(ctrl);
QDialog::done(0);
+ }
}
diff --git a/muse/muse/ctrl/definemidictrl.cpp b/muse/muse/ctrl/definemidictrl.cpp
index 3b46f2d5..197d7572 100644
--- a/muse/muse/ctrl/definemidictrl.cpp
+++ b/muse/muse/ctrl/definemidictrl.cpp
@@ -20,9 +20,14 @@
#include "definemidictrl.h"
#include "miditrack.h"
+#include "instruments/minstrument.h"
//---------------------------------------------------------
// DefineMidiCtrlDialog
+// controllerName QLineEdit
+// controllerType QComboBox
+// msbId lsbId minVal maxVal initVal QSpinBox
+// moveWithPart QCheckBox
//---------------------------------------------------------
DefineMidiCtrl::DefineMidiCtrl(MidiTrack* t, QWidget* parent)
@@ -30,6 +35,7 @@ DefineMidiCtrl::DefineMidiCtrl(MidiTrack* t, QWidget* parent)
{
setupUi(this);
track = t;
+ connect(controllerType, SIGNAL(currentIndexChanged(int)), SLOT(typeChanged(int)));
}
//---------------------------------------------------------
@@ -39,6 +45,66 @@ DefineMidiCtrl::DefineMidiCtrl(MidiTrack* t, QWidget* parent)
void DefineMidiCtrl::done(int val)
{
+ if (val) {
+ ctrl.setName(controllerName->text());
+ ctrl.setComment(controllerComment->toPlainText());
+ int num = MidiController::genNum(
+ MidiController::ControllerType(controllerType->currentIndex()),
+ msbId->value(), lsbId->value());
+ ctrl.setNum(num);
+ ctrl.setMinVal(minVal->value());
+ ctrl.setMaxVal(maxVal->value());
+ ctrl.setInitVal(initVal->value());
+ ctrl.setMoveWithPart(moveWithPart->isChecked());
+
+ //
+ // add controller to instrument
+ //
+ MidiInstrument* instrument = track->instrument();
+ MidiControllerList* mcl = instrument->controller();
+ MidiController* c = new MidiController(ctrl);
+ mcl->append(c);
+ }
+
QDialog::done(val);
}
+//---------------------------------------------------------
+// typeChanged
+//---------------------------------------------------------
+
+void DefineMidiCtrl::typeChanged(int val)
+ {
+ MidiController::ControllerType t = (MidiController::ControllerType)val;
+ switch (t) {
+ case MidiController::RPN:
+ case MidiController::NRPN:
+ case MidiController::Controller7:
+ msbId->setEnabled(false);
+ lsbId->setEnabled(true);
+ maxVal->setRange(0, 127);
+ maxVal->setValue(127);
+ initVal->setRange(0, 127);
+ break;
+ case MidiController::Controller14:
+ case MidiController::RPN14:
+ case MidiController::NRPN14:
+ msbId->setEnabled(true);
+ lsbId->setEnabled(true);
+ maxVal->setRange(0, 128*128-1);
+ maxVal->setValue(128*128-1);
+ initVal->setRange(0, 128*128-1);
+ break;
+ case MidiController::Pitch:
+ case MidiController::Program:
+ msbId->setEnabled(false);
+ lsbId->setEnabled(false);
+ maxVal->setRange(0, 128*128-1);
+ initVal->setRange(0, 128*128-1);
+ maxVal->setValue(128*128-1);
+ break;
+ default:
+ break;
+ }
+ }
+
diff --git a/muse/muse/ctrl/definemidictrl.h b/muse/muse/ctrl/definemidictrl.h
index c498c81c..bc0df6a9 100644
--- a/muse/muse/ctrl/definemidictrl.h
+++ b/muse/muse/ctrl/definemidictrl.h
@@ -22,6 +22,7 @@
#define __DEFINEMIDICTRL_H__
#include "ui_definemidictrl.h"
+#include "midictrl.h"
class MidiTrack;
@@ -33,12 +34,15 @@ class DefineMidiCtrl : public QDialog, public Ui::DefineMidiCtrlBase {
Q_OBJECT
MidiTrack* track;
+ MidiController ctrl;
private slots:
virtual void done(int);
+ void typeChanged(int);
public:
DefineMidiCtrl(MidiTrack* t, QWidget* parent = 0);
+ const MidiController* midiController() const { return &ctrl; }
};
#endif
diff --git a/muse/muse/ctrl/definemidictrl.ui b/muse/muse/ctrl/definemidictrl.ui
index 20269956..409ebfd6 100644
--- a/muse/muse/ctrl/definemidictrl.ui
+++ b/muse/muse/ctrl/definemidictrl.ui
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>463</width>
- <height>301</height>
+ <width>558</width>
+ <height>344</height>
</rect>
</property>
<property name="windowTitle" >
@@ -28,10 +28,10 @@
<number>6</number>
</property>
<item row="0" column="2" >
- <widget class="QLineEdit" name="lineEdit" />
+ <widget class="QLineEdit" name="controllerName" />
</item>
<item row="1" column="2" >
- <widget class="QComboBox" name="comboBox" >
+ <widget class="QComboBox" name="controllerType" >
<item>
<property name="text" >
<string>7-Bit</string>
@@ -104,19 +104,6 @@ p, li { white-space: pre-wrap; }
</layout>
</item>
<item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>16</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
@@ -140,7 +127,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="1" column="1" >
- <widget class="QSpinBox" name="spinBox_2" />
+ <widget class="QSpinBox" name="lsbId" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_4" >
@@ -157,7 +144,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="0" column="1" >
- <widget class="QSpinBox" name="spinBox" />
+ <widget class="QSpinBox" name="msbId" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
@@ -166,6 +153,13 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
+ <item row="2" column="0" colspan="2" >
+ <widget class="QCheckBox" name="moveWithPart" >
+ <property name="text" >
+ <string>Move with Part</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -177,7 +171,7 @@ p, li { white-space: pre-wrap; }
<number>6</number>
</property>
<item row="2" column="1" >
- <widget class="QSpinBox" name="spinBox_5" />
+ <widget class="QSpinBox" name="initVal" />
</item>
<item row="2" column="2" >
<widget class="QLabel" name="label_12" >
@@ -201,7 +195,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="1" column="1" >
- <widget class="QSpinBox" name="spinBox_4" />
+ <widget class="QSpinBox" name="maxVal" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_5" >
@@ -211,7 +205,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="0" column="1" >
- <widget class="QSpinBox" name="spinBox_3" />
+ <widget class="QSpinBox" name="minVal" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_6" >
@@ -232,20 +226,7 @@ p, li { white-space: pre-wrap; }
</layout>
</item>
<item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>16</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox" >
+ <widget class="QDialogButtonBox" name="okButton" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
@@ -254,12 +235,22 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
+ <item>
+ <widget class="QTextEdit" name="controllerComment" />
+ </item>
+ <item>
+ <widget class="QLabel" name="label_14" >
+ <property name="text" >
+ <string>Comment:</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<resources/>
<connections>
<connection>
- <sender>buttonBox</sender>
+ <sender>okButton</sender>
<signal>accepted()</signal>
<receiver>DefineMidiCtrlBase</receiver>
<slot>accept()</slot>
@@ -275,7 +266,7 @@ p, li { white-space: pre-wrap; }
</hints>
</connection>
<connection>
- <sender>buttonBox</sender>
+ <sender>okButton</sender>
<signal>rejected()</signal>
<receiver>DefineMidiCtrlBase</receiver>
<slot>reject()</slot>
diff --git a/muse/muse/liste/ctrllistedit.ui b/muse/muse/liste/ctrllistedit.ui
index 88f850d9..27389b7c 100644
--- a/muse/muse/liste/ctrllistedit.ui
+++ b/muse/muse/liste/ctrllistedit.ui
@@ -14,10 +14,10 @@
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
- <number>0</number>
+ <number>9</number>
</property>
<property name="spacing" >
- <number>3</number>
+ <number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
@@ -63,6 +63,14 @@
</property>
<item>
<widget class="QLabel" name="label_3" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text" >
<string>Id:</string>
</property>
@@ -75,6 +83,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="moveWithPart" >
+ <property name="text" >
+ <string>move with part</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>