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