GR-55 -External expression pedal connected to GR55 jumpy if operated quickly

Started by philjynx, September 17, 2016, 02:26:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

philjynx


admin

QuoteThe problem is, if you operate the expression pedal anything other than pretty slowly, you don't get the response you'd like from the GR55 at all.
This is despite the fact that the full range of values (IE 0 to 127) is being sent.

What happens is that the GR55 only seems to notice a very small number of the cc messages. So, lets say that we have a simple assign to control the level of one of the tones from none to max. Instead of fading up or down, it may jump from none to max, or sometimes not even respond. Any clues anyone, am I alone in this or has anyone else ever had an external midi controller behave like this?

You are not alone - is a known issue - the GR-55 CPU is already running near capacity ( we obseve the GR-55 controls and onboard expression pedal react sluggishly anytime there is a USB connection ) and there is no reserve for many real time control tasks

This explains why the GR-55 lacks the typical External Expression pedal / CTRL 2/3  input Jack as found on most Roland / Boss Floor processors





gumtown

I notice there is no delay after the midi command is sent, so if the pedal is moved too fast the GR-55 won't know the end of the previous and start of the next message.

Usually a delay of 20ms is required between messages.

Any reason for the 5 x times sampling?

this what I would write

      SampleExpression = (analogRead(13)/8);
      if (LastSentExpression != SendExpression) {
        MIDI.sendControlChange(68, SampleExpression, RolandChannel);
        LastSentExpression = SendExpression;
        Serial.print("analog 13 is: ");
        Serial.println(SendExpression);
        Delay(20);       
      };
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

sixeight

QuoteBack to the delay, this bit of code is in the main loop. If I put that delay in, it would be insignificant as far as button pressing is concerned as obviously a human being cannot operate the expression pedal and then move their foot to operate a button in 20ms, so no harm done. But, a rapid movement of the expression pedal would get chopped up into perhaps as few as 5 cc messages, so what you might have intended as a rapid smooth transition from one sound to another, would actually be more like a blunt toggle transition. I figure you can fully move the pedal in not much more than half a second (500ms) so a bit of arithmetic on that suggests that you could end up with only 5 incremental readings instead of 127.

Getting the timing right is crucial in commucating with all Boss and Roland devices. For the GR55 I wrote a short function to deal with the delay, only when it is necessary. The processor could do all sorts of other useful stuff, so I try to avoid the delay command in my code.


#define GR55_SYSEX_DELAY_LENGTH 10 // time between sysex messages (in msec)
unsigned long GR55sysexDelay = 0;

void GR55_check_sysex_delay() { // Will delay if last message was within GR55_SYSEX_DELAY_LENGTH (10 ms)
  while (millis() - GR55sysexDelay <= GR55_SYSEX_DELAY_LENGTH) {}
  GR55sysexDelay = millis();
}


I found 10 ms is enough. This should allow for 100 midi messages per second.

gumtown

I came up with the 20ms value, which I use in GT-FxFloorBoard editors, when sending bulk sysx data in 256 byte chunks, 20ms was rounded up to gave older equipment time to digest the data.
If I recall the Midi Association specification is 14ms minimum for sysx data, I am not sure for cc# but a gap is required for the receiving equipment to distinguish there is a message end, that it is 3 bytes in length and not 4 bytes as some cc# are.
As SixEight has posted, a 10ms delay might be better for this case.

FYI: The GR-55 USB and 5 pin midi ports work independently and concurrently, with the USB connected to a computer, some midi software can create a loopback, causing the GR-55 to respond very slowly and sometimes appear to lockup.
It is caused when the GR-55 sends Program change out when it receives a program change, resulting in a P.C. loopback. Disabling the GR-55 P.C Out helps in that case.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

sixeight

Quote from:  philjynx on September 19, 2016, 03:47:04 AM
Thanks, that's a neat solution - only delay if there was a recent send.
One question though, just a naming convention thing, you've called it GR55sysexDelay, but I'm assuming that the need for a message delay is not restricted to sysex messages, but to all midi message types?

I use delays for the other devices as well on the VController. But I want to be able to use different delay times for all devices. So I kept it seperate.

One day I should program it all in seperate classes.

Do post some pictures of your controller when you are ready...