summaryrefslogtreecommitdiff
path: root/muse2/muse/driver
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-06-03 14:24:08 +0000
committerFlorian Jung <flo@windfisch.org>2011-06-03 14:24:08 +0000
commitdb164b62e3892bd17d1a2eabca76bde3b67072df (patch)
treeab71ac4b4f05ab94c008d75ef7052bef5af6cc74 /muse2/muse/driver
parentdef4fdb391f5207ebbe61881416f39f3d896cc5d (diff)
parent9187899632c14d64b3fae6477b7f941240f912a6 (diff)
merged with trunk and adapted new functions
Diffstat (limited to 'muse2/muse/driver')
-rw-r--r--muse2/muse/driver/jack.cpp24
-rw-r--r--muse2/muse/driver/jackmidi.cpp8
2 files changed, 18 insertions, 14 deletions
diff --git a/muse2/muse/driver/jack.cpp b/muse2/muse/driver/jack.cpp
index f70cf3d3..c4d7a8ca 100644
--- a/muse2/muse/driver/jack.cpp
+++ b/muse2/muse/driver/jack.cpp
@@ -711,7 +711,7 @@ void JackAudioDevice::connectJackMidiPorts()
if(port) //
{
RouteList* rl = md->outRoutes();
- for (iRoute r = rl->begin(); r != rl->end(); ++r)
+ for (ciRoute r = rl->begin(); r != rl->end(); ++r)
connect(port, r->jackPort);
}
}
@@ -724,7 +724,7 @@ void JackAudioDevice::connectJackMidiPorts()
if(port) //
{
RouteList* rl = md->inRoutes();
- for (iRoute r = rl->begin(); r != rl->end(); ++r)
+ for (ciRoute r = rl->begin(); r != rl->end(); ++r)
connect(r->jackPort, port);
}
}
@@ -915,7 +915,7 @@ void JackAudioDevice::graphChanged()
// the "right" amount
for (int i = 0;i < 20;i++) {
erased = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
if (irl->channel != channel)
continue;
QString name = irl->name();
@@ -953,7 +953,7 @@ void JackAudioDevice::graphChanged()
const char** pn = ports;
while (*pn) {
bool found = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
if (irl->channel != channel)
continue;
QString name = irl->name();
@@ -1002,7 +1002,7 @@ void JackAudioDevice::graphChanged()
// the "right" amount
for (int i = 0; i < 20 ; i++) {
erased = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
if (irl->channel != channel)
continue;
QString name = irl->name();
@@ -1039,7 +1039,7 @@ void JackAudioDevice::graphChanged()
const char** pn = ports;
while (*pn) {
bool found = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
if (irl->channel != channel)
continue;
QString name = irl->name();
@@ -1113,7 +1113,7 @@ void JackAudioDevice::graphChanged()
for (int i = 0; i < 20 ; i++)
{
erased = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
//if (irl->channel != channel)
// continue;
QString name = irl->name();
@@ -1155,7 +1155,7 @@ void JackAudioDevice::graphChanged()
const char** pn = ports;
while (*pn) {
bool found = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
//if (irl->channel != channel)
// continue;
QString name = irl->name();
@@ -1212,7 +1212,7 @@ void JackAudioDevice::graphChanged()
for (int i = 0; i < 20 ; i++)
{
erased = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
//if (irl->channel != channel)
// continue;
QString name = irl->name();
@@ -1253,7 +1253,7 @@ void JackAudioDevice::graphChanged()
const char** pn = ports;
while (*pn) {
bool found = false;
- for (iRoute irl = rl->begin(); irl != rl->end(); ++irl) {
+ for (ciRoute irl = rl->begin(); irl != rl->end(); ++irl) {
//if (irl->channel != channel)
// continue;
QString name = irl->name();
@@ -1473,7 +1473,7 @@ void JackAudioDevice::start(int /*priority*/)
for (int ch = 0; ch < channel; ++ch) {
RouteList* rl = ai->inRoutes();
void* port = ai->jackPort(ch);
- for (iRoute ir = rl->begin(); ir != rl->end(); ++ir) {
+ for (ciRoute ir = rl->begin(); ir != rl->end(); ++ir) {
if (ir->channel == ch)
connect(ir->jackPort, port);
}
@@ -1486,7 +1486,7 @@ void JackAudioDevice::start(int /*priority*/)
for (int ch = 0; ch < channel; ++ch) {
RouteList* rl = ai->outRoutes();
void* port = ai->jackPort(ch);
- for (iRoute r = rl->begin(); r != rl->end(); ++r) {
+ for (ciRoute r = rl->begin(); r != rl->end(); ++r) {
if (r->channel == ch) {
connect(port, r->jackPort);
}
diff --git a/muse2/muse/driver/jackmidi.cpp b/muse2/muse/driver/jackmidi.cpp
index c950e096..1765fabb 100644
--- a/muse2/muse/driver/jackmidi.cpp
+++ b/muse2/muse/driver/jackmidi.cpp
@@ -974,13 +974,17 @@ void MidiJackDevice::recordEvent(MidiRecordEvent& event)
}
//
- // transfer noteOn events to gui for step recording and keyboard
- // remote control
+ // transfer noteOn and Off events to gui for step recording and keyboard
+ // remote control (changed by flo93: added noteOff-events)
//
if (typ == ME_NOTEON) {
int pv = ((event.dataA() & 0xff)<<8) + (event.dataB() & 0xff);
song->putEvent(pv);
}
+ else if (typ == ME_NOTEOFF) {
+ int pv = ((event.dataA() & 0xff)<<8) + (0x00); //send an event with velo=0
+ song->putEvent(pv);
+ }
//if(_recordFifo.put(MidiPlayEvent(event)))
// printf("MidiJackDevice::recordEvent: fifo overflow\n");