From: arnold(a)arnoldarts.de
To: linux-audio-dev(a)lists.linuxaudio.org
Date: Sun, 26 Sep 2010 23:24:35 +0200
Subject: Re: [LAD] writing a bpm counter with (or without) ALSA
I think the answer belongs to the list. Maybe others
will correct me...
Mea culpa, wrong click...
The audio-thread becomes the metronome. But don't
mix the chunks of data with
the tick of your bars:beats:ticks.
You get block of samples from the device (to write to or read from), you know
what samplingrate you use, you know how many samples you already processed.
From that you calculate your clock.
BTW: It sounds as if you are just beginning to write audio-apps: Start with
jack, its api for clients is easier then alsa's. At least that what I'm told,
I never used the alsa-api.
Another advantage of jack is that you get the global jack-transport for free.
Which means your sampler/looper will sync with your other soft-synths and with
your recording app.
Yes, this is my first audio app under linux and jack can bring a lot of benefits,
especially
the sync feature with another instrument, I will really consider it.
Thank you very much!
Have fun,
Arnold
Tb