Sponsored Content
Operating Systems OS X (Apple) A simple variable frequency sinewave audio generator. Post 303035891 by MadeInGermany on Friday 7th of June 2019 04:23:53 AM
Old 06-07-2019
A suggestion for more efficiency:
Code:
# Open the file for writing via descriptor 4
exec 4> /tmp/sine.wav
{
printf "%b" "\122\111\106\106\044\000\001\000\127\101\126\105\146\155\164\040\020\000\000\000\001\000\001\000"
printf "%b" "${RATE}"
printf "%b" "\000\000\001\000\010\000\144\141\164\141\000\000\001\000"
} >&4
# Add the sinewave data, 65536 bytes in size.
DATA="Oq~qO- -"
COUNTER=0
while [ ${COUNTER} -le 12 ]
do
    printf "%b" "${DATA}"
    COUNTER=$(( COUNTER + 1 ))
done >&4
# Entire filesize 65580 bytes, 8+ seconds long for 1000[Hz]

These 2 Users Gave Thanks to MadeInGermany For This Post:
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. Windows & DOS: Issues & Discussions

A SOX 1KHz Sinewave Generator Using A Batch File...

Hi all... I don't think this has been done before but I am open to being corrected... This batch file generates a 65536 byte binary file to give 8 seconds of pure sinewave at the earphone/speaker output(s)... It uses ONLY a default Windows 32 bit installation, to Windows 7, except for the... (0 Replies)
Discussion started by: wisecracker
0 Replies

4. 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

5. OS X (Apple)

Python script to do simple audio capture...

This site is the first to get this snippet. It will capture an audio recording of any time length within the limits of OSX's QuickTime Player's capablility... A shell script derivative of this will be used as a further capture for CygWin's AudioScope.sh. Thoroughly read ALL the comments in... (0 Replies)
Discussion started by: wisecracker
0 Replies

6. 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

7. OS X (Apple)

Variable frequency audio generator...

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. Shell Programming and Scripting

The Start Of A Simple Audio Scope Shell Script...

This is a DEMO shell script to generate a simple graticule and plot inside it... Apologies for any typos... it is another building block along with my other two shell uploads recently to start a semi_serious project of an Terminal_AudioScope... The fist upload I posted recently was to show... (83 Replies)
Discussion started by: wisecracker
83 Replies
TYPES.DB(5)							     collectd							       TYPES.DB(5)

NAME
types.db - Data-set specifications for the system statistics collection daemon collectd SYNOPSIS
bitrate value:GAUGE:0:4294967295 counter value:COUNTER:U:U if_octets rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295 DESCRIPTION
The types.db file contains one line for each data-set specification. Each line consists of two fields delimited by spaces and/or horizontal tabs. The first field defines the name of the data-set, while the second field defines a list of data-source specifications, delimited by spaces and, optionally, a comma (",") right after each list-entry. The format of the data-source specification has been inspired by RRDtool's data-source specification. Each data-source is defined by a quadruple made up of the data-source name, type, minimal and maximal values, delimited by colons (":"): ds-name:ds-type:min:max. ds-type may be either ABSOLUTE, COUNTER, DERIVE, or GAUGE. min and max define the range of valid values for data stored for this data-source. If U is specified for either the min or max value, it will be set to unknown, meaning that no range checks will happen. See rrdcreate(1) for more details. FILES
The location of the types.db file is defined by the TypesDB configuration option (see collectd.conf(5)). It defaults to collectd's shared data directory, i. e. prefix/share/collectd/. CUSTOM TYPES
If you want to specify custom types, you should do so by specifying a custom file in addition to the default one (see FILES) above. You can do that by having multiple TypesDB statements in your configuration file or by specifying more than one file in one line. For example: TypesDB "/opt/collectd/share/collectd/types.db" TypesDB "/opt/collectd/etc/types.db.custom" Note: Make sure to make this file available on all systems if you're sending values over the network. SEE ALSO
collectd(1), collectd.conf(5), rrdcreate(1) AUTHOR
collectd has been written by Florian Forster <octo at verplant.org>. This manpage has been written by Sebastian Harl <sh at tokkee.org>. 5.1.0 2012-04-02 TYPES.DB(5)
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy