Sponsored Content
Top Forums Programming My first PERL incarnation... Audio Oscillograph Post 303038666 by wisecracker on Tuesday 10th of September 2019 05:39:33 PM
Old 09-10-2019
Hi stomp...
(Apologies for typos.)

Quote:
Originally Posted by stomp
It is. I'm currently working with cygwin. It's a reliable way to get many of the essential tools if you have to use windows. But it's a bit slow. I don't know, if it's fast enough for this program.
I can give a few pointers as I designed the bash script 'AudioScope.sh' here: AudioScope Project. to include it.
It captures using the now defunct 'SoundRecorder.exe' for Windows 8.1 OR CygWin's builtin '/dev/dsp'. Both methods take around 2 seconds total for a 1 second burst, BUT, because CygWin is _emulating_, (for want of a better description), a UNIX style environment accessing either capture mode takes around 1/8th of a second berfore the audio device activates.
SoundRecorder.exe, (which is no longer part of Windows 10), can only do a standard '.wav' file at 44100sps and /dev/dsp a '.raw' unsigned integer file at 8000sps from the command line.
The 'mintty' terminal is quite capable of all the escape codes I have used so far, including the title bar.
The above shell project was designed for hopefully ALL *NIX flavours with bash and included SoX, a dependency, as the prime mover for capture.
This User Gave Thanks to wisecracker For This Post:
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Audio HELP Please!

I know about next to nothing, and I am trying to play an audio file on HP-UX 10.2 (743i) every time I try to use the ‘/opt/audio/bin/AudioCP &' command I get an error message that says “Unable to access audio hardware.” I checked the man page on audio, and both Aserver and rpcd are running. Am I... (4 Replies)
Discussion started by: Matt
4 Replies

2. UNIX for Dummies Questions & Answers

playing audio

Hi all, I play audio through the web browser and it plays ok on windows. When i try the same thing on unix i get the error message "sh: /usr/local/bin/sox: not found. I've tried 'locate sox' and can't seem to find it. Is there some way I can change the browser settings so they play the audio... (3 Replies)
Discussion started by: molli_81
3 Replies

3. UNIX for Advanced & Expert Users

Audio-Text in Unix

Hello all, Could anyone help to me :as to how can i record an audio file in unix and convert it into a text . Or anything with audio recording to get started would help . thanks, (3 Replies)
Discussion started by: phantom308
3 Replies

4. UNIX for Dummies Questions & Answers

Audio Problem

Hi I recently installed BT 5 Gnome on my Asus laptop running on Intel HD graphics. I've been having problems with audio, at first I experienced the basic problem that was solved by adding pulse audio to the starting programs. This allowed me to open Sound preferences but I still have no sound.... (0 Replies)
Discussion started by: edreeso
0 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)

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
NA_RECORD(1)						    BSD General Commands Manual 					      NA_RECORD(1)

NAME
na_record -- record waveform from audio device SYNOPSIS
na_record [-h] [-f sampling rate] [-audiodevice device] [-time seconds] [-o file] [-otype type] [-ostype sample type] [-F sample rate] [-obo MSB | LSB | native] [-oswap] [-p audio device protocol] DESCRIPTION
na_record records digital audio data from the system's audio input device and writes it to the specified file. It supports a variety of out- put file formats and native audio devices. The following option flags are recognized: -h Prints a short summary of usage to standard output. -f sampling rate Sets the input sampling rate (in samples per second, i.e. Hz). Not all devices support all sampling rates, so it may be desire- able to set this separately from the output sampling rate. -audiodevice device Sets the audio device to record from, if supported by the audio protocol chosen (e.g. /dev/dsp, /dev/audio) -time seconds Stops recording after the specified number of seconds. -o file Writes sound output to the specified file -otype type Specifies the file format to use for output. Supported types currently include nist, est, dsps, snd, riff, aiff, audlab, raw, and ascii. The -h flag will show the most accurate list. The default type is nist. -F sampling rate Sets the output sampling rate (again, in samples per second, i.e. Hz). If this differs from the input sampling rate, resampling will be done. Defaults to 16000Hz. -obo byte order Sets the output byte order. Supported values are MSB, LSB, and native. Many file formats have their own byte order, or are byte order independent, so this isn't tremendously useful except for raw data. The default is the native byte order for the system audio device. -oswap Swap bytes when saving to output. -ostype sample type Sets the sample type of the output. Suported values are short, mulaw, byte, or ascii. Again, this is usually implied by the file format, so should only be used for raw data. The default is short (i.e. 16-bit PCM). -p audio device protocol Selects an audio device protocol (i.e. type of audio device) to use. This varies between different installations of Speech Tools, but defaults to the most 'native' audio device, usually Open Sound System on Linux and *BSD and /dev/audio on Solaris. ENVIRONMENT
NA_PLAY_PROTOCOL Audio protocol to use (as in the -p flag) NA_PLAY_HOST Host to record audio from when using a network audio protocol. EXAMPLES
To record five seconds of audio from /dev/dsp1 (on Linux) to foo.wav in RIFF format at 32kHz: $ na_record -time 5 -audiodevice /dev/dsp1 -o foo.wav -otype RIFF -f 32000 To record one second of audio to bar.wav in raw format in 8kHz mu-law: $ na_record -time 1 -o bar.wav -otype raw -ostype mulaw -f 8000 BUGS
The -time argument only accepts integer values (though the usage message implies otherwise) SEE ALSO
na_play(1) Edinburgh Speech Tools April 4, 2001 Edinburgh Speech Tools
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy