08-07-2014
He has raw header values to make a WAV file of 8KHz 8-bit audio, which happens to be the format /dev/dsp uses if not told otherwise. If you used any other format than 8-bit 8khz, you'd either hear it too fast, scrambled, or pure noise.
You probably hear a tiny scratch of noise as-is when it starts, that would be the WAV header.
I believe he makes the sweep by making a small-as-possible pulse and appending it to the wav file... A bit more dead space is added to the pulse before appending it again. This moves the pulses gradually further and further apart.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Good evening, I'm currently working on a BASH script to convert audio between file formats and I've come across a snag. At the beginning of the script, I'm having the system check to see if any files with the .m4a extension exist in the directory, and if so, it runs the script. If there are no... (1 Reply)
Discussion started by: KBurkholder
1 Replies
2. Programming
IKHz_SW_OSX.py
A DEMO mono _pure_ sinewave generator using standard text mode Python 2.6.7 to at least 2.7.3.
This code is EASILY modifyable to Python version 3.x.x...
This DEMO kids level 1KHz generator is mainly for a MacBook Pro, (13 inch in my case), OSX 10.7.5 and above. See below...... (0 Replies)
Discussion started by: wisecracker
0 Replies
3. Shell Programming and Scripting
A very simple crude sinewave generator.
The file required is generated inside the code, is linear interpolated and requires /dev/audio to work. Ensure you have this device, if not the download oss-compat from your OS's repository...
It lasts for about 8 seconds before exiting and saves a... (5 Replies)
Discussion started by: wisecracker
5 Replies
4. Shell Programming and Scripting
I put this together to search for unused IP addresses on a router. It's run as a Bash Command on OSX 10.9. Basically the user inputs the router address' IP range to sweep. 'jot' spits out a list of IP addresses based on that input and each one of those gets pinged. The output looks like this (tab... (4 Replies)
Discussion started by: sudo
4 Replies
5. Slackware
I'm trying to record audio using Audacity 2.0.5 installed from SlackBuilds. My system is 64-bit Slackware 14.1 and a sound card is Intel HD Audio. I didn't change my sound system to OSS. (Default sound system in Slackware 14.1 is ALSA, isn't it?) First, I set Internal Microphone slider in KMix... (2 Replies)
Discussion started by: qzxcvbnm
2 Replies
6. OS X (Apple)
Ok guys, gals and geeks...
As from today I am starting to learn awk in earnest doing something totally different.
I am going to create a pseudo-Audio_Function Generator centred around OSX 10.11.x minimum. The code below is a tester to see what the possibilities are.
All waveforms will be... (11 Replies)
Discussion started by: wisecracker
11 Replies
7. OS X (Apple)
Hi all...
I intend to do an Audio Function Generator using Awk, (already started thanks to Don), but the biggest thing I have struggled with was variable frequency.
I was going to generate differing sized waveforms on the fly but that would that would mean the frequencies are dependent on any... (2 Replies)
Discussion started by: wisecracker
2 Replies
8. OS X (Apple)
Hi all...
Well I have not been inactive but working out how to make OSX 10.14.x command line audio player have a variable sample rate.
This is a back door as afplay does not have a sample rate flag unlike aplay for ALSA, in Linux flavours.
This is a DEMO only but a derivative of it will... (2 Replies)
Discussion started by: wisecracker
2 Replies
LEARN ABOUT SUSE
speaker-test
SPEAKER-TEST(1) General Commands Manual SPEAKER-TEST(1)
NAME
speaker-test - command-line speaker test tone generator for ALSA
SYNOPSIS
speaker-test [-options]
DESCRIPTION
speaker-test generates a tone that can be used to test the speakers of a computer.
OPTIONS
-c | --channels NUM
NUM channels in stream
-D | --device NAME
PCM device name NAME
-f | --frequency FREQ
sine wave of FREQ Hz
--help Print usage help
-b | --buffer TIME
Use buffer size of TIME microseconds. When 0 is given, use the maximal buffer size. The default value is 0.
-p | --period TIME
Use period size of TIME microseconds. When 0 is given, the periods given by -P option is used. The default value is 0.
-P | --nperiods ERIODS
Use number of periods. The default value is 4.
-r | --rate RATE
stream of RATE Hz
-t | --test pink|sine|wav
-t pink means use pink noise (default).
Pink noise is perceptually uniform noise -- that is, it sounds like every frequency at once. If you can hear any tone it may indi-
cate resonances in your speaker system or room.
-t sine means to use sine wave.
-t wav means to play WAV files, either pre-defined files or given via -w option.
You can pass the number from 1 to 3 as a backward compatibility.
-l | --nloops COUNT
Specifies the number of loops. Zero means to run infinitely.
When -s option below with a valid channel is given, speaker-test will perform always a single-shot without looping.
-s | --speaker CHANNEL
Do a single-shot speaker test for the given channel. The channel number starts from 1. The channel number corresponds to left,
right, rear-left, rear-right, center, LFE, side-left, side-right, and so on.
For example, when 1 is passed, it tests the left channel only once rather than both channels with looping.
-w | --wavfile
Use the given WAV file for the playback instead of pre-defined WAV files.
-W | --wavdir
Specify the directory containing WAV files for playback. The default path is /usr/share/sounds/alsa.
USAGE EXAMPLES
Produce stereo sound from one stereo jack:
speaker-test -Dplug:front -c2
Produce 4 speaker sound from two stereo jacks:
speaker-test -Dplug:surround40 -c4
Produce 5.1 speaker sound from three stereo jacks:
speaker-test -Dplug:surround51 -c6
To send a nice low 75Hz tone to the Woofer and then exit without touching any other speakers:
speaker-test -Dplug:surround51 -c6 -s1 -f75
AUTHOR
The speaker-test program was written by James Courtier-Dutton. Pink noise support was added by Nathan Hurst. Further extensions by
Takashi Iwai.
speaker-test 20 September 2004 SPEAKER-TEST(1)