Re: Bitperfect Ears

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26-11-07 21:25, James Courtier-Dutton wrote:

Rene Herman wrote:

On 25-11-07 04:18, Mark Constable wrote:

There are a few online hearing test sites around, here
is one with 16/44.1 wavs. I can't hear 12kHz-0dB.wav :-(

 http://www.phys.unsw.edu.au/music/dB/loudness.html
Word of warning -- the outcome here will significantly vary with the used soundcard, headphones and ofcourse _very_ much with how loud you crank up any on- or off-card amplifier.

And eat your heart out...

That 16 kHz -60dB is just about my threshold with good headphones, good card set to 0 dB and external amplication cranked up. -57 I hear always, at -60 it's a little flaky. At those levels, 12-0dB actively hurts...

Ears are funny things.
16 kHz might be just about your limit

... at somewhere around 50 dBSPL (I assume 110 of my headphone amp at full volume since at that level it's "uncomfortable but still bearable for short periods" for music).

Managed to please myself during this thread as according to my own tests I'm still quite capable of hearing 18 kHz at fairly normal levels (90 dBSPL or so) which needs to considered good given that I'm 35. Now, mind you, quite aware that I might be measuring other things and I might be 10 dBSPL off as well, but still...

Wrote a small sine generator during this test by the way -- attached just in case anyone is interested. Writes S16_LE to stdout, so intended to be used as:

$ sine -f <freq> -d <dbspl> | aplay -f cd

-r <rate> for setting a different rate than 44100:

$ sine -f <freq> -d <dbspl> -r <rate> | aplay -f S16_LE -c 2 -r <rate>

but if you listen to more than one tone mixed together you will hear a
difference.
E.g.
16 kHz you can hardly hear.
8 kHz you can hear, but
8 kHz mixed with 16 kHz will sound different from 8 kHz alone.
The real quality of a sound card and speakers comes with how it handles
more than one tone at the same time so that those mixed tones sound right.

I see. Might try playing with that...

Rene.
/*
 * Generates a stereo S16_LE sine at settable rate, frequency and dBFS
 *
 * gcc -W -Wall -o sine sine.c -lm
 */

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <math.h>

#include <unistd.h>

#define RATE_MIN	8000
#define RATE_MAX	192000

#define FREQ_MIN	20
#define FREQ_MAX	30000

#define DBFS_MIN	-((16 * 20 * M_LN2) / M_LN10)
#define DBFS_MAX	0

#define RATE		44100
#define FREQ		440
#define DBFS		0

static inline uint16_t le(uint16_t val)
{
#ifdef __LITTLE_ENDIAN
	return val;
#else
	return bswap_16(val);
#endif
}

int main(int argc, char *argv[])
{
	int rate = RATE;
	int freq = FREQ;

	double dbfs = DBFS;
	double ampl;

	int i;
       
	while ((i = getopt(argc, argv, "r:f:d:")) != -1) {
		char *endptr;

		switch (i) {
		case 'r':
			rate = strtol(optarg, &endptr, 0);
			if (rate < RATE_MIN || rate > RATE_MAX || *endptr)
				goto usage;
			break;
		case 'f':
			freq = strtol(optarg, &endptr, 0);
			if (freq < FREQ_MIN || freq > FREQ_MAX || *endptr)
				goto usage;
			break;
		case 'd':
			dbfs = strtod(optarg, &endptr);
			if (dbfs < DBFS_MIN || dbfs > DBFS_MAX || *endptr)
				goto usage;
			break;
		default:
			return EXIT_FAILURE;
		}
	}

	if (rate < 2 * freq) {
usage:
		printf("usage: %s [-r <rate>] [-f <freq>] [-d <dbfs>]\n", argv[0]);
		return EXIT_FAILURE;
	}

	ampl = 32767.0 / pow(10, -dbfs / 20);
	while (1)
		for (i = 0; i < rate; i++) {
			uint16_t sample = le(ampl * sin(((2 * i * freq) * M_PI) / rate));

			write(STDOUT_FILENO, &sample, sizeof sample);
			write(STDOUT_FILENO, &sample, sizeof sample);
		}

	return EXIT_SUCCESS;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux