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
ogg123(1)							   Vorbis Tools 							 ogg123(1)

NAME
ogg123 - plays Ogg Vorbis files SYNOPSIS
ogg123 [ -vqzVh ] [ -k seconds ] [ -x nth ] [ -y ntimes ] [ -b buffer_size ] [ -d driver [ -o option:value ] [ -f filename ] ] file ... | directory ... | URL ... DESCRIPTION
ogg123 reads Ogg Vorbis audio files and decodes them to the devices specified on the command line. By default, ogg123 writes to the stan- dard sound device, but output can be sent to any number of devices. Files can be read from the file system, or URLs can be streamed via HTTP. If a directory is given, all of the files in it or its subdirectories will be played. OPTIONS
--audio-buffer n Use an output audio buffer of approximately 'n' kilobytes. -@ playlist, --list playlist Play all of the files named in the file 'playlist'. The playlist should have one filename, directory name, or URL per line. Blank lines are permitted. Directories will be treated in the same way as on the command line. -b n, --buffer n Use an input buffer of approximately 'n' kilobytes. -p n, --prebuffer n Prebuffer 'n' percent of the input buffer. Playback won't begin until this prebuffer is complete. -d device, --device device Specify output device. See DEVICES section for a list of devices. Any number of devices may be specified. -f filename, --file filename Specify output file for file devices. The filename "-" writes to standard out. If the file already exists, ogg123 will overwrite it. -h, --help Show command help. -k n, --skip n Skip the first 'n' seconds. 'n' may also be in minutes:seconds or hours:minutes:seconds form. -K n, --end n Stops playing 'n' seconds from the start of the stream. 'n' may also have the same format as used in the --skip option. -o option:value, --device-option option:value Assigns the option option to value for the preceding device. See DEVICES for a list of valid options for each device. -q, --quiet Quiet mode. No messages are displayed. -V, --version Display version information. -v, --verbose Increase verbosity. -x n, --nth Play every 'n'th decoded block. Has the effect of playing audio at 'n' times faster than normal speed. -y n, --ntimes Repeat every played block 'n' times. Has the effect of playing audio 'n' times slower than normal speed. May be with -x for inter- esting fractional speeds. -z, --shuffle Play files in pseudo-random order. DEVICES
ogg123 supports a variety of audio output devices through libao. Only those devices supported by the target platform will be available. The -f option may only be used with devices that write to files. null Null driver. All audio data is discarded. (Note: Audio data is not written to /dev/null !) You could use this driver to test raw decoding speed without output overhead. oss Open Sound System driver for Linux and FreeBSD. Options: dsp DSP device for soundcard. Defaults to /dev/dsp. sun Sun Audio driver for NetBSD, OpenBSD, and Solaris. Options: dev Audio device for soundcard. Defaults to /dev/audio. alsa Advanced Linux Sound Architecture. Options: card Sound card number. (Default = 0) dev Device number on the sound card. (Default = 0) buf_size Override the default buffer size (in bytes). irix IRIX audio driver. arts aRts Sound Daemon. esd Enlightened Sound Daemon. Options: host The hostname where esd is running. This can include a port number after a colon, as in "whizbang.com:555". (Default = localhost) au Sun audio file output. Writes the audio samples in AU format. The AU format supports writing to unseekable files, like standard out. In such circumstances, the AU header will specify the sample format, but not the length of the recording. raw Raw sample output. Writes raw audio samples to a file. Options: byteorder Choose big endian, little endian, or native byte order. (Default = "native") wav WAV file output. Writes the sound data to disk in uncompressed form. If multiple files are played, all of them will be concate- nated into the same WAV file. WAV files cannot be written to unseekable files, such as standard out. Use the AU format instead. EXAMPLES
The ogg123 command line is fairly flexible, perhaps confusingly so. Here are some sample command lines and an explanation of what they do. Play on the default soundcard: ogg123 test.ogg Play all of the files in the directory ~/music and its subdirectories. ogg123 ~/music Play a file using the OSS driver: ogg123 -d oss test.ogg Pass the "dsp" option to the OSS driver: ogg123 -d oss -o dsp:/dev/mydsp Use the ESD driver ogg123 -d esd test.ogg Use the WAV driver with the output file, "test.wav": ogg123 -d wav -f test.wav test.ogg Listen to a file while you write it to a WAV file: ogg123 -d oss -d wav -f test.wav test.ogg Note that options apply to the device declared to the left: ogg123 -d oss -o dsp:/dev/mydsp -d raw -f test2.raw -o byteorder:big test.ogg Stress test your harddrive: ogg123 -d oss -d wav -f 1.wav -d wav -f 2.wav -d wav -f 3.wav -d wav -f 4.wav -d wav -f 5.wav test.ogg Create an echo effect with esd and a slow computer: ogg123 -d esd -d esd test.ogg INTERRUPT
You can abort ogg123 at any time by pressing Ctrl-C. If you are playing multiple files, this will stop the current file and begin playing the next one. If you want to abort playing immediately instead of skipping to the next file, press Ctrl-C within the first second of the playback of a new file. Note that the result of pressing Ctrl-C might not be audible immediately, due to audio data buffering in the audio device. This delay is system dependent, but it is usually not more than one or two seconds. FILES
/etc/libao.conf Can be used to set the default output device for all libao programs. ~/.libao Per-user config file to override the system wide output device settings. BUGS
Piped WAV files may cause strange behavior in other programs. This is because WAV files store the data length in the header. However, the output driver does not know the length when it writes the header, and there is no value that means "length unknown". Use the raw or au output driver if you need to use ogg123 in a pipe. SEE ALSO
libao.conf(5) AUTHORS
Program Authors: Kenneth Arnold <kcarnold-xiph@arnoldnet.net> Stan Seibert <volsung@xiph.org> Manpage Author: Stan Seibert <volsung@xiph.org> Xiph.org Foundation 2003 September 1 ogg123(1)
All times are GMT -4. The time now is 09:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy