Hi there,

After weeks of unrelated-to-rosegarden delays, I'm finally updating the pitch 
tracker in
    branches/glasgow-pitchtracker-2009

The branch code currently just prints frequencies on the command-line; the goal 
is to show the frequency graphically, as in:
    http://www.n-ism.org/Projects/Microtonalism/rg-perf-review-screenshot.png

NB: if you check out this branch, please bear in mind that I'm not responsible 
for the original code.  I will make sure that it's in good quality before 
submitting patches for trunk, but my priority to date was just getting far 
enough that I could meaningfully discuss the below questions.  Having spent 
about 10 hours working on the previous guy's code, I'm entertaining various 
fantasies of a violent nature.  Fortunately, he's off in South America, so I'm 
safe (he could totally whip me in a fight!).


1)  Getting audio samples.  In order to display a realtime visual display of 
the pitch, we obvious need to compute the pitch, which requires raw audio 
samples.  At the moment, I've used the old src/sound/JackCaptureClient from 
earlier work.  However, I'm not certain if this is the best way to do things; 
if I were maintaining rosegarden, I'd be tempted to insist that the 
contributors rewrite src/sound/JackDriver to add realtime capture to the 
framework.

If the JackCaptureClient approach is acceptable, I'll rewrite it to fix the 
horribly ugly code.  If not, I'll make a first pass at working on JackDriver.


2)  Is slot pointerPositionChanged the best way of getting continual updates 
about time?  Currently, in src/gui/editors/pitchtracker.cpp, I've attached that 
signal to my PitchTrackerView::slotUpdateValues(timeT time), which polls the 
JackCaptureClient for data, and feeds that to the pitch detector.  Is there a 
better way of doing this?


3)  In order to use the old pitch detector code, I needed to add  fftw3  to 
Makefile.in.  Is that ok?  I normally wouldn't like to add a dependency, but 
fftw3f was in there anyway.


4)  Could somebody fix the page about code style?  I always get a blank page:
    http://rosegardenmusic.com/wiki/dev:coding_style
I know my additions don't match the existing code style (particular the older 
code that I haven't touched), and I can see some problems by comparing it to 
the existing rosegarden code, but it would be nice if that wiki page showed 
something.


5)  I dumped the pitch detector code into  src/misc/PitchDetector.  What the 
right place for it?
This class takes a buffer of samples and produces a pitch value.  I didn't 
think it was really sound/ material, since it wasn't an audio driver; it 
definitely isn't gui/, sequencer/, commands/, or document/.  That leaves base/ 
and misc/... unless you'd prefer it to be in sound/ or 
gui/editors/pitchtracker/.  I don't mind where it goes; just let me know where 
to put it.


Cheers,
- Graham

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to