Sponsored Content
Operating Systems OS X (Apple) Variable frequency audio generator... Post 302979739 by Corona688 on Thursday 18th of August 2016 11:31:11 AM
Old 08-18-2016
Interesting solution! I'm surprised it can tell the diff between 6000 and 6001 hz, most audio devices run at fixed frequencies and most players don't bother correcting. Using your much-beloved sox utility on a fixed-rate raw file might give you more reliable and portable control -- resample it to one rate and force it to output at another rate.

Something like:

Code:
printf "\x01\xff" > file0 # Square wave
printf "" > file1

# Double the number of wavelengths 2^8 i.e. 256 times
for N in 1 2 3 4 5 6 7 8
do
        cat file0 >> file1
        cat file1 >> file0
done

while true
do
        cat file0 file1
done | sox ...

rm -f file0 file1

 

8 More Discussions You Might Find Interesting

1. Solaris

out of frequency

:cool: after installing solaris 10 5/08/09 directory the computer rebooting then the massage "out of frequency" appear.i want a solution first second my main board is GA-MA780G UD3H (14 Replies)
Discussion started by: medo2008
14 Replies

2. Shell Programming and Scripting

Bash - Same frequency

Hi, Could anyone help me with the following question, if I have two colums (names and frequency) as follows in a file called name.txt Michael 1 Jones 1 Ben 2 Rebeca 4 David 1 and I want to use bash script called freqnames.sh that takes one argument (name) and the output should be... (3 Replies)
Discussion started by: jboy
3 Replies

3. Programming

Python, Platform Independent, Pure Audio Sinewave Generator...

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

4. Shell Programming and Scripting

A Crude 1KHz Audio Sinewave Generator Demo...

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

5. Slackware

Problems with audio recording in Audacity 2.0.5. Slackware64 14.1; Intel HD Audio.

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)

A Bash Audio Sweep Generator...

This is a small program as a tester for a basic sweep generator for bandwidth testing of AudioScope.sh. This DEMO is only capable of 4KHz down to about 85Hz and back due to the low bit rate, but it is proof of concept for a much wider variant using a much higher bit rate. The file generated... (4 Replies)
Discussion started by: wisecracker
4 Replies

7. OS X (Apple)

An Audio Function Generator...

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

8. OS X (Apple)

A simple variable frequency sinewave audio generator.

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
Audio::File::AudioProperties(3pm)			User Contributed Perl Documentation			 Audio::File::AudioProperties(3pm)

NAME
Audio::File::AudioProperties - abstract an audio files audio properties. DESCRIPTION
Audio::File::AudioProperties is the base class for other file format independant audio property classes like Audio::File::Flac::AudioProperties or Audio::File::Ogg::AudioProperties. You should not use this class yourself exept you're writing an own file format dependant subclass. METHODS
new Constructor. Creates new Audio::File::AudioProperties object. You shoud not use this method yourself. It's called by the filetype-dependant subclasses of Audio::File::Type automatically. init Initializes the object. It's called by the constructor and empty by default. It's ought to be overwritten by subclasses. length Returns the length of the audio file in seconds. bitrate Returns the bitrate of the file. sample_rate Returns the sample rate of the audio file. channels Returns the number of channels the audio file has. all Get all audio properties. SEE ALSO
Audio::File, Audio::File::Type, Audio::File::Tag AUTHOR
Florian Ragwitz <flora@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2004 Florian Ragwitz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. perl v5.10.0 2005-02-18 Audio::File::AudioProperties(3pm)
All times are GMT -4. The time now is 11:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy