Sponsored Content
Full Discussion: AudioScope Project.
Operating Systems OS X (Apple) AudioScope Project. Post 302997830 by wisecracker on Saturday 20th of May 2017 09:32:05 AM
Old 05-20-2017
AudioScope.sh Version 0.65.00.

This a major upload and includes the limited Audio Frequency Spectrum _Analyser_ to 4KHz.
This has a relative _calibration_, not an absolute one.
This Spec-An is NOT available for CygWin as there is no access to at least Python 2.7.x in a default CygWin install.
OSX 10.12.x and above specific creating of a new terminal added.
Many thanks to 'xbin' for the code for this.
Also many thanks to much of Corona688's additions and following of this, much of which is inside this script in various modified formats.

File listings are as such:-
Code:
The "$HOME" drawer.

-rw-r--r--   1 amiga  staff   20715 20 May 13:40 AudioScope.Circuits
-rw-r--r--   1 amiga  staff     307 20 May 13:40 AudioScope.Config
-rw-r--r--   1 amiga  staff  115248 20 May 13:40 AudioScope.Manual
-rwxr-xr-x   1 amiga  staff  217121 20 May 12:52 AudioScope.sh
-rw-r--r--   1 amiga  staff    6319 20 May 13:40 AudioScope_Quick_Start.Notes

The "$HOME"/Temp drawer.

0000000000.BIN		pulse[1].wav		sweep.raw
1KHz-Test.sh		pulse[2].wav		sweep.wav
Arduino_9600.pde	pulsetest.sh		sweeper.raw
Untitled.m4a		sample.raw		symmetricalwave.raw
VERT_BAT.BAT		signed16bit.txt		symmetricalwave.wav
VERT_DSP.sh		sinewave.raw		waveform.raw
VERT_SOX.sh		sinewave.wav		waveform.wav
dcdata.raw		squarewave.raw

The /tmp/drawer for the spectrum display.
(From the manual.)

# SPECAN<CR>, This is the built in AF spectrum analyser that has an upper limit
# of 4KHz. This is experimental and generates a stand alone 'bash' script that
# includes a stand alone Python script to do the FFT heavy lifting. It uses the
# built in frequency counter to capture an external signal, otherwise it will
# use AudioScope's capture and convert it to a 'WAV' file. The files generated
# are saved into the '/tmp/' drawer and not permanantly kept. If you want to
# extract these files they are:-
# 
# -rw-r--r--  1 amiga  wheel   914 27 Apr 19:29 FFT_WAV.py
# -rwxr-xr-x  1 amiga  wheel  4705 27 Apr 19:29 Spec_An.sh
# -rw-r--r--  1 amiga  wheel  **** 27 Apr 19:29 bash_array
# -rw-r--r--  1 amiga  wheel 48000 27 Apr 19:29 symmetricalwave.raw
# -rw-r--r--  1 amiga  wheel  8044 27 Apr 19:29 symmetricalwave.wav
# The '****' file length varies per the command 'SPECAN' call.
#
# The only important ones are 'FFT_WAV.py' and 'Spec_An.sh'.
# The files 'Spec_An.sh' and FFT_WAV.py are licenced as GPL2.
# A typical coloured disply looks something like this:-
#
#        ++-------[ $VER Spec_An.sh_(C)2017_B.Walker_GPL2_Licence.]-------++
#    100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++100
#        ||       |       |       |       |       |       |       |       ||
#     90 ++       |       |       |       |       |       |       |       ++ 90
#  R     ||       |       |       |       |       |       |       |       ||
#  E  80 ++       |       |       |       |       |       |       |       ++ 80
#  L     ||     * |       |       |       |       |       |       |       ||
#  A  70 ++     * |       |       |       |       |       |       |       ++ 70
#  T     ||  *  * |       |       |       |       |       |       |       ||
#  I  60 ++  *  * |       |       |       |       |       |       |       ++ 60
#  V     ||  *  * |       *       |       |       |       |       |       ||
#  E  50 ++  *  * |    ** *       |       |       |       |       |       ++ 50
#        ||  *  * *    ** **      |       |       |       |       |       ||
#  L  40 ++  * ** *  * ** **      |       |       |       |       |       ++ 40
#  E     ||  * ** ** * ** ** * ** *  *    |       |       |       |       ||
#  V  30 ++  **** ** * ** ** * ** **** *  |       |       |       |       ++ 30
#  E     ||  ******* ******* * ** **** ** |       |       |       |       ||
#  L  20 ++  ******* ********* ** ******* | **    *       |       |       ++ 20
#Log10(X)|| ***************************** *****  ***** * *| **** **       ||
#     10 ++ *********************************************** ******* **  ***+ 10
#        ||****************************************************************|
#      0 +*****************************************************************+ 0
#FREQ Hz +0------500----1000----1500----2000----2500----3000----3500----4000
#                          Press <CR> to continue:-

Now working on true RMS for any random signal now, and it looks as though AWK might just do it.
Many more things like Average Voltage, LF frequency using the Chopper and much more.

The stats for the current incarnation.

# Total Lines=5045.
# Blank Lines=45.
# Code Lines=2334.
# Comments=2666, (including the builtin Manual).
# Filesize=217121 bytes.

The images are a whistle into the internal mic using SOX as the prime mover, zoomed in 8x.
A psectral display of the same whistle.

In this current state 'SPECAN<CR>' gives you the option of looking at the proper capture or an external one, but only to 4KHz
The power of the *NIX style shell, utilities and terminal!

Has anything like this ever been done before I wonder?
 

9 More Discussions You Might Find Interesting

1. Solaris

SSH doesn't pick up user's project from /etc/project

We have a system running ssh. When a user logs in, they do not get the project they are assigned to (they run under "system"). I verify the project using the command "ps -e -o user,pid,ppid,args,project". If you do a "su - username", the user does get the project they are assigned to (and all... (2 Replies)
Discussion started by: kurgan
2 Replies

2. News, Links, Events and Announcements

A new project was posted on The UNIX and Linux Forums project board.

A new project was posted on your project board. Project title: Bash Shell Tutoring Estimated Budget: $50/hr Start date: Immediately Required skills: Linux, Bash, Shell, UNIX I work as a datawarehouse designer and developer. Although I usually stick to the role of an analyst,... (0 Replies)
Discussion started by: Neo
0 Replies

3. What is on Your Mind?

AudioScope has had a magazine review. <shock>

Hi Admin and Staff... Thanks for hosting AudioScope.sh on this site. I have had the biggest surprise of my life today. This months issue of the UK Linux magazine "Linux Format" have done a small piece on the project. Issue April 2014, LXF 182, page 65... This I never expected and I... (1 Reply)
Discussion started by: wisecracker
1 Replies

4. OS X (Apple)

AC to DC trigger pulse for AudioScope.sh.

Hi all... Has _below_ ever been done in UNIX shell scripting before? (I have done this easily in Python but this is using purely the shell.) The DEMO version IS built and has been tested. Pre-amble... I now need at least one control pulse for the AudioScope.sh when in PURELY audio I/O mode,... (2 Replies)
Discussion started by: wisecracker
2 Replies

5. Shell Programming and Scripting

Experimental awk audio converter for CygWin and AudioScope.sh

Development machine:- Standard MBP 13 inch, OSX 10.7.5... GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11) Copyright (C) 2007 Free Software Foundation, Inc. Scenario:- Audio capture for AudioScope.sh for CygWin without ANY third party installs. I am trying my hardest to get a... (6 Replies)
Discussion started by: wisecracker
6 Replies

6. OS X (Apple)

The Alternate DC board for AudioScope.sh.

Hi guys... Well I have entered an area of partial insnity... ;o) Below is a photo of the 'ALTDC' board for AudioScope.sh... I have decided to incorporate all three methods for obtaining DC into this MBP via the MIC input. 1) VFO. 2) CHOPPER. 3) COUNTER. The controller for the COUNTER... (9 Replies)
Discussion started by: wisecracker
9 Replies

7. What is on Your Mind?

AudioScope...

Boy oh boy, with only a MONO mic input to use AudioScope gets much more difficult when the ALTDC board is included. It needs, so far, two hits at the MIC input with a single hit at the HEADPHONE audio output. The first at the highest practical resolution for the AC component and the second... (0 Replies)
Discussion started by: wisecracker
0 Replies

8. OS X (Apple)

The DC Control and Timer boards for AudioScope.sh...

Hi all... Apologies for any typos... For those intersted in the AudioScope the next construction is finished. I have not been totally idle but working out the hard stuff to be able to be very simple to build. It is a single transistor simple timer that lasts for about 1.2 to 1.8 seconds.... (2 Replies)
Discussion started by: wisecracker
2 Replies

9. UNIX for Advanced & Expert Users

Has AudioScope found a bug in bash 4.4.5?

Using AudioScope.sh on Ubuntu 17.04 from a live DVD disc I came across an error. Consider the code below it is a MUCH shortened version of the KEYBOARD input in AudioScope. #!/bin/bash bash --version uname -a status=0 KEYBOARD() { read -r -p "Enter QUIT or EXIT to quit:- " kbinput if ||... (11 Replies)
Discussion started by: wisecracker
11 Replies
All times are GMT -4. The time now is 08:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy