Generating pure tones...
April 17, 2007 9:37 AM   Subscribe

Generating pure sound tones at a specific power level, for recording to a CD...

I'd like to generate sound with control over the following parameters:

• frequency
• channel (L or R)
• power (dB level)

1. I'd like to know if there is (free) software for Mac OS X which I can use to quickly generate tones at a specified frequency?

2. Also, is it sufficient to use an editor like Sound Studio to accurately set the level and channel of the tone?

3. When distributing a CD with these tones, are there technical issues I should know about with respect to authoring the disc, such that the power is accurately replayed on the end sound system? By this, I mean I would like to give this disc to someone, and if they played this disc, the power is accurate replayed for the listener.

What should I do to ensure this? Would I need a "calibration" track or pair of "normalization" tracks?
posted by Blazecock Pileon to Technology (17 answers total) 2 users marked this as a favorite
 
Csound is what I would turn to for total control over such parameters. Steep learning curve, though, if you've never programmed before (and even if you have, it's still rather quirky). It's a good resource to know, though, so maybe it would be worth it to you to learn . . . ? Tutorials abound.
posted by treepour at 9:44 AM on April 17, 2007


max/msp is another good tool for this, and has a 30 day free trial. the environment isn't the most user friendly interface in the world but decent tutorials abound.
posted by casconed at 9:51 AM on April 17, 2007


Audacity can do this, I think, but it might not have all the capabilities you seek.
posted by arco at 9:52 AM on April 17, 2007


You can't specify a power level in the recording (countless aspects of the playback system effect this). You will only be able to specify the signal, for which audacity will work fine (if you only need to generate pure tones). To ensure a specific power level, you will need to actually play it through your target system and use a SPL meter, adjusting gain until you reach the desired level.
posted by phrontist at 10:16 AM on April 17, 2007


#3 - if by "power (dB level)" you mean the sound pressure level (SPL) heard by the listener, you will have to calibrate the system with an accurate spl meter. With identical recordings, variations in player, pre-amp, power amp, speakers and even room effects can change the spl dramatically (and not identically across all frequencies).

Measuring audio in dB can be deceptive, because many audio applications will measure the amplitude of the wave in dB referenced to a 0 dB clipping point. This has nothing to do (except in a relative sense) with the spl as reproduced to the listener.
posted by aquafiend at 10:17 AM on April 17, 2007


When distributing a CD with these tones, are there technical issues I should know about with respect to authoring the disc, such that the power is accurately replayed on the end sound system?

This confuses me. When you pop a CD in your discman, you twiddle the volume nob and alter the amplitude of the signal being sent to the headphones/speakers (which in turn alters the amplitude of the sound waves generated). Perhaps you mean the dynamic range of the signals output, in which case you have some other issues.

Any audio editing software will allow you to set signal levels as precisely as the medium (your CD) will allow (assuming you don't use compression before writing the CD, which shouldn't have an effect on simple signal amplitude anyway). The problem comes in that different systems have greater fidelity in reproducing the dynamic range of recordings - it's one reason people spend so much money on expensive speakers/amplifers.
posted by phrontist at 10:22 AM on April 17, 2007


What is the project exactly? I have a feeling these issues can be avoided.
posted by phrontist at 10:23 AM on April 17, 2007


By way of analogy, think about digital images. You can't control the displayed brightness of an image with photoshop - that depends on the end user monitor configuration and settings. You can, to some extent, control the relative brightness (contrast) of parts of the image. The problem comes in that some monitors have greater contrast fidelity than others. Subsitute brightness for volume and monitor for speaker, and add a bunch of other complications introduced by amplifiers and such and that's basically your lot.
posted by phrontist at 10:46 AM on April 17, 2007


"dB level" is not the same as "power," so aside from that, what phrontist said.
posted by rhizome at 11:44 AM on April 17, 2007


I am clearly not a sound engineer, so please forgive my ignorance.

Let me rephrase:

Let's say I have a "calibration" tone on the disc, which I record at -6 dB. This calibration tone is a frequency audible to the test subject and to a metering device. I record the rest of the test tones at -6 dB.

I play the calibration tone through the end user's sound system, and the end user measures the relative sound power with a sound power meter, adjusting the volume to let's say 60 dB.

Can I expect that the rest of the test tones (which will be other frequencies) will have the same power measurement as the calibration tone?

Are there any playback issues where the sound system can play different frequencies at different power levels?

Likewise, can the frequencies themselves change the output power with the volume held constant (would I need to adjust the recording levels)?
posted by Blazecock Pileon at 12:53 PM on April 17, 2007


Blazecock: Okay, I think I see what you're trying to do. You should be aware of a few pitfalls, though. Some sound systems (most, probably all depending on how sensitively you measure) are not perfectly proportional with frequency.

So if you have a -6dB tone on your CD at 1000Hz and you adjust levels so that you get 60dBA SPL out of the speakers, a -6dB (recorded level) at 100 or 10,000Hz may not be 60dBA out of the speakers. Ideally, it should be, but it just doesn't work that way most of the time.

Figuring out how linear the playback system is; e.g. the frequency/power response, isn't a trivial problem. Probably the best way is to use specially-designed equipment (generally a pink noise generator, a measurement microphone that's calibrated for linear response, and an analyzer to compare the two). If you had a measurement microphone, you could probably do it with a dual-trace oscilloscope, though. (I've never done it but I've thought about it.)

Anyway, just in terms of making a test CD with a bunch of tones at various recorded levels, most audio programs like Audacity can do it; just use the "tone oscillator" or similar function and set the parameters you want.
posted by Kadin2048 at 1:28 PM on April 17, 2007


You also mentioned "subject," which makes me think you're doing some sort of psychoacoustics research or project.

The relationship between frequency, SPL, and 'perceived loudness' is complex. There's a lot of research that's been done on it, though, and there are some fairly-well-accepted "curves" showing the relative 'loudness' of various frequencies at the same SPL. Here's one (ignore the comments about God), or if you want something more technical try reading about the "Zweiker Loudness Model" (PDF!) which I think is one of the more recent theories.
posted by Kadin2048 at 1:35 PM on April 17, 2007


The subject is non-human.

So if you have a -6dB tone on your CD at 1000Hz and you adjust levels so that you get 60dBA SPL out of the speakers, a -6dB (recorded level) at 100 or 10,000Hz may not be 60dBA out of the speakers. Ideally, it should be, but it just doesn't work that way most of the time.

Are you saying this shift is linear or logarithmic? How much variance is there, is it nominal or significant? Is it a factor of the amplifier or speakers?
posted by Blazecock Pileon at 2:27 PM on April 17, 2007


As has been noted above, practically no speakers have even response across the range of human hearing. If it's for psychoacoustics research, there are accepted ways of doing all of this (and specialized equipment). Please just tell us what the project is.
posted by phrontist at 2:28 PM on April 17, 2007


Here's an article about frequency response ranges. The basic idea is that if you record different frequencies a the same volume, there will be some variation in volume when played back. You cannot guarantee an invariable volume without calibrating the full frequency range. Other factors like CD player, amplifier and the room will affect the volume. Or, what kadin said, plus a link.

I'm guessing you're making this CD for a client. in that case I can think of four options:
* Calibrate on location before making your CD
* Build your own calibrated setup & send it
* Let them rent a specialized studio for hearing tests
* Accept the inacuracy of the sound setup, measure actual volume during tests and correct your results after tests.
posted by Psychnic at 3:44 PM on April 17, 2007


Are you saying this shift is linear or logarithmic? How much variance is there, is it nominal or significant? Is it a factor of the amplifier or speakers?

Every device will cause these shifts, but the most prominent will be the speakers, the room, and the listener (either psychoacoustics, or the frequency response of the microphone, or whatever). Between speakers and room it will absolutely be significant.

The room response will depend greatly on speaker placement (how far from the walls, at its simplest) and room treatment (what are the walls made of, any curtains, etc.). Even when speaker placement, room treatment, and room geometry are not terrible, there will be resonant frequencies which play back more than 6dB louder than the average level (just a conservative guess, based on my own psychoacoustic interpretations).
posted by Chuckles at 8:11 PM on April 17, 2007


And then there is the location within the room that you are measuring from, of course! Because as you move around the room, the frequency response will vary.

Here is an article that looks pretty interesting: Acoustic Treatment and Design of Recording Studios and Listening Rooms.
posted by Chuckles at 8:18 PM on April 17, 2007 [1 favorite]


« Older Why can't I change pixel size / resolution in...   |   Help me write my art & design college... Newer »
This thread is closed to new comments.