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


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting The Start Of A Simple Audio Scope Shell Script...
# 71  
Old 03-25-2015
You probably meant "1M Log Potentiometer" instead of "!M Log Potentiometer"
This User Gave Thanks to Corona688 For This Post:
# 72  
Old 03-25-2015
AudioScope.sh script statistics so far:-

Total number of lines=3369.
Blank lines=28.
Lines of code=1735.
Commented out lines=1606.
Current filesize=137042 bytes.
# 73  
Old 04-03-2015
AudioScope.sh Version 0.31.40.

Due to the numerous chocies of Linux installs that are now available I have discovered that some do not have 'xterm' installed by default. This has now become a dependency as Linux Mint 17, 64 bit requires that you install 'xterm' if you need to use it.

Also CygWin did not have semi-automatic calibration of the display polarity.
This is now taken care of using the limitations of 'mintty' used in a default install of CygWin.

More done to the Manual including an ultra-simple detector circuit and usage for the display polarity calibration using a MacBook Pro 13 inch ONLY, (in my case circa August 2012). This may or may not work for other platforms but it is NOT intanded for those.
This is in an Appendix at the end of the Manual.

Very soon this code will be able to be used as a fun, calibrated, AC coupled only tool for anyone to use...

As it stands if you have already built the circuits including the Vertical amp then it is a fun, uncalibrated, usable audio OSCILLOGRAPH. ;o)

Calibrating without the kit is ALWAYS the difficult part.

Stas so far:-
Lines=3451.
Blanklines=28.
CodeLines=1745.
Comments=1678.
Filesize=140746 bytes.

Enjoy...

EDIT:

NOTE: Unofficial releases can be found here:-

http://wisecracker.host22.com/public/AudioScope.sh

Last edited by wisecracker; 04-03-2015 at 11:13 AM.. Reason: See above...
# 74  
Old 05-09-2015
OK, we now have a major upload here.

The Version is now at 0.31.80. It contains a simple method of calibrating the polarity of the waveform for a MacBook Pro 13 inch only.
See the simple circuit very close to the end of the script/manual...

Although I am aware of many aspects of shell scripting that I didn't know when I first started I have stuck rigidly to the original style.

Some new commands added:-
SHELL - Hidden from the built-in HELP section. Assumes xterm exists.
PLAYBACK - Also hidden from the built-in HELP section. Will playback the 1 second captured waveform.
SAVE - A method to manually save the last capture without having AUTOSAVE enabled.

Now the seriously difficult bit. Yeah, this was NOT easy to make simple!
IMPORTANT! Ensure a signal is at the audio input of the MBP.
The TRIG -> EXT mode.
THIS WILL ONLY WORK USING SOX MODE CAPTURE!
I am assuming SOX is the default capture from now on for this part.
Preamble... It is impossible to obtain a binary value, (or binary value pair), from a stream _in_real_time_ using shell scripting.
So I had to do this in PSEUDO-TRIG mode...
How it works. (<CR> == Carriage Return.)
From COMMAND:-
1) Press <CR> to (re)run, HELP or QUIT<CR> TRIG<CR>
2) Set trigger type, <CR> to disable:- EXT<CR>
The window now clears the previous scan WAITING for the remaining setup.
3) Set trigger polarity, +, - or <CR>:- -<CR>
4) Sync point:- U for up 1, D for down 1, <CR> to RETURN:-
Code:
 +-----------------------------[COMMAND  WINDOW]------------------------------+ 
 | COMMAND:- Sync point:- U for up 1, D for down 1, <CR> to RETURN:-          | 
 +------------------------------[STATUS WINDOW]-------------------------------+ 
 | Stopped...                                                                 | 
 | Synchronisation point set to 87...                                         | 
 +----------------------------------------------------------------------------+

5) After using U or D press...
6) <CR>
Code:
 +-----------------------------[COMMAND  WINDOW]------------------------------+ 
 | COMMAND:-                                                                  | 
 +------------------------------[STATUS WINDOW]-------------------------------+ 
 | Synchroniastion set to 87, EXTERNAL and waiting...                         | 
 | X=Fastest possible, Y=Uncalibrated (m)V/DIV, AC coupled, SOX mode.         | 
 +----------------------------------------------------------------------------+

Now the window hangs until a value, (in this example), 87 is found and the next byte is less than that value, the '-' inputted from 3) above.
It finds those values by capturing a signal at very low resolution, (8000Hz), and if not found keeps recapturing until it has found them.
As soon as they are detected the loop(s) are exited and a new capture at full resolution, (48000Hz), is taken.
Read the code from lines 1311 to 1366 for a more full insight...
Yes it has its limitations and yes there will be a time delay whilst the two values are detected but I could not think of another method.

@Corona688, very early on in this thread you suggested a method of pseudo-continuous capture but it would not work at all with SOX...

File statistics...

# Total Lines=3599.
# Blank Lines=28.
# Code Lines=1841.
# Comments=1730, (including the builtin Manual).
# Filesize=146294 bytes.

Enjoy...

Last edited by wisecracker; 05-09-2015 at 04:15 PM.. Reason: Add photo.
This User Gave Thanks to wisecracker For This Post:
# 75  
Old 06-27-2015
Hi guys and gals...

This is an official release but no circuit has been _drawn_up_ for the VFO yet.
Version 0.32.20.
It shows the DC value to the nearest 0.125V for a 4+ bit depth VFO.

The images show:-
1) The test setup using the very first construction part of this progect as the input board.
2) The '0.000 Volts DC+' in the yellow part of the COMMAND WINDOW.
3) The frequency WRT 2).
4) The '2.000 Volts DC+'.

# Total Lines=3726.
# Blank Lines=29.
# Code Lines=1915.
# Comments=1782, (including the builtin Manual).
# Filesize=151492 bytes.

Enjoy...

Bazza...

EDIT:-
The black box on the bottom RHS is a 0 to 2.5V variable DC source and will be included in the manual in due course for basic calibration of the VFO.

Last edited by wisecracker; 06-27-2015 at 12:52 PM.. Reason: See above...
This User Gave Thanks to wisecracker For This Post:
# 76  
Old 09-10-2015
AudioScope.sh Version 0.32.40...
Well The DC Controlled switcher board is now completed.

The circuit is near the end of this script and the code finished to suit the VFO mode of ALTDC DC access.

See here:-
https://www.unix.com/os-x-apple-/2607...oscope-sh.html

A hook up wiring circuit has yet to be done, as is the VFO circuit. In text mode these take a long time to draw and _proof_read_ so bear with me on this one.

Stats so far:-

# Total Lines=3780.
# Blank Lines=29.
# Code Lines=1916.
# Comments=1835, (including the builtin Manual).
# Filesize=154912 bytes.

If you DL the file be sure to put it into your $HOME drawer and rename to AudioScope.sh and to set the executable flags as required.

Bazza...
This User Gave Thanks to wisecracker For This Post:
# 77  
Old 12-21-2015
Hi guys and gals...

Well I have not been entirely idle on this baby but CygWin64 has given me a few minor headaches.

There has been some code changes to prevent some errors inside CygWin, other platforms are not affected...

There is also a cosmetic change to the display...

The white [DISPLAY] section changes to green [STORAGE] mode when stopped in HOLD mode or red [CAPTURE] mode when stopped in RUN mode.
The white [DISPLAY] is still there during plotting and EXT trigger in waiting mode.

The manual has had a little more done to it...

Stats:-

# Total Lines=3797.
# Blank Lines=30.
# Code Lines=1915.
# Comments=1852, (including the builtin Manual).
# Filesize=155775 bytes.

Enjoy...

EDIT:

Added CygWin window of current version.
This uses SoundRecorder.exe in quiet mode...

Last edited by wisecracker; 12-21-2015 at 01:19 PM.. Reason: See above.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

A simple variable frequency sinewave audio generator.

Hi all... Well I have not been inactive but working out how to make OSX 10.14.x command line audio player have a variable sample rate. This is a back door as afplay does not have a sample rate flag unlike aplay for ALSA, in Linux flavours. This is a DEMO only but a derivative of it will... (2 Replies)
Discussion started by: wisecracker
2 Replies

2. Shell Programming and Scripting

Generate 10000 unique audio file of 2MB each using shell script.

Hi, I want 10000+ unique Audio file of approx 2MB each. How can i generate numerous audio files using shell script. Any tool, command or suggestions are welcome. If i give one audio seed file then can we create numerous unique files with same seed file? Any help is highly appreciable.... (11 Replies)
Discussion started by: sushil.kumar
11 Replies

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

4. UNIX for Dummies Questions & Answers

unable to start shell script

Hi, Pleasse could someone advise why i'm getting this error below - No such file or directory dev6:$ ls -ltr ReleaseManagement.sh -rwxr-xr-x 1 dev fix 4830 Aug 22 11:13 ReleaseManagement.sh dev6:$ ./ReleaseManagement.sh : No such file or directory dev6:$ thank you (2 Replies)
Discussion started by: venhart
2 Replies

5. Shell Programming and Scripting

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies

6. What is on Your Mind?

Scope of Shell Programming and scripting

Hi all, I want to know what is the scope and job status of shell Programming and scripting. Does it have any attractive jobs? (2 Replies)
Discussion started by: malikshahid85
2 Replies

7. Shell Programming and Scripting

Help with stop/start Shell Script.

Hi All, I would like to develop a shell script for stop & start an application server (1-4) on Solaris box. Here are the user requirements for this task. 1. User will input the option which server they wish to stop. 2. Will clear cache files from specific location. 3. ... (1 Reply)
Discussion started by: venga
1 Replies

8. Shell Programming and Scripting

scope of a Variable inside shell script

hi all, i'm using the following script, Status=1 Function_do () { while read line; do if ; then #echo $line if ; then Status=0 echo " LINKINK ERROR " fi fi done < ldd.log } Function_do (4 Replies)
Discussion started by: vij_krr
4 Replies

9. Shell Programming and Scripting

simple shell - how to get a parameter typed in a shell script

Hi, I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
Discussion started by: cmitulescu
4 Replies

10. Shell Programming and Scripting

problem with shell variable's scope

Hi, I am stuck while developing a shell sub-routine which checks the log file for "success" or "failure". The subroutine reads the log file and checks for key word "success", if found it set the variable (found=1). It returns success or failure based on this variable. My problem is, I can... (2 Replies)
Discussion started by: cjjoy
2 Replies
Login or Register to Ask a Question