[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference napalm::commusic_v1

Title:* * Computer Music, MIDI, and Related Topics * *
Notice:Conference has been write-locked. Use new version.
Moderator:DYPSS1::SCHAFER
Created:Thu Feb 20 1986
Last Modified:Mon Aug 29 1994
Last Successful Update:Fri Jun 06 1997
Number of topics:2852
Total number of notes:33157

1365.0. "What is MIDI Active Sensing, & How Does It Work?" by AKOV88::EATOND (Where is he when the music stops?) Tue May 10 1988 12:49

	What is Active Sensing, and how does it work?

	My impression is that active sensing is a transmission of 'ALL NOTES
OFF' from a devise that has seen no activity for a certain period of time.

	Are there any rules for this activity to follow?  Any peculiarities
that could cause problems in the implementation?

	Dan

T.RTitleUserPersonal
Name
DateLines
1365.1Good in performance, dangerous in studioCTHULU::YERAZUNISA wizard is someone who's been doing something for a week longerTue May 10 1988 14:3530
    Active sensing is having a sending device transmit a code that signals
    "I am alive and sane" every 1/3 second, if no other MIDI traffic
    has happened in the meantime.  A recieving device with active sensing
    wants to see some sort of MIDI traffic every 1/3 second, whether
    or not it's note traffic, pitch-bend, or just a "I'm alive" code.
    If it doesn't see the traffic, it assumes the device immediately
    upstream has crashed or the cable has fallen out, and it executes
    an ALL NOTES OFF.
    
    Why have this "feature"?  Well, in certain performance situations,
    it is much safer to have a keyboard go dead than to have a drone
    sound continue, with no obvious shutoff method, for several minutes.
    Performers can always switch to another keyboard when they realize
    that they aren't getting any sound, whereas it's infeasible to go
    around power-cycling all of your modules to kill the stuck note.
                                                                     
    Can this cause you problems? Yep.  Say you have a sound-generator
    rackmount module that implements active sense on reception and you have
    a controller keyboard that doesn't implement active-sense transmit.
    Well, that rackmount and that controller won't talk correctly, because
    no note on the rackmount will sound for longer than 1/3 second (because
    the controller isn't sending "I'm alive and sane", the rackmount will
    be timing out on active sense and executing an ALL NOTES OFF on any
    sustain. 
    
    ----------
    
    N.B.  Please somebody, check the amount of time on active sense.
    I think it's 1/3 second but I could well be wrong.              
    
1365.2That's one possibility.PANGLS::BAILEYSteph BaileyTue May 10 1988 21:3317
>       Well, that rackmount and that controller won't talk correctly, ...
    
    Actually, the way I have always seen active sensing implemented,
    a module will not freeze (kill all notes) after not seeing a message
    for the prescribed period of time (I thought it was 600 ms) ONLY
    if it has already seen an active sensing message.  So if your master
    doesn't transmit active sensing messages then things still work
    because the slave module will never enter an ``active sensing mode''.
    
    I don't think the MIDI spec requires one or the other of these
    behaviors (the old syntax vs. semantics problem again), but the second
    one seems more rational.  I don't doubt that there are synths which
    behave as Bill described, however, but I can't cite an example.  My DX7
    works as I described, and my other equipment doesn't seem to care.
    Check your local paper for listings and further information. 
    
    Steph   
1365.3Here I am, No I'me NotMINDER::KENTBut there's no hole in the middleWed May 11 1988 07:5517
    
    
    I have heard of a couple of wierd problems recently caused by active
    sensing in a studio environment. One was mentioned earlier somewhere
    in this file and related to using an FB01 with pro-24 which suggested
    that all notes on the FB01 were clipped after .3 sec or so unless
    the sequencer was running. Annoying but understandable I guess.
    
    The second was a little wierder and came from the U.K. version of
    MT. It said that Roland (Ithink it was a D50) has a standard of
    sending an all "notes off" everytime that there is no keyboard key
    being held down. The user was trying to record, also into an atari.
    His left hand part and then his right hand seperately.      
                                                                
    I guess you could imagine the result.                       
                                                                
                 				Paul                                               
1365.4MCS2 temporarily loses consciousnessAKOV88::EATONDWhere is he when the music stops?Wed May 11 1988 12:4933
	O.K., here's the specific problem behind my entering this topic.

	I picked up a Yamaha MCS2, which is a device that allows midi continuous
and switch-type control for units that don't have them (i.e., my RD200).  I
wanted to be able to sequence and play live leads with pitch bend and the like,
and also to be able to use breath control.  This unit allows for control of
any control change (even those not yet defined).  A variety of switches, foot 
pedals and sliders may be mapped to any of the midi copntrol change parameters.

	When I set it up at home, I noticed that the display would periodically
'blank out', and when that happened, no midi information would be allowed to 
pass through it (it has two inputs, which are merged with the control info 
produced internally, and outputs all to the MIDI OUT).  I refigured the network
a number of times, all to no avail.  Finally I checked the output of the 
sequencer alone going into it, which I suspected as being the culprit (the MIDI
DJ is a somewhat mongrel device, having many non-standard features and quirks).
Nope, it wasn't causing the problem.  Next I hooked the RD200 alone into the
MCS2.  It happened.  The RD200 was the transmiter that caused this device to
lose consciousness.

	Next, I timed the intervals between blanking out states.  They only 
happened when the keyboard was not being played (suspect active sensing).  The
intervals were varying.  8 seconds, 10 seconds, 20 seconds, 30 seconds, all at
random (or so it seemed, I didn't take more than 5 readings at a time).  Since
the MIDI spec allocates 300 ms intervals, I don't know what to think of the 
quirk.

	Anyway, I was able to bring the beast back and get the store credit.

	Anyone have a clue as to what might have been going on?

	Dan

1365.5Active Sense has bugs!CTHULU::YERAZUNISYou're walking along the beach and you find a tortise...Wed May 11 1988 15:1537
    re: only activating the 300 ms sanity timer after seeing an active
    sense message...
    	
    Depending on the implementation, you can still get nailed.  Example:
    	
    	You power up controller A, controller B, modules M and N, and
    	a MIDI router.  Controller A sends active sense, controller
    	B doesn't.  The modules set an internal flag saying active sense is
    	recieved and enables the 300 ms timer.
    	
    	Initially, you have the router actively merging A and B, so
    	M and N see an active sense signal (from A).  You then change patches
    	and now the router routes A to M and B to N.
    	
    	But now N still has the timeout flag set, so it starts the timeout
    	timer.  However, B doesn't send active sense so .3 seconds later,
    	module N goes silent.  This happens repeatedly every time 
    	an N chord is held for .3 sec.
    	
    	----------
    
    	You say "Ahhh, you should turn on active sense transmission
    	on B".  Well, if you do that, then you _lose_ the usefulness
    	of active sensing when A and B are merged.   Say you're holding
    	a note on A and the A controller crashes.  The B controller
    	continues to stave off active sense note-off and hence the note from
    	A stays stuck!!     
    
    
    A "better way" might be to enable the timeout whenever active sense
    is seen- and _disable_ the active sense timeout whenever it actually
    executes an all-notes-off.  At least that way, during a live
    performance,  you'll get glitched (once) but not permanently nailed.
    
    	-Bill (who doesn't have any active sensing equipment)
    
                                                             
1365.6well, whadyaknow!MIZZOU::SHERMANBaron of GraymatterTue May 17 1988 12:486
    I never even *heard* about active sensing until I read this file.
    Then, I saw a software switch for it on my S-10.  Haven't noticed
    anything on my other stuff that supports it.  But, maybe someday
    I'll use/abuse it...  ;-)
    
    Steve
1365.7This may be in the wrong topic, but ...DYO780::SCHAFERBrad - DTN 433-2408Tue May 17 1988 19:505
    You can turn *OFF* active sensing on the KX76/88 boards by powering up
    while depressing the MODE switch.  This also disables MIDI clock, for
    what it's worth. 

-b
1365.8No problem found, but it's still not working right...AKOV68::EATONDWhere d' heck a' we!Mon Jun 27 1988 12:4443
	I've been dealing with this more, so I thought I'd open it up for 
discussion...

	Last Friday I called Roland Corp in CA to get some idea if my RD200 is
sending out bogus MIDI messages or 'spikes' that cause my other equipment 
periodic heartburn.  If you recall, certain other units in my setup were
reacting funny when hooked up to my RD - displays blanking out, missing or
stuck notes...  Well, I hoped to find out if there was some kind of software 
reset procedure to tell the RD to smarten up and leave the others alone.

	No reset.  They had never heard of a problem with the RD's.

	They had made a suggestion that the active sensing implementation 
between Roland and other manufacturers might have been the problem.  Seems that
Yamaha's active sensing doesn't wait the full 300ms before activating (or 
expecting) active sensing.  I'm not really sure what problems that would create.
All I know is that the MCS-2 would blank out at random intervals.  Could it be 
that the MCS2 (Which I returned), my MIDI DJ (which has a seemingly different
approach to MIDI in many of its implementations) and my C64 all react to active
sensing differently than Roland expects of them?

	Anyway, I found out I had a MIDI Monitor program this weekend and fired
it up in the C64 to watch what the RD was spitting out.  It's kind of funny
watching the way different manufacturers implement the MIDI specs (there was a
long discussion about this elsewhere).  The RD sends out a note on with velocity
value (which, btw, for a note-on command was never lower than 10).  For 
note-off's, it sent out a note on with a velocity of 0.  And then, any time all
the keys were lifted, it would send out a control change 123, which I gather is
an ALL NOTES OFF command (not the same thing as active sensing).

	Switching over to Yamaha (DX-21), it would send a note on, with velocity
of 64 (since it is a non-velocity-sensitive keyboard) and then a note-off 
command.  No ALL NOTES OFF command.

	The point of the excercise was to find out if the RD was sending 
strangeness out to the network, causing other devices to misfire.  I didn't see
anything out of the ordinary.  But I still can't get reliable results when I
plug the MIDI OUT of the RD to the MIDI IN of either the C64's sequencer or the
MIDI DJ sequencer.

	Sigh.

	Dan
1365.9Syntax/semantics again.PANGLS::BAILEYMon Jun 27 1988 18:4713
    I think that what the Roland guy suggested about the Yamaha equipment
    [not waiting long enough for active sensing] is probably hog-wash.
    This type of finger pointing always occurs in cross-vendor
    compatability situations.
    
    Either a note-off message or a note-on with zero velocity are valid
    at the release of a note.  The all-notes-off message when all the
    keys are released is a cute idea.  It should hardly be harmful one
    way or the other, though.
    
    How frequently do you get a glitch?
    
    Steph
1365.10AKOV68::EATONDWhere d' heck a' we!Mon Jun 27 1988 19:0610
re < Note 1365.9 by PANGLS::BAILEY >

	Yeah, I sensed a bit of the 'it's their fault' syndrome...

	The frequency of the problem is entierly random.  When I had the MCS2,
I clocked it anywhere from 2 to 30 seconds (it was easy to clock because it made
the display blank out).  And that was with NO MIDI network activity.

	Dan

1365.11How automatic all-notes-off can bite backCTHULU::YERAZUNISThe brain of Homo Sapiens is mainly composed of cabling.Mon Jun 27 1988 20:0416
    All-notes-off whenever nothing is down is a _bad_ idea.
    
    Here's why:
    
    Scenario- two of these ANO keyboards, being played into a chain of
    ESQ-M's (or any other module that supports overflow mode). Merging is
    done either in an external box, or via a soft switch in the 2'nd
    keyboard (merge MIDI-IN with KB onto MIDI-THRU) 
    
    Now, what happens when the second keyboardist lifts all fingers
    when the first is holding a long, sustained chord?  Why, the second
    keyboard sends an all-notes-off, which silences the extended chord
    from the first keyboardist, who now wonders if his sustain pedal
    has a bad connector.
        
    	-Bill 
1365.12What good *is* active sensing?DYO780::SCHAFERBrad - DTN 433-2408Mon Jun 27 1988 22:1713
    Dan/Steve -

    There are problems with Y-gear "turning off" if active sensing is
    deemed to be improper.  In other words, if Y-word gear sees active
    sensing but can't "sync" or understand it, it will shut down.

    I just read this in a Yahama manual the other day.  Since the MCS was
    shutting down on Dan, my guess is that the RD was sending something
    that made the MCS become confused, sending into catatonia.

    I wonder if there's a market for MIDI psychologists?

-b