From alsa-devel-owner@alsa.jcu.cz  Mon Apr 27 23:09:18 1998
Received: from lap.anet.cz (lap.anet.cz [194.50.6.132])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id XAA13553;
	Mon, 27 Apr 1998 23:09:03 +0200
Received: from obelix.fvdpol.inter.nl.net (root@bd99-26.Breda.NL.net [193.79.246.251])
          by lap.anet.cz (8.8.5/8.8.4) with ESMTP
	  id XAA03046; Mon, 27 Apr 1998 23:08:44 +0200 (MET DST)
Received: (from frank@localhost) by obelix.fvdpol.inter.nl.net (8.8.7/8.7.3) id WAA32308; Mon, 27 Apr 1998 22:53:03 +0200
From: Frank van de Pol <F.K.W.van.de.Pol@Inter.NL.net>
Message-Id: <199804272053.WAA32308@obelix.fvdpol.inter.nl.net>
Subject: Re: Question about sequencer midi
To: alsa-devel@jcu.cz
Date: Mon, 27 Apr 1998 22:53:03 +0200 (MET DST)
Cc: alsa-user@jcu.cz
In-Reply-To: <353C64BB.237C@bath.ac.uk> from "P.J.Leonard" at Apr 21, 98 10:19:55 am
Content-Type: text
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

P.J.Leonard wrote:
> 
> > 
> > It's not true. OSS driver can handle events directly, too: look for
> > SNDCTL_SEQ_OUTOFBAND ioctl. (Only for illustration, I don't like OSS/Lite
> > sequencer for any use).
> 
>  But it does not work properly (unless they fixed recently). I have
> talked
> about this with the rosegardeners and the person who does the jazz
> stuff.
> SNDCTL_SEQ_OUTOFBAND  screws up notes already beeing played via the
> buffer
> mechanism.

The OUTOFBAND event directly sends te event down to the driver. This should
not give any problem, however if the normal queued interface is also using
the same device, their corresponding MIDI note on / note off's seem to get
mixed up. 




> > 
> > > I know that midi support has not been fully implemented yet, but have
> > > you thought about what I've told ?, what do you think about it ?
> > 
> > No MIDI support is implemented at current time, but I'm now working on
> > raw-midi interface (like /dev/midi0 with OSS, but more enhanced) and after
> > this I'm planning make some proposals (all ideas are welcome) for MIDI
> > interface which will use only external devices at first time, but it will
> > be extended for use with internal onboard synthesizer, too.
> > 
> > If we speak about OSS sequencer: My idea for ALSA driver is separate MIDI
> > events from synthesizer events to make interfaces more clean. There is two
> > types of programs: MIDI players/sequencers and module players or programs
> > for audio effects. Comments?

What's real difference between MIDI events and synthesizer events? Perhaps
I'm missing a subtile difference but basicly both events are used to have a
device generate (or modify) some sound at a specified time. 

  
 
>  Long term I think we should be thinking about a complete midi/audio API
> to be used by higher level applications. The midi and audio start to
> merge
> together once you start considering real time synthesis that uses the
> D/A
> output (/dev/dsp ) as a virtual midi device.

Sounds good! 


>  If you want such a virtual synth to respond to midi in events in real
> time
> then you start hitting some interesting timing problems. If you are
> going to
> synthesise the waveforms in the users application you rely on the 
> system kernel to give you CPU time when you want it. In the standard
> linux
> kernel YOU CAN NOT RELY ON GETTING THAT TIME WHEN YOU WANT IT.

Then we should do it in the kernel, and get that time every time our device
(eg. MIDI uart) generates an interrupt. Of course we have to be carefull to
to overload the system, but the OSS does have a soft synth, so it's proven
that the concept is feasible.


> 
>  This problem must be addressed at some point. One solution might be to
> use
> the micro-second system kernel patch that allows you to run your own 
> application at a higher priority than the kernel (guaranteed micro
> second
> resolution yum yum). My own investigations indicate that 20mS is the
> best resolution

The human ear is (according to some scientists...) not capabable of
differenciating distinct sounds with timing shorter than a few ms (I thought
I read about 10 ms). True micro second resolution is pure overkill, though a
1ms instead of 20ms whould be a big improvement.


Regards,

Frank.


========================---------------->
#define NAME    "Frank van de Pol"     
#define ADDRESS "mgr. Nelislaan 10"  
#define CITY    "4741 AB Hoeven"    
#define COUNTRY "The Netherlands"  
#define EMAIL   "F.K.W.van.de.Pol@inter.NL.net     -o)
                                                   /\\
Linux - Why use Windows, since there is a door?   _\_v

