[sdiy] Yet another Midi question

Trevor Page t at introspectiv.eclipse.co.uk
Wed Feb 19 21:14:44 CET 2003


Tim,

There is something funny with your code here I think. 

Okay, hypothetical situation. What we're implying here is that, contrary
to my belief, your keyboard always resets its own running status after
it has sent an FE (or, say, any system realtime message). 

So let's say it sometimes goes like this:

Note on message with status byte
Note on message, no status byte
Note on message, no status byte
$FE here
Note on message with status byte
Note on message, no status byte

Etc. 

(Of course, the above stream is totally valid, especially if the last
event happened after any running status 'time out' period)


Whereas I would expect it to sometimes be:

Note on message with status byte
Note on message, no status byte
Note on message, no status byte
$FE here
Note on message, no status byte
...


Now when I think about this, I cannot understand how it could matter
whether your code does, or does not reset your running status flag when
FE is encountered. 

Because, for the first case above (which one can assume won't always
happen for a true running status keyboard), the first note-on following
the FE has a fresh status byte.  If your code (wrongly) took FE to be
the new current status (i.e. continued to do running status, but now
using FE) then it wouldn't matter anyway, because the note-on message
that follows it presents you with a new status byte. 

For the latter case (far more likely, though the former is perfectly
valid), allowing FE to reset your running status handler would probably
result in silence for any of the note-on messages that followed it
(depending of course on exactly how you've done your code). In other
words, the only way you could have a problem would be by NOT ignoring
the =>F8 stuff. 

Another pretty obvious thing is that we would never want to allow System
Realtime messages to reset or affect the normal running status in any
way, because they are, after all, always single byte messages!

I think the way I go about handling running status could be quite
different to yours and I could send you some of my code as an example if
you like. 

On a side note: I was quite embarrased to find that my 9090 wouldn't
work properly using Paul's controller keyboard at the last SDIY meet.
Shame I had taken the 9090 with a very old version of the code that
didn't like running status very much :o) 

Regards

Trev

. .  .   .    .     .      
t at introspectiv.org
http://introspectiv.org/ 



-----Original Message-----
From: owner-synth-diy at dropmix.xs4all.nl
[mailto:owner-synth-diy at dropmix.xs4all.nl] On Behalf Of Tim Ressel
Sent: 19 February 2003 19:11
To: t at introspectiv.eclipse.co.uk
Cc: Synth-Diy
Subject: Re: [sdiy] Yet another Midi question


Trevor,

Perhaps I have a wierd keyboard. I just modified my
ailing code to reset running status when an $FE comes
in and it fixed the thing! Now it works fine. Go
figure.

--Tim

--- t at introspectiv.eclipse.co.uk wrote:
> Tim,
> 
> The $FE active sensing message is a member of the
> set 
> of system realtime messages, all of which occupy $F8
> 
> to $FF, which includes Stop, Start, Clock, Active 
> Sense etc. All of these have priority over other 
> messages and can occur anywhere (including, say, 
> between the status byte and data byte of some other 
> MIDI message). The current running status is *not* 
> affected by these special messages. You might want
> to 
> have a special routine to deal with these messages 
> should you wish to support them, but your normal 
> running status handler code should ignore they ever 
> happened. 
> 
> Basically I do a check as soon as a new status byte 
> has been received, to see if it is equal or higher 
> than F8. If result is true, it is not recorded in my
> 
> currentStatusByte register, and the previous
> 'normal' 
> status byte is still assumed. 
> 
> What's useful is that you know that all the messages
> 
> you *don't* want to affect your running status stuff
> 
> are grouped from 11111000 upwards. 
> 
> (Hope that made sense. I just re-read it and it
> sounds 
> like waffle, but it's been a long day). 
> 
> Cheers
> 
> Trev
> 
> http://introspectiv.org/
> 
> Quoting Tim Ressel <madhun2001 at yahoo.com>:
> 
> > Hey all,
> > 
> > I've got a question on Midi running status. Do I
> > clear
> > the running status flag when I receive a $FE
> > (active
> > sensing)??
> > 
> > Thanks!
> > 
> > --Tim
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Shopping - Send Flowers for Valentine's
> > Day
> > http://shopping.yahoo.com
> > 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com





More information about the Synth-diy mailing list