Haven't written anything using MIDI and JACK (or LADSPA), but would it be possible to 
have a such system as with Cubase where the softsynths are plugins which receive 
time-stamped MIDI events (time-stamp is an offset from the block beginning in 
samples). The MIDI-through events that come into sequencer from the external MIDI (in) 
port always have an offset of zero so the synth renders the data starting from the 
first sample in that block. Maybe we need an object which includes Jack an use the 
timing information to call connected LADSPA plugins with the ability to read MIDI 
events from a stream anc synchronize the MIDI events to audio events using audio clock 
source and separate tempo map (like in DirectMusic). Something which integrates the 
all separate pieces in audio API's (JACK, LADSPA) but also includes MIDI events and 
the timing and connections between them.
-Mikko

> -----Original Message-----
> From: ext Bob Ham [mailto:[EMAIL PROTECTED]]
> Sent: 16. August 2002 1:20
> To: Linux Audio Development Mailing List
> Subject: Re: [linux-audio-dev] midi events in jack callback (was:
> Reborn)
> 
> 
> On Thu, 2002-08-15 at 20:17, Paul Davis wrote:
> 
> > >I was actually thinking of ignoring time-stamps except 
> within the code
> > >that sequences events.  If my jack clients are given a 
> midi event (eg,
> > >noteon,) they should deal with it immediately.  Same goes for their
> > >despatches.  Is this not what I should be doing?
> > 
> > if your assumption is that you never get an event with an intended
> > delivery time of anything but "right now", then that sounds fine.
> > 
> > this seems like quite a restricting assumption. 
> 
> Well, what I have in mind is a superclass that passes the midi events
> to, eg a softsynth, through a virtual method.  It wouldn't be much
> trouble to make the superclass's code pay attention to time-stamps and
> only make calls on those that are stamped "now".  Except that removes
> the ability for the softsynth to accept events in the future, but I'm
> not sure how useful that would be.
> 
> I envisioned a system where a sequencer object delivers midi events to
> the softsynth.  Ie, all the time-specific magic would be in the
> sequencer object, rather than the synth/wave/whatever 
> objects.  Thinking
> more about it, tho, I can see this being bad.  Each object 
> would have at
> least two threads, and those with jack callbacks having another.  Lots
> of room for things going wrong, time wise.  I wanted it so that an
> object isn't necessarily a jack client.  Perhaps I'll have to change
> that.  More thinking to do, I fear.
> 
> Bob
> 
> -- 
> Bob Ham: [EMAIL PROTECTED]  http://pkl.net/~node/
> 
> 

Reply via email to