All of lore.kernel.org
 help / color / mirror / Atom feed
* Source of timing for MIDI and/or audio synchronization
@ 2007-06-12  6:17 Mark Rivera
  2007-06-12 12:23 ` Dmitry Baikov
  2007-06-12 12:29 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Rivera @ 2007-06-12  6:17 UTC (permalink / raw)
  To: alsa-devel


Hello (new to list), and thank you for the work you have been doing. As 
an end-user of the ALSA project's development, I am very grateful for 
being able to use softwares which provide audio functionality to Linux.

I have been reading up on the docs and list archives, but I still have 
an open question for which I hope you can lead me to an answer.

I designed and built a MIDI sequencer based around a Microchip PIC18 
MCU, and used the built-in hardware timers and interrupt levels to drive 
the 'scheduler' for initiating MIDI output (EUSART) routines. In this 
same vein, I would like to write a software sequencer with as 'tight' 
timing as possible. So, in a similar concept for Linux - from where does 
the timing of audio and MIDI events come from?

It occurred to me that it would be nice to have a loadable kernel module 
(LKM) to which userland programs could subscribe for receiving 'soft 
interrupts' based on some timer (cpu ticks?) so that various software 
could all reference the same notion of the "current time" - a sort of 
"master clock" with start/stop/continue as well.

Does ALSA provide this functionality? Can someone point me in the right 
direction for learning more about this?

Many thanks.

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Source of timing for MIDI and/or audio synchronization
  2007-06-12  6:17 Source of timing for MIDI and/or audio synchronization Mark Rivera
@ 2007-06-12 12:23 ` Dmitry Baikov
  2007-06-12 12:29 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baikov @ 2007-06-12 12:23 UTC (permalink / raw)
  To: Mark Rivera; +Cc: alsa-devel

Hi Mark,

On 6/12/07, Mark Rivera <marr@lumin.us> wrote:
> I designed and built a MIDI sequencer based around a Microchip PIC18
> MCU, and used the built-in hardware timers and interrupt levels to drive
> the 'scheduler' for initiating MIDI output (EUSART) routines. In this
> same vein, I would like to write a software sequencer with as 'tight'
> timing as possible.
Man, join linux-audio-dev list, you'll be our god :)

> So, in a similar concept for Linux - from where does
> the timing of audio and MIDI events come from?
> It occurred to me that it would be nice to have a loadable kernel module
> (LKM) to which userland programs could subscribe for receiving 'soft
> interrupts' based on some timer (cpu ticks?) so that various software
It think you should look into hpet/rtc devices.

You also may be interested in jack and especially midi-over-jack
(which I, in fact, maintain).
It is an audio-sample-syncronous midi transport.
You may look into my jackmidi-driver for details about event timing.
I even hope you can help to make better :)

And I'm also very interested in writing a good sequencer.

Regards,
Dmitry.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Source of timing for MIDI and/or audio synchronization
  2007-06-12  6:17 Source of timing for MIDI and/or audio synchronization Mark Rivera
  2007-06-12 12:23 ` Dmitry Baikov
@ 2007-06-12 12:29 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2007-06-12 12:29 UTC (permalink / raw)
  To: Mark Rivera; +Cc: alsa-devel

At Tue, 12 Jun 2007 01:17:57 -0500,
Mark Rivera wrote:
> 
> 
> Hello (new to list), and thank you for the work you have been doing. As 
> an end-user of the ALSA project's development, I am very grateful for 
> being able to use softwares which provide audio functionality to Linux.
> 
> I have been reading up on the docs and list archives, but I still have 
> an open question for which I hope you can lead me to an answer.
> 
> I designed and built a MIDI sequencer based around a Microchip PIC18 
> MCU, and used the built-in hardware timers and interrupt levels to drive 
> the 'scheduler' for initiating MIDI output (EUSART) routines. In this 
> same vein, I would like to write a software sequencer with as 'tight' 
> timing as possible. So, in a similar concept for Linux - from where does 
> the timing of audio and MIDI events come from?
> 
> It occurred to me that it would be nice to have a loadable kernel module 
> (LKM) to which userland programs could subscribe for receiving 'soft 
> interrupts' based on some timer (cpu ticks?) so that various software 
> could all reference the same notion of the "current time" - a sort of 
> "master clock" with start/stop/continue as well.
> 
> Does ALSA provide this functionality? Can someone point me in the right 
> direction for learning more about this?

ALSA sequencer queues may have different timer sources.  But, there
are no real synchronization between different timer sources.  It was
my former interest, and you can find some pieces of codes (e.g. queue
time skew setting).  It worked somehow but not deployed to the real
apps since then.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-12 12:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12  6:17 Source of timing for MIDI and/or audio synchronization Mark Rivera
2007-06-12 12:23 ` Dmitry Baikov
2007-06-12 12:29 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.