NoteOff Issues


Lee O'D

Recommended Posts

Ah, MrDisco, I'm sorry about missing that question! It got lost in the Mac question.

 

The Noteoff issue should be fixable for the P1 500K, but at this time I don't know if the patch has been brought into the latest 500K release. I will take a look.

 

Jack.

Thanks. Apparently that note-off user fix didn't made to the lite version patch. By the way, this user seemed to have applied the note-off patch to the lite sketch: 

 

http://forum.gadgetfactory.net/index.php?/topic/1523-vst-plugin/?p=9660http://forum.gadgetfactory.net/index.php?/topic/1523-vst-plugin/?p=9660

Can't tell if it works until have mine in hand but I'll just assume it does. It will take about 2 or 4 weeks until then.

 

Link to comment
Share on other sites

  • Replies 57
  • Created
  • Last Reply

Meh, cant get my hands to PC where installing this would be easy enough. Any news of the mac port? Im willing to betatest, just hit me up at videovalvontaa at gmail dot com.

As I said, I'm playing a live show in this A/V Festival here in Helsinki in some weeks and I know for sure people would be really interested to see this in action, more revenue for you guys :)

Link to comment
Share on other sites

Meh, cant get my hands to PC where installing this would be easy enough. Any news of the mac port? Im willing to betatest, just hit me up at videovalvontaa at gmail dot com.

As I said, I'm playing a live show in this A/V Festival here in Helsinki in some weeks and I know for sure people would be really interested to see this in action, more revenue for you guys :)

Would be awesome if you could post a demo on soundcloud or something. There are not many (if any) user demos. 

Link to comment
Share on other sites

Hi, I didnt get the Mac version working at all, but  I did however try the debugging on my friends Windows. It does exactly what I said in serial Monitor, it gives note on when I push the pad in MPC, and note on AGAIN when I release the pad. So theres no note-off transmitted. Any idea what could cause this? Usually MPCs are known for being really reliable midi sequencers and havent had problem like this ever before. Could there be any hack around this? 

Link to comment
Share on other sites

Hi there,

 

The MIDI spec allows two ways of handling a note off. Either send a proper note off (ie 0x80 + (channel number-1)) OR send a note on (ie 0x90 + (channel number -1)) WITH velocity = 0. It's pretty odd really, and I didn't think modern devices did the latter.

 

I suspect the code isn't handling the second case, though I haven't checked.

 

Is your debug showing a note on with velocity = 0 ?

Link to comment
Share on other sites

Yes, that's probably because "mksmallfs" is still not there (as I said on a previous post).

 

I have someone helping me on this one, because I don't have a Mac myself, and I am subject to this guy availability (and he has been a bit busy lately).

 

Do you have XCode installed ? Perhaps you can try compiling it yourself and see if it works.

 

Alvie

Link to comment
Share on other sites

Yep - the note off issue is a limitation in MIDI.cpp.

 

It grabs the status byte and then does a switch on the byte value. If the byte is a NoteOn, then it processes only a note-on even if it's actually a note-on with zero velocity (which is a note off).

 

See the code here:

 

 

void MIDI_Class::launchCallback()

{

 

// The order is mixed to allow frequent messages to trigger their callback faster.

 

switch (mMessage.type) {

// Notes

case NoteOff: if (mNoteOffCallback != NULL) mNoteOffCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;

case NoteOn: if (mNoteOnCallback != NULL) mNoteOnCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;

 

 

this could be fixed, eg

 

 

case NoteOn: if ((mNoteOnCallback != NULL) && (mMessage.data2!=0)) mNoteOnCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;

case NoteOn: if ((mNoteOnCallback != NULL) && (mMessage.data2==0)) mNoteOffCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;

 

OR maybe just alter the sketch, e.g. (bit hacky)

 

void HandleNoteOn(byte channel, byte pitch, byte velocity) {

if (velocity==0) { HandleNoteOff(channel, pitch, velocity); return; }

 

:-)
Link to comment
Share on other sites

Yep - the note off issue is a limitation in MIDI.cpp.
 
It grabs the status byte and then does a switch on the byte value. If the byte is a NoteOn, then it processes only a note-on even if it's actually a note-on with zero velocity (which is a note off).
 
See the code here:
 
 
void MIDI_Class::launchCallback()
{
 
// The order is mixed to allow frequent messages to trigger their callback faster.
 
switch (mMessage.type) {
// Notes
case NoteOff: if (mNoteOffCallback != NULL) mNoteOffCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
case NoteOn: if (mNoteOnCallback != NULL) mNoteOnCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
 
 
this could be fixed, eg
 
 
case NoteOn: if ((mNoteOnCallback != NULL) && (mMessage.data2!=0)) mNoteOnCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
case NoteOn: if ((mNoteOnCallback != NULL) && (mMessage.data2==0)) mNoteOffCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
 
OR maybe just alter the sketch, e.g. (bit hacky)
 
void HandleNoteOn(byte channel, byte pitch, byte velocity) {
if (velocity==0) { HandleNoteOff(channel, pitch, velocity); return; }
 
:-)

Thanks man, will try this as soon as possible, probably tomorrow if all goes well!

Link to comment
Share on other sites

Man, I'm excited to be almost done with my Design West presentation, I want to dive back into RetroCade development! Alvie is looking at the C64 SID filters and I should be able to make a new release pulling in all the new features very soon. Can't wait, I'm getting anxious to get some real technical work done!

 

Jack.

Link to comment
Share on other sites

  • 2 weeks later...

Great news guys, Alvie has the filters done and we are listening to some sid tunes right now. There is still some tweaking to be done but we are going to release something in the next couple days so we can get some help pinpointing where the problems are.

 

Jack.

Link to comment
Share on other sites

Great news guys, Alvie has the filters done and we are listening to some sid tunes right now. There is still some tweaking to be done but we are going to release something in the next couple days so we can get some help pinpointing where the problems are.

 

Jack.

Yeaaah !!! Great!! I´m so happy about it!

 

Thanks for this great Update!

 

andY

Link to comment
Share on other sites

Ok, here's a new release of MacOS ZPUino port :

 

http://alvie.com/zpuino/downloads/arduino-0102-p1-macosx.zip

 

This should fix the flash issues (which were not Mac-specific), and problem with smallfs generation.

 

A huge thanks to Hans, who let me use his Mac to compile stuff.

 

The tests ran showed that serial programming is very slow. Can someone try with his board ? Example: for a simple sketch (like blink) it should be around 200ms.

Link to comment
Share on other sites

I uploaded the RetroCade sketch to the papilio pro board with my Mac laptop, and that took the same time as on the Mac mini (60 seconds).  For good measure, I tried the same on a Windows 8 PC using the same papilio pro board, and there the upload took something like 16 seconds.  What time would I have to expect?

 

-Hans

Link to comment
Share on other sites

Yep - the note off issue is a limitation in MIDI.cpp.
 
It grabs the status byte and then does a switch on the byte value. If the byte is a NoteOn, then it processes only a note-on even if it's actually a note-on with zero velocity (which is a note off).
 
See the code here:
 
 
void MIDI_Class::launchCallback()
{
 
// The order is mixed to allow frequent messages to trigger their callback faster.
 
switch (mMessage.type) {
// Notes
case NoteOff: if (mNoteOffCallback != NULL) mNoteOffCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
case NoteOn: if (mNoteOnCallback != NULL) mNoteOnCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
 
 
this could be fixed, eg
 
 
case NoteOn: if ((mNoteOnCallback != NULL) && (mMessage.data2!=0)) mNoteOnCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
case NoteOn: if ((mNoteOnCallback != NULL) && (mMessage.data2==0)) mNoteOffCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;
 
OR maybe just alter the sketch, e.g. (bit hacky)
 
void HandleNoteOn(byte channel, byte pitch, byte velocity) {
if (velocity==0) { HandleNoteOff(channel, pitch, velocity); return; }
 
:-)

 

This worked for me:

 

case NoteOn:   if ((mNoteOnCallback != NULL) && (mMessage.data2!=0)) mNoteOnCallback(mMessage.channel,mMessage.data1,mMessage.data2);  if ((mNoteOnCallback != NULL) && (mMessage.data2==0)) mNoteOffCallback(mMessage.channel,mMessage.data1,mMessage.data2); break;	

 

I was using a KeyStudio USB keyboard hooked up to my Windows 8 PC and routed out through a USB->MIDI adapter  It now works a treat. Thank you!

 

 

Edit: I am not sure if I'm missing something, but does the latest bit-file for RetroCade not include the Sketch that's loaded into it? If not, where can I pick it up? I had to make the above change to the 1.0 Sketch version, in addition to patching the noteOff bug this thread is about. I'd like the latest version so I can see if I'm able to  create keyboard split functionality and other mad things for live playing.

Link to comment
Share on other sites

I uploaded the RetroCade sketch to the papilio pro board with my Mac laptop, and that took the same time as on the Mac mini (60 seconds).  For good measure, I tried the same on a Windows 8 PC using the same papilio pro board, and there the upload took something like 16 seconds.  What time would I have to expect?

 

-Hans

 

@Hans: 2-3 seconds, tops, I assume.

 

I'll try upload of same sketch over here, but I suspect something is not quite right with your board.

 

Alvie

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.