From alsa-devel-owner@alsa.jcu.cz  Sun Jan  3 14:41:30 1999
Received: from obelix.fvdpol.inter.nl.net (frank@vande-pol.demon.nl [212.238.75.184])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id OAA20498
	for <alsa-devel@jcu.cz>; Sun, 3 Jan 1999 14:40:59 +0100
Received: (from frank@localhost) by obelix.fvdpol.inter.nl.net (8.8.7/8.7.3) id OAA20398; Sun, 3 Jan 1999 14:40:44 +0100
From: Frank van de Pol <F.K.W.van.de.Pol@Inter.NL.net>
Message-Id: <199901031340.OAA20398@obelix.fvdpol.inter.nl.net>
Subject: Re: ALSA Sequencer API
To: andreas@avix.rhein-neckar.de (Andreas Voss)
Date: Sun, 3 Jan 1999 14:40:43 +0100 (MET)
Cc: alsa-devel@jcu.cz (alsa)
In-Reply-To: <Pine.LNX.4.02.9901022342460.4225-100000@avix.localnet> from "Andreas Voss" at Jan 3, 99 00:05:19 am
Content-Type: text
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list


Andreas,
I also cc'ed this message to the ALSA develop mailing list.

Andreas Voss wrote:
> 
> Hello Frank,
> 
> when I wrote the jazz midi sequencer I found it very hard to implement a
> working midi-thru with the OSS API (with the OUTOFBAND ioctl). 
> 
> The problem is, that midi thru has to happen in 'real time', every little
> latency is noticable to a musician. As far as I read/understood the ALSA
> Sequencer concepts, the driver does all the timing during 'normal
> playback'. For timing reasons I believe the driver should be responsible
> for midi thru too. There should be an ioctl to activate/disable midi thru
> (some midi cards like mpu401 do midi thru in hardware and dont need driver
> support). Enabling midi thru would mean, that the driver echoes back all
> midi events from midi-in to midi-out, especially in parallel with normal
> midi playback.
> 
> This echoing has to be aware of the midi message formats. Example: a user
> application does playback and sends out a 3 byte note-on event. After the
> first byte has been send out, an event from midi in is received. Now the
> driver must complete the midi out message before echoing the midi-thru
> event from midi-in.
> 
> Maybe you take this into account for the ALSA Sequencer.
>
> Best regards,
> Andreas
> -- 
> Andreas Voss <andreas@avix.rhein-neckar.de>
> The Jazz Midi Sequencer: http://www.jazzware.com/
> finger andreas@www.jazzware.com for PGP public key
> 

Hi Andreas,
This MIDI thru is one of the things that was taken into account during the
ALSA sequencer design. The requirements for a usable MIDI thru are dependent
on the sequencer application and musician's habits. 

If one only needs to send out the incoming data (mixed with sequenced data)
things are fairly easy; in fact I use this in one of the test application
that come with the ALSA sequencer.

If an musician uses the sequencer for rerouting midi data to different
devices and channels depending on track that is to be recorded (eg.
steinberg cubase) this mapping should also be done for this midi thru: a
smarter midi tru is needed. If multiple mappings are used, and perhaps some
effects are applied (transpose, velocity tricks), things get more
complicated and APPLICATION SPECIFIC.

A simple mapping miditru feature can be implemented at sequencer kernel
level (which is a very good idea to provide BASIC functionality). If a more
advanced miditru implementation is needed this 'high end' sequencer
application should provide it's own low-level driver which implements this
functionality. Remember that a high end sequencer needs this immediate
action/low-latency for far more things than only the midi tru.


Andreas, what do you thing about this? I like your idea, and will definitely
put that 'mapping miditru' function in my inbox if that would be usefull.

Regards, and best wishes for 1999,
Frank.



+---- --- -- -  -   -    - 
|Frank van de Pol                  -o)
|Frank@vande-pol.demon.nl          /\\
|                                 _\_v
|Linux - Why use Windows, since there is a door?
|
|ALSA Sequencer: http://www.vande-pol.demon.nl/alsa/

