Re: [linux-audio-dev] Basic MIDI question

From: Jens M Andreasen <jens.andreasen@email-addr-hidden>
Date: Tue Jul 25 2006 - 19:53:17 EEST

On Tue, 2006-07-25 at 10:26 -0400, Lee Revell wrote:
> On Tue, 2006-07-25 at 11:03 +0200, Clemens Ladisch wrote:
> > (ALSA's
> > sequencer event -> rawmidi converter uses running status by default.)
>
> "By default" - so it can it be disabled? How?
>
Are you sure you would want to do that? Because running status by itself
would be just:

for(;;)
{
  thisByte = nextByte();

  if(thisByte & 0x80)
     runningStatus = thisByte;

  //... after which we get that:

  if(runningStatus == NOTE_ON || runningStatus == NOTE_OFF)
  {
    thisByte = nextByte();
    thisByte = nextByte();

    // note_on with zero velocity is note_off
    if(thisByte == 0 || runningStatus == NOTE_OFF)
      setLed(NOTE_OFF);
    else
      setLed(NOTE_ON);
  }
}
> Lee
>

-- 
Received on Tue Jul 25 20:15:09 2006

This archive was generated by hypermail 2.1.8 : Tue Jul 25 2006 - 20:15:09 EEST