Lee O'D

NoteOff Issues

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.

 

Share this post


Link to post
Share on other sites

Thank you for the link MrDisco, by the time it arrives I should be finished with all of my current deadlines and will be able to be in the chat room to help out with things and get a new release of the lite version done.

 

Jack.

Share this post


Link to post
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 :)

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

Yeah, keep my Soundcloud on look out, I'll post stuff definetly as soon as I get this working with MPC. I've been fooling around with chipmusic for years and know lots of people who are hesitating with Retrocade because lack of decent demos (and well c64 filter but..)

https://soundcloud.com/dkstr

Share this post


Link to post
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? 

Share this post


Link to post
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 ?

Share this post


Link to post
Share on other sites

Hmm, Im pretty sure debug showed only the note number and midi channel, no velocity. I cant confirm this right now since I dont have a Windows machine available.

BTW, heres what the Mac version says when trying to upload:

X4WkyZu.png

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Ah ok, well now its bricked til I get back to PC:)

No, I dont have sadly XCode installed and that goes beyond my skills / time available for studying about compiling, artist, not an engineer to that stretch:)

Share this post


Link to post
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; }

 

:-)

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Woo Filters!

Im still waiting for the mac port, its pain to go to my friends places to try to this so now RC is just collecting dust.. So any news on that yet?

Share this post


Link to post
Share on other sites

Sorry dkstr, looks like my friend has been quite busy lately, and I was not able to use his Mac for this.

 

Do you know anyone with a mac (and Xcode installed) that can provide me a SSH access ?

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now