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 as xterm has now been removed.
It is called 'NewCLI' and launched using the built in 'SHELL' command BEHIND the original shell/terminal; memories anyone? ;oD
Linux users that no longer have 'xterm', and YES there are some default installs that now don't, will have to modify the code themselves.
File listings are as such:-
- Code: Select all
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 spectral 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?
Enjoy...