|
|
|
|
#1 |
|
Junior Member
Join Date: Apr 2004
Posts: 2
|
Frequency
I am very new to AVS. Please excuse my questions if they seem simple, pointless or stupid. That aside I am curious if one is able to detect the specific frequencies in the song? My plan is to do beat detection. However from what I have read in the forums they are not tailored to what I would like. I want the avs to bump to the frequencies a subwhoofer would move to. This would be 25-100 hz for me. Can somebody help or give me a place to find what I am looking for? Thank you in advance.
Jon |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: May 2001
Location: somewhere else
Posts: 1,286
|
getspec(band,width,channel) and getosc(band,width,channel)
band and width are 0 to 1, channel is 0- center, 1- left, 2- right powered by C₈H₁₀N₄O₂ |
|
|
|
|
|
#3 |
|
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104
|
m²k: that won't help one bit, if you don't know the spectrum and frame size.
To figure out framesize, use a superscope like this: x=i*2-1;y=getspec(i/576*3,0,0) The framesize is 576, so a width (relative to 0..1) of 3/576 gives you 3 samples in the spectrum plot. As far as I know, framesize is independent on sampling rate. The highest frequency in the spectrum plot is the nyquist frequency, which is half your sampling rate. Most commonly the sampling rate is 44kHz, so the nyquist frequency is 22kHz. The lowest sample in the frequency component is the DC/0 Hz component. The second sample is 22 kHz / 576 = 38.2 Hz. The frequency scales up linearly, where frequency = (zero-based index) * 22 kHz / 576: So getspec(x,0,0), where x is: 0/576 -> 0 Hz/DC 1/576 -> 38.19 Hz 2/576 -> 76.39 Hz 3/576 -> 114.6 Hz ... 574/576 -> 21.92 kHz 575/576 -> 21.96 kHz 576/576 -> 22 kHz The frequency samples are discrete (as the superscope to discover framesize showed). To figure out in betweens, you would need to convolve the spectrum as dirac impulses, with sin(x*τ )/(x*τ ) where 2π/τ = frequency spacing. However, you might get away with just linear interpolation though. For MP3s with other sampling rates, the frequencies are different. As far as I know you can't access the sampling rate from AVS, but 99% of all MP3s are sampled at 44kHz anyway. Maybe you'll find some at 48kHz, but then the frequency shift is minimal. |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Feb 2003
Location: Somewhere in Canada
Posts: 776
|
Unconed:It's likely the n00b will get much more out of that than he would out of m²k's post. It's ummmm..., rather technical.
Darn, I can't think of anything to put here. |
|
|
|
|
|
#5 |
|
Forum King
Join Date: May 2003
Location: Fnord?!
Posts: 2,657
|
Nice post UnConeD
![]() You know way to many things for your own good... |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Apr 2004
Posts: 2
|
That helps a lot. I will have to learn some of the things you talk about but I get the jist of it. Just out of curiousity. Everything I listen to is wav files. So would the sampling be 48.1khz and the nyquist be 24.05kz? And if you guys could give me a link to a good site to learn more that would be great. Maybe like a tutorial? Thanks so much.
|
|
|
|
|
|
#7 |
|
Banned
|
I have a question: If my getspec was around 100/222 then what's frequency I will get?
I experienced this question many times, But, I did not get my favorite answer. If UnConeD knows please tell me. |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
WAV files? o_O big files
![]() on what do you need a tutorial? To use what unconed just explained: value=getspec(Hz/nyquist,0,channel); or value=getspec(Hz/sampling*2,0,channel); where channel is 0 for center, 1 for left and 2 for right channel If you can't say something nice, say something surrealistic. |
|
|
|
|
|
#9 |
|
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104
|
DynamicMovement: use your brain for 5 seconds and you should be able to figure it out with what I said.
|
|
|
|
|
|
#10 |
|
Major Dude
Join Date: Nov 2002
Location: Arnhem, the Netherlands
Posts: 927
|
For some good Tutorials search the forums for Atero's Primer and PiR's AVS tutorial. There's some good stuff on visbot as well. I'm still working on my own tutorials which will eventually come on www.iabvisuals.tk .
|
|
|
|
|
|
#11 | |
|
Member
Join Date: Apr 2004
Location: Slovenia [EU]
Posts: 69
|
Quote:
100/220*22khz=9909,909... Hz or 100*22Khz/220=9909,909... Hz I hope I am right
|
|
|
|
|
|
|
#12 |
|
Forum King
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,121
|
Please don't revive dead threads with useless information.
It is most likely the guy doesn't even read these threads anymore since these are his only two posts over the entire WA forum. Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|