aubio


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A plea for help with aubio's code



Hi Vassilis!

(cc-ing aubio mailing list)

thanks for your comments. sorry i took long time to reply.

The line of code you want to change line examples/aubiotrack.c. Attached
is a simple patch that should do what you want.

But remember: it is a fairly bad idea to use printfs inside the jack
process function, because printfs are not real-time safe. Best would be
using something like OSC...

Cheers, piem

On Sun, Jan 06, 2008 at 12:07:56AM +0000, Vassilis Pandis wrote:
> Hello,
> 
> first of all, thanks for aubio! I don't have the technical knowledge to truly judge whether it's
> as brilliant as I think it is, but for what it's worth, I think of it as a really impressive piece
> of work. Prior to trying it out, I didn't believe that beat tracking can be done that well
> (although admittedly, it does miss a beat here and there :-).
> 
> I want to write a program that will be fed a live audio stream and will ,with reasonable accuracy,
> find the tempo of the stream. My coding skills are severely lacking (not a programmer by trade) so
> I'm having trouble modyfing aubiotrack to do this. Basically what I want is*, when connected to
> jackd, to get aubiotrack to print "boo" on the screen whenever a beat is detected (instead of
> sending a "click" to the output). I've spent several hours trying, ultimately unsuccessfully, to
> find the relevant bit of code in examples/ so I decided to ask for your help. Obviously I'm not
> expecting a patch, but I would be grateful if you could point me to the relevant file in which I
> should look. 
> 
> Thanks again,
> Vassilis Pandis
> 
> 
> * Instead of using aubio as a library I decided it would make for a much simpler design to simply
> pipe the output of 'aubiotrack' and work from there. 
> 
> 
>       __________________________________________________________
> Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
> 
=== modified file 'examples/aubiotrack.c'
--- examples/aubiotrack.c	2006-07-22 09:43:30 +0000
+++ examples/aubiotrack.c	2008-02-22 16:28:14 +0000
@@ -47,6 +47,7 @@
       else 
         istactus = 0;
       if (istactus) {
+              outmsg("click\n"); 
               for (pos = 0; pos < overlap_size; pos++)
                       obuf->data[0][pos] = woodblock->data[0][pos];
       } else {