Forums | Search | Archives

 All Forums
 Cool Edit
 FFT filter.
 
Author  Topic 
pin





Posts: 2


Post Posted - Sat Apr 13, 2002 5:28 am 

I would like to make more presets like 'ringing A's' for other notes.
Is there a way to write presets like code ?......
can anyone tell me If you can and how.
Thanks.
Go back to top
SteveG


Location: United Kingdom


Posts: 6695


Post Posted - Sat Apr 13, 2002 6:48 am 

Strictly speaking, yes. CE presets get stored in the cool.ini file in a form of code, and they have been swapped around between people in this form for ages. But if you want to change the notes in the ringing 'A's preset, you will probably have to experiment with the values actually using the preset itself to confirm that it works properly. On the other hand, once you've discovered the relationship between the notes and the numbers (if there is an easy one), then you probably could write them directly. You'll have to experiment...

Steve

Edited by - SteveG on 04/13/2002 06:49:10 AM

_________________
Go back to top
younglove





Posts: 314


Post Posted - Sat Apr 13, 2002 10:42 am 

The "Ringing A's" are FFT notches for multiples of 440 Hz. The Hz values for the notes of
the Major Scale are:

C 264
D 297 (264 x 9/Cool
E 330 (297 x 10/9)
F 352 (330 x 16/15)
G 396 (352 x 9/Cool
A 440 (396 x 10/9)
B 495 (440 x 9/Cool
C 528 (495 x 16/15), (264 x 2)
Go back to top
moregan


Location: USA


Posts: 17


Post Posted - Sat Apr 13, 2002 3:50 pm 

I poked around with the format for FFT filters a few months back, and you're welcome to what I found out. What the FFT GUI sets up in COOL.INI is a set of (x,y) coordinates representing each control point. In 44.1K the upper-left corner is (0,0), and the lower-right corner you can treat as as (4096, 100) for practical purposes. To play around with the FFT filters in COOL.ini you have to know what the first few of the comma-separated values mean:

first value=the filter name
second value=??? (I just leave it at 3)
third value=number of control points,e.g. 8
fourth value=X coordinate of the first control point
fifth value=Y coordinate of the first control point
...[etcetera until all the control points are done]

If like me you aren't able to place your control points precisely enough on the GUI, you can get exactly what you want by entering the right numbers. I work a lot from spectral view, so I wanted to map X values 0 - 4096 to frequencies. I came up with: http://www.stresscafe.com/mike/ce/hzchart.txt.

That was fine until I wanted to notch out someone tuning his fiddle that was obscuring the speech on a particular recording. Not only did I have to notch 295Hz but many multiples thereof above it. There's not enough time in the day to do that sort of thing by hand, so I whipped up a bare-bones web page that creates the FFT filter for me: http://www.stresscafe.com/mike/ce/fftseries.php. I just have to paste it into COOL.INI and change the "??" in "Item??" to the next-highest number amoung the FFT filters and I'm good to go.

Have fun playing around.

Mike
Go back to top
pin





Posts: 2


Post Posted - Sat Apr 13, 2002 11:50 pm 

wow, thanks alot for your help

Edited by - pin on 04/13/2002 11:55:09 PM
Go back to top
alofoz


Location: Australia


Posts: 434


Post Posted - Sun Apr 14, 2002 12:54 am 

Actually, the figures given above by Younglove are for the natural scale of C major. If you want the even tempered scale, which is the tuning on a piano, each semitone differs from the next by the twelvth root of two. In concert pitch, allowing any key to be played, this gives:-

C 261.63
C# 277.18
D 293.66
D# 311.13
E 329.63
F 349.23
F# 369.99
G 392.00
G# 415.30
A 440
A# 466.16
B 493.88
C 523.25

Cheers,
Alan

_________________
Cheers,

Alan
Go back to top
alofoz


Location: Australia


Posts: 434


Post Posted - Sun Apr 14, 2002 12:55 am 

Mike,

Your links appear to be broken.

Cheers,
Alan

_________________
Cheers,

Alan
Go back to top
post78


Location: USA


Posts: 2887


Post Posted - Sun Apr 14, 2002 3:04 am 

Quote:
Mike,

Your links appear to be broken.


Just get rid of the periods at the end.

_________________
Answer = 1. Probably.
Go back to top
alofoz


Location: Australia


Posts: 434


Post Posted - Sun Apr 14, 2002 3:15 am 

Not very observant of me! However the first link still doesn't seem to work.

Cheers,
Alan

_________________
Cheers,

Alan
Go back to top
moregan


Location: USA


Posts: 17


Post Posted - Sun Apr 14, 2002 7:30 am 

Yes, I bumgled in putting sentence-ending periods at the end of the urls. Neither link is working correctly right now because of web hosting problems. hzchart.txt is unreachable and fftseries.php returns you the PHP program instead of the form for creating your filters :-(

hzchart.txt is probably too big to post directly (4K lines), but if you have Perl installed on your machine the program to generate it is very short:

my $startFreq = 21.3877;
my $ratio = log(22050.0/$startFreq)/4096.0;

foreach my $xPoint ( (0..4096) ) {
printf( "x value: %4d Hz: %8.2f\n", $xPoint, exp($ratio*$xPoint)*$startFreq );
}
Go back to top
moregan


Location: USA


Posts: 17


Post Posted - Sun Apr 14, 2002 2:46 pm 

OK, for anyone interested, the mapping from [0..4096] to Hertz at 44.1K is here: http://www.stresscafe.com/mike/ce/hzchart.txt

The web page to generate FFT filters is here: http://www.stresscafe.com/mike/ce/fftseries.php3
Go back to top
bonnder





Posts: 215


Post Posted - Fri Apr 04, 2003 5:21 pm 

I don't know Perl and I would like to be able to generate the X-Value on the FFT Filter for any given frequency. Is such a thing possible?

1. Are the FFT Filter X-Values limited to whole numbers? (Does this answer depend on what version of CE one is using?)

2. Can anyone translate Moregan's Perl formula for me so that I can get the "X-Value" on the FFT Filter for any given frequency? For example, what would the formula look like to get the "X-Value" for 1457 hz? Standard mathematical notation suitable for a spreadsheet is what I am looking for.

Thanks in advance for your help.
Go back to top
bonnder





Posts: 215


Post Posted - Mon Apr 07, 2003 11:21 am 

Go back to top
tlenthe


Location: USA


Posts: 11


Post Posted - Tue Jul 08, 2003 12:13 pm 

I've been trying to understand the formula(s) myself and think (with the help of some spreadsheet work), here it is, along with the derivation. If anyone see's an error, please let me know! - Ted

Firstly, the minimum and maximum frequencies need to be fixed. This appears to be a function of the sample rate of the waveform in use. THEREFORE, THE FREQUENCIES ARE A FUNCTION OF THE WAVEFORM SAMPLE RATE. Using the common CD 44100 rate:

maximum frequency = sample rate / 2 = 44100 / 2 = 22050 Hz
minimum frequency = maximum frequency / 1030.86 = 21.39 Hz

(no theory on the value of 1030.86, the number just works out that way!)

The frequency band is broken into 4096 equal steps for setting the FFT points. However, these are equal steps in either the linear or lograthmic frequency band. Since most work is done in the lograthmic band, the process (forumlas) to convert frequency to a particular of the 4096 steps is:

log10( 22050) = 4.3434 (let's call this HI_LOG)
log10(21.39) = 1.3302 (let's call this LO_LOG)

(The frequency range in log10 scale is HI_LOG - LO_LOG = 3.0132)

Each "step" is one 4096th of this range.

All the calculations are done in the "lograthmic scale" since the frequency axis is lograthmic. To convert a specific Hz frequency value to a step, the following conversion is used (For demonstration, use A=440Hz) :

Log10(440) = 2.6435 (let's call this A_LOG)

Now we need to take the ratio of the desired frequency
relative to the total frequency range:

A_LOG - LO_LOG 2.6435 - 1.3302
-------------- = ---------------- = 0.4583
HI_LOG - LO_LOG 4.3434 - 1.3302

Mulitplying this ratio by the 4096 steps:

4096 * 0.4583 = 1785.16 --> round to integer 1785

Therefore, the count value for A440 (IN A 44100HZ SIGNAL!!) is 1785. Working in the linear frequency scale, the calculation would be similar, just substitute the actual frequency values instead of their logs.

PS - If anyone is interested, I have pretty much decoded the rest of the control values in the cool.ini for the FFT function.






Go back to top
tlenthe


Location: USA


Posts: 11


Post Posted - Tue Jul 08, 2003 4:51 pm 

Here's as much of the FFT filter format as I could decode. Note that the actual file has each item separated by commas, but I have listed on separate lines below for readability. - Ted

PS - Is there a way in CE2K to copy the FFT analysis spectrum in order to paste to another application?

Item##=filter name
3 (always 3, don't know why)
# points in starting filter
1st x (frequency) coord (integer 0 to 4096)
1st y (amplitude) coord (integer 0 to 100)
2nd x (frequency) coord (integer 0 to 4096)
2nd y (amplitude) coord (integer 0 to 100)
etc.
# points in ending filter
1st x (frequency) coord (integer 0 to 4096)
1st y (amplitude) coord (integer 0 to 100)
2nd x (frequency) coord (integer 0 to 4096)
2nd y (amplitude) coord (integer 0 to 100)
etc.
amplitude scale (1=passive; 2=lograthmic)
Morph (0=off;1=on)
#FFT samples for morphine (=#FFT samples / Precision Value)
Lock to constant (0=no, 1=yes)
# transition points
1st x (time) coord (integer 0 to 4096)
1st y (amplitude) coord (integer 0 to 100)
2nd x (time) coord (integer 0 to 4096)
2nd y (amplitude) coord (integer 0 to 100)
etc.
FFT window type (0 to 5 per drop-down list: triangular, etc.)
min value passive scale (usually 0)
max value passive (usually 100)
min value log scale (i.e. -10)
max value log scale (i.e. +3)
# FFT samples (i.e. 16384)
2 (these two values correspond somehow to the check box "Graph response at point)
1 (the 2,1 pair is unchecked and the 1,0 pair is checked)
Frequency Scale (linear=0, log=1)
Splines (1=use splines, 0=no splines)
Sample rate (i.e. 44100 - This is added when making a filter interactively,
but doesnt' seem to be required in the cool.ini file)


Go back to top
bonnder





Posts: 215


Post Posted - Tue Jul 08, 2003 7:37 pm 

tlenthe - thanks for the info. It seems so long ago that I posted my question but it was only April 03? Been through the sale of the company and the shutdown of the forum (temporarily, it turns out) and the building of an FFT preset spreadsheet since nobody answered my question til now. April seems so long ago.

I am hoping to post my FFT preset spreadsheet and a few other items by next week for the general forum community to download and vet. I may e-mail you directly when I do so you can have a look-see and give me your feedback.
Go back to top
tlenthe


Location: USA


Posts: 11


Post Posted - Wed Jul 09, 2003 7:17 am 

Hi Bonder! This is exactly what I trying to do! I have a spreadsheet (Excel 2000 version) which I would be glad to share, although it is pretty crude. I haven't come up with a convenient method in excel to deal with the varying number of points. However, the spread-sheet DOES have a section to readily calculate the "index" points given the sample rate. I don't have a web page to post this to. What's the best way to share this file? - Ted
Go back to top
bonnder





Posts: 215


Post Posted - Wed Jul 09, 2003 7:44 am 

When I get ready to post my spreadsheet in a week or so, I'll give a holler through e-mail. We can post yours and mine together and the forum community can vet both of them. Then we can combine the best of both - or keep both and clearly label each if the purposes of each spreadsheet are different enough. If you haven't entered an e-mail address at your profile section, if have. Send me an e-mail so I can get back to you.

For what it's worth - this vetting is now going to be more of a rush job than I initially imagined. We are working against a late August deadline for possibly shutting down this forum. If we get a good transition to the Adobe Audition forum and it works well enough to attract user, then we can continue the process over there. If not ....
Go back to top
bonnder





Posts: 215


Post Posted - Thu Jul 17, 2003 10:13 am 

tlenthe - I've uploaded the spreadsheets to a temporary spot and sent you an e-mail where to find them. Because the instructions are not finalized yet I hesitate to publish the location for fear of being swamped with newbie questions. If you did not receive my e-mail and need directions to the Collaboration site, post back here.

Anybody who is interested in vetting a couple or three Excel spreadsheets for generating FFT Presets should find their way to the Collaboration site. I've provided a space there for making comments, or you can e-mail me directly. We can have an on-line discussion about any or all of this over at the Timelinecenter, but let's wait until tlenthe gets his spreadsheet(s) uploaded. And we should probably wait to have an on-line discussion until the instructions are firmed up a bit also.

I've placed these files at the Collaboration site temporarily because my web site host just reduced our upload capacity from 2 MB to 1 MB and my spreadsheets are about one and a half MB each.
Go back to top
   Topic 
Page:


Powered by phpBB 2.0.11 © 2001, 2002 phpBB Group