FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Tools
(Moderator: REAS)
   Sound (Pitch / Frequency and volume)
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Sound (Pitch / Frequency and volume)  (Read 4614 times)
David_Marks

davidmarks22 Email
Sound (Pitch / Frequency and volume)
« on: Feb 13th, 2003, 10:51am »

Hi,
 
Was just wondering if it is possible to detect the pitch / frequency and volume of a microphone? I have a project that requires this, and was hoping to have a play with proce55ing, but could not see any examples, though I figured that it is still in the beta stage.
 
David.
 
REAS


WWW
Re: Sound (Pitch / Frequency and volume)
« Reply #1 on: Feb 13th, 2003, 11:45am »

We don't have that yet, but unlike most features we don't have, nobody is currently working on this. I think it's really essential, though.
 
David_Marks

davidmarks22 Email
Re: Sound (Pitch / Frequency and volume)
« Reply #2 on: Feb 13th, 2003, 6:05pm »

ok. I will keep on looking. thanx for the quick reply though.
 
David.
 
Rien Daamen

Email
Re: Sound (Pitch / Frequency and volume)
« Reply #3 on: Nov 24th, 2003, 12:02pm »

Hi,
 
Coming from Director, lingo, I knew it was possible with FFT Xtra ( Fast Fourier analyses to read volume per frequencie-range).
I think you should try to find FFT for JSyn.
 
pitaru

WWW Email
Re: Sound (Pitch / Frequency and volume)
« Reply #4 on: Jan 2nd, 2004, 2:46pm »

microphone volume/fft can be done using sonia - http://pitaru.com/sonia ... see the liveInput example.
 
-amit
 
 
zach


Re: Sound (Pitch / Frequency and volume)
« Reply #5 on: Jan 2nd, 2004, 3:39pm »

can you be more clear about what you mean when you say "pitch / frequency"
 
a pitch (like the note 'a' = 440 Hz) has a specific frequency
 
this is a hard problem (one which I have worked on) that requires somewhat different solutions depending on whether the input is a voice or instrument.  The best approach to begin is to look at the auto-correlation of a sliding scale of audio data.  I sort of doubt that this could be implemented in real time in java (but then again, many proce55ing things prove me wrong in this respect)
 
on the other hand, FFT converts a time domain signal into a frequency domain signal.  You are not given one specific pitch or frequency, but rather a list of frequencies and their relative proportions in the audio signal.  this is like an equalizer and how it tells you how much bass, midtone and treble are in a signal. It will not, unfortunately, tell you that the note is a person is humming is 440hz.  That requires a higher level of logic.
 
hope that helps  
- zach
 
christian


Re: Sound (Pitch / Frequency and volume)
« Reply #6 on: Jan 2nd, 2004, 9:20pm »

hi
i am also concerned with freqs and an audiofanatik.
so: there are some posibilities to solve that problem  
that any sound is an addition of many different  
frequencies, with exception of a sinusWave:  
if you are able to define the specific
freqParts of lets say a guitar at a4, you can tell  
how this would be at a3 and so on, even if its  
quite difficult and some good deal of action.
but what is your specific interest about frequencies?
 
zach


Re: Sound (Pitch / Frequency and volume)
« Reply #7 on: Jan 2nd, 2004, 9:36pm »

my interest is primarily in speech - calculating the pitch of a singer
 
since there are many sources of vibration in human voice production, this is a hard job.  
 
I worked on a concert which visualized the speeches, shouts and songs of two vocalists using custom written real-time analysis and graphical software.
you can check it out here:
http://tmema.org/messa/
 
Pitch is even a hard job to do with instruments, where the sources of vibrations are a bit more predicatable then human voice because the pitch detector so easily mistakes subharmonics for the actual pitch.  It is usually *not* done using FFT information but by look at the periods of repetition in a signal.  Only certain things (whistling / synthesizers / sine waves ) are trackable by FFT alone.  that said, some instruments are easier then others.  
 
this book has some great information on pitch detection:
http://www.amazon.com/exec/obidos/tg/detail/-/0262680823/103-2777505-666 2245?v=glance
 
- zach  
 
 
 
arielm

WWW
Re: Sound (Pitch / Frequency and volume)
« Reply #8 on: Jan 3rd, 2004, 12:50am »

incredible, and so inspiring! i wish i could see this performance!
 
2 questions to zach:
- does this system deal with motion tracking (on the performers)?
- is there a .mov of the piece with the comics strips? (is the text shown inside the bubbles is what they actually say?)
 
10-x
 

Ariel Malka | www.chronotext.org
zach


Re: Sound (Pitch / Frequency and volume)
« Reply #9 on: Jan 3rd, 2004, 6:06am »

hi  
thanks!  I wish more people could see it too.
answers to your questions:
 
1) yes it tracks performers position on stage, locates their heads and from that guess a reasonable mouth position.
 
2) I will dig the movie up.  The balloons are the end sequence for the concert where each says the name of the other and then a word balloon appears.  The balloons have a funny bounce and they dip when the performers bows. I'll edit this post when I can find it.
« Last Edit: Jan 3rd, 2004, 6:06am by zach »  
Steve

nerdytone WWW Email
Re: Sound (Pitch / Frequency and volume)
« Reply #10 on: Jan 9th, 2004, 10:13pm »

I find it hard to believe that detecting pitch could be that difficult, when a simple tuner can be bought and works wonderfully. what is the tuner using that is so hard to reproduce using all the information given to us with amit's sonia?
 
-steve
 
zach


Re: Sound (Pitch / Frequency and volume)
« Reply #11 on: Jan 10th, 2004, 7:15am »

these devices typically are:
(a) analog or use DSP chips
(b) use autocorrelation
(c) some of them even use neural networks for frequency  
estimation  
(d) built for a single insturment
 
sonia gives you digital samples in frames but in order to implement a reliable pitch detector you will need to do quite a bit of work.  By all means, please try.  I'm not saying it can't be done, but when during all the times I have worked on DSP operations (on floating point audio data) I have felt that java bristles under the load.  
 
pitch is a complex problem relating to human perception.  In voice, the fundemental frequency is often weak and there can be two or three competing.
 
In order to do it, you have to implement autocorrelation, peak tracking, median filtering, and prob some other logical systems.  In the end, as with most DSP, there is no one right way to do it (google will show you this), it's just one series of hacks on top of another...
 
please dont get me wrong, it could be totally possible. I'm not trying to dissuade people.  I'm just saying that the tool I have used and would use to implement accurate pitch detection would be C.
 
zach  
 
 
Steve

nerdytone WWW Email
Re: Sound (Pitch / Frequency and volume)
« Reply #12 on: Jan 10th, 2004, 10:38am »

that makes sense. i got to thinking about it with the human voice and it seemed to be a lot more complex than a clean guitar string vibration. so if i were to try it wouldnt be for voice, but thanks for the heads up.
 
-steve
 
pitaru

WWW Email
Re: Sound (Pitch / Frequency and volume)
« Reply #13 on: Jan 10th, 2004, 3:45pm »

Steve,  
 
As Zach explains - Computers are not currently fast enough for handling the task with hi-level languages. Still, you can make some compromises to even the odds:
 
the more you constrain the input scope, the less computation is needed. For example - you can have the system tuned for a specific singer, and record the vocalist hitting each note on the scale. Than you may be able to compare the recorded data with live input.
 
This idea, or many like it, may result in a joyful pursuit, using Processing.
 
 
cheers,
-amit
 
kiwu


Re: Sound (Pitch / Frequency and volume)
« Reply #14 on: Oct 20th, 2004, 9:23am »

great!jaap blonk...amazing works!!!
 
Pages: 1 

« Previous topic | Next topic »