Midi Note-Off/Infinite Decay Problem?


unpaid-intern

Recommended Posts

Up front: I am a total noob to FPGAs and the RetroCade Synth.

 

I just got my new RetroCade Synth up and running, and have been playing the YMD and SID files that come pre loaded.  This thing sounds AMAZING.

 

My PC is unavailable at the moment, so I am using the unit "headless" so to speak, therefore no access to the software dashboard,( which might be the problem).

 

I am having an issue communicating to the RetroCade Synth via MIDI.  I can trigger notes, but they don't seem to decay.  I can play a note and it continues to play until I play another note on that channel.  The behavior is consistent across all 7 channels.

 

I hooked up a midi controller, being sure that it was transmitting MIDI signals by using the midi controller to play my Juno-106 briefly first.  Then I connected the MIDI controller to the RetroCade and was able to trigger notes, but the notes stay on indefinitely.  I then tried 2 other MIDI controllers with the same results.

 

So I can create a pretty awesome drone by going through each channel and playing a note, but I'd like to be able to play rests too :)

 

Is there some sort of "latch" setting on the retrocade?

 

I'm going to try to get my PC back tonight and will post results if I am able to fix the issue.

 

If this something I can address without the dashboard, I would be very grateful to anyone who could offer some advice.

 

Thanks!

Link to comment
Share on other sites

Hello,

 

Sorry for the late response, I was out for the weekend. 

 

I thought this issue was resolved but it sounds like it is not. I think the problem is that some MIDI controllers don't sent a note off but instead expect you to watch for a zero velocity. I thought the latest code was updated to stop the note with both methods but it doesn't sound like it. Let me take a look today.

 

Jack.

Link to comment
Share on other sites

Ok, Update.

 

I just finished working with Alvie and we have the Retrocade sketch working in the latest version of DesignLab again. I've also noticed that the MIDI library we are using has gone through several updates. We are using version 3.2 and in the examples for 3.2 it says that you should watch for a note-on with velocity of zero and treat that as a note-off. In the latest version, 4.2, it says the following:

    // Note that NoteOn messages with 0 velocity are interpreted as NoteOffs.

So upgrading the MIDI library might solve your problem... Stay tuned in while I work on a new release.

 

Jack.

Link to comment
Share on other sites

Hello, No worries on the delay; gotta cram a life in there somewhere.

Thanks for looking into this.

I was able to hook up my PC and use the dashboard to communicate via USB and play notes with the qwerty keyboard, most of the channels did indeed decay as expected, but some of the channels still have infinite decay regardless of the envelope settings even when triggered. I think channels 2 and 5, but I didn't write it down, so don't quote me on that one. Hopefully that is helpful information.

Godspeed and good bug-hunting to you and alive.

Link to comment
Share on other sites

Ok, 

 

I've got the RetroCade Sketch updated to work on DesignLab now. I also updated the MIDI library so that will hopefully take care of the NoteOff issue.

 

Please find the attached bit files for RetroCade 1.3. There is a regular version and a debug version. The debug version will send debug messages, such as the MIDI note played, out on the second Papilio Pro COM port at 115200 8N1.

 

RetroCade-1.3-zpuino-2.0-PapilioPro-S6LX9-RetroCade-1.3.zip

 

Let me know if this fixes your problem with NoteOff.

 

This updated sketch will be released with the next version of DesignLab.

 

Jack.

Link to comment
Share on other sites

Okay, I was able to update to RetroCadeSynth-1.3, I plugged in a MicroKorg as the MIDI controller, and the Note off problem does appear to be fixed!

I can get the notes to hang if I transmit on a midi channel that is different from what is selected on the retrocade itself. e.g.-keyboard sending on channel 2, Retrocade display is set to channel 1 by using the microJoystick. I don't consider that a bug, just common sense, but I thought I'd mention it in case the info was useful to you.

Thanks Jack, this is great! I am however still having two issues with the MIDI control, but maybe I should break those out into yet another thread, anyways here is what's going on:

1. I do not have the ability to use the square wave voice on the SID chip, I can toggle Saw and Triangle just fine using the dashboard

2.I have NO atari chip sounds. So I have channels 1,2,3 of SID, and channel 7(drums), but no 4,5,6. Changing settings on the dashboard has no effect, and I cannot control those channels using the QWERTY keyboard, which I could do in version 1.1

I was hoping to add the retrocadeSynth to my existing stage rig, but maybe that isn't the right approach? Do you have a MIDI controller that you recommend, or that you have tested and plays well with the retrocadeSynth?

Link to comment
Share on other sites

Hmmmm,

 

I will take a look at the YM2149 sounds from the MIDI controller.

 

I don't have a recommended MIDI controller, I developed with a couple cheap MIDI keyboards that I bought from Guitar Center. You probably have much nicer controllers then I do. What I have is:

 

  • Oxygen 49 - I got this because of the knobs and sliders which are mapped to the various chip functions.

Whatever controller you have can be mapped to the RetroCade fairly easily.

 

Jack.

Link to comment
Share on other sites

Okay, I was able to update to RetroCadeSynth-1.3, I plugged in a MicroKorg as the MIDI controller, and the Note off problem does appear to be fixed!

I can get the notes to hang if I transmit on a midi channel that is different from what is selected on the retrocade itself. e.g.-keyboard sending on channel 2, Retrocade display is set to channel 1 by using the microJoystick. I don't consider that a bug, just common sense, but I thought I'd mention it in case the info was useful to you.

Thanks Jack, this is great! I am however still having two issues with the MIDI control, but maybe I should break those out into yet another thread, anyways here is what's going on:

1. I do not have the ability to use the square wave voice on the SID chip, I can toggle Saw and Triangle just fine using the dashboard

2.I have NO atari chip sounds. So I have channels 1,2,3 of SID, and channel 7(drums), but no 4,5,6. Changing settings on the dashboard has no effect, and I cannot control those channels using the QWERTY keyboard, which I could do in version 1.1

I was hoping to add the retrocadeSynth to my existing stage rig, but maybe that isn't the right approach? Do you have a MIDI controller that you recommend, or that you have tested and plays well with the retrocadeSynth?

 

Ok, for the two issues you are having. It was a case of default values being set to zero.

 

For 1) The square wave voice not working. Please take a look at the following two links that show how the PWM setting controls the Square wave. The problem was that the PWM default value was set to 0. If you moved the PWM knob you would get output when you selected the square wave option. I set the default value to 2048 which is supposed to be a straight square wave.

http://www.waitingforfriday.com/index.php/Commodore_SID_6581_Datasheet#PW_Lo.2FPW_Hi_.28Registers_02-03.29

http://www.waitingforfriday.com/index.php/Commodore_SID_6581_Datasheet#Control_Register_.28Register_04.29

 

For 2) The default volume was set to 0, if you turned the volume up you could hear those channels. I moved the volume init code to later on in the setup and it properly set the default volume to 11.

 

Please find new bit files attached.

RetroCade-1.3-zpuino-2.0-PapilioPro-S6LX9-RetroCade-1.3-b.zip

Link to comment
Share on other sites

Okay! Everything seems working, except for the noise channels on the SID chip, surely I am just goofing up a setting again, but I can't get them to make sound.

It's really odd, because I did manipulate those settings on the dashboard when testing, but it's possible that I wasn't communicating on the right COM port or something when I was testing that stuff.

I was able to get the sounds working with the old code that you sent me just fine, but I'll load this code when I get a chance, since having those values default to some kind of audio feedback will be useful when I don't have a monitor attached.

I've also discovered that the midi implementation of the controller I'm using turns out to be more complicated than I thought. It's a good thing because it allows for a great deal of flexibility in the type of information I'm sending. But it also means that CC programming is a little trickier. AND I can change the way that note on/off signals are sent, which again, cuts both ways. Now to spend time with the documentation....

Thanks for spending the time to help me get up and running with this. Now that I have baseline operation, I look forward to going through your DesignLab tutorials and hopefully contributing something useful to the codebase instead of just clogging up the forums :)

Link to comment
Share on other sites

"...Just one more thing...."

 

I just got the chance to upload the new code you posted here, but no go.

 

The zip file you posted above for 1.3-b will not let me extract it for some reason.  I am getting the following error:

 

!   C:\\...Downloads\RetroCade-1.3-zpuino-2.0-PapilioPro-S6LX9-RetroCade-1.3-b.zip: The archive is corrupt

 

I tried re-downloading it a few times with the same result. 

 

justone.GIF
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.