Re: active sensing

From: Luc Tanguay <lucus_at_sympatico.ca>
Date: Tue Jul 05 2016 - 04:04:32 CEST
Bonjour Alexandre.

I did download midish 1.1.1 tar and adapted the code to allow easy 
on/off active sensing behavior.  I simply added the option "-a" to 
disable "active sensing".  Default behavior (when the option -a is not 
set) is to keep "active sensing" as before.

See attached "diff -ur midish-1.1.1 midish-1.1.1-LT" output.

Since active sensing is in the "System Real Time " category of MIDI 
messages, I think it should be set per device.  I'll try to see if I can 
do some hacking in "mididev" to add a setting for this.  But for now the 
proposed solution (the option "-a") will do the job for me. It is up to 
you if you want to integrate it to the official source code.

Regards,
Luc

On 16-07-03 05:05 AM, Alexandre Ratchov wrote:
> On Fri, Jul 01, 2016 at 11:40:21PM -0400, Luc Tanguay wrote:
>> Hi.
>>
>> I'm using midish to send program change to DR-3 and DD-65 drum machines (to
>> change drum kits from Linux scripts).  I have one issue when I send PC to DR-3
>> because midish sends Active Sensing when it flushes the output buffer.  When
>> DR-3 receives Active Sensing it stops if it does not continue to receive such
>> messages in a timely fashion.
>>
>> So, (1) why midish sends Active Sensing? (2) Can it be turned off?
>>
>> Here's how I use midish in a bash script:
>>
>>      midi_dev_port="36:0"
>>      pc=2 # from 0 to 99
>>      midish -b <<END
>>      dnew 0 "$midi_dev_port" wo
>>      onew dr3 {0 9}
>>      oaddev {pc dr3 $pc}
>>      p
>>      END
>>
> there's no knob to turn it off.  You could just comment the code
> sending the active sensing until we add the knob to control it
>
> Index: mididev.c
> ===================================================================
> RCS file: /var/anoncvs/midish/midish/mididev.c,v
> retrieving revision 1.54
> diff -u -p -u -p -r1.54 mididev.c
> --- mididev.c	13 Sep 2013 08:47:06 -0000	1.54
> +++ mididev.c	3 Jul 2016 09:03:05 -0000
> @@ -515,9 +515,11 @@ mididev_puttic(struct mididev *o)
>   void
>   mididev_putack(struct mididev *o)
>   {
> +#if 0
>   	mididev_out(o, MIDI_ACK);
>   	if (o->sync)
>   		mididev_flush(o);
> +#endif
>   }
>   
>   /*
>

-- 
Déjà f*in*i!

Luc Tanguay
Bo/u/cherville (Québec)


Received on Mon, 4 Jul 2016 22:04:32 -0400

This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:32:29 CET