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...
# 43  
Old 03-15-2014
AuduiScope.sh Version 0.22.10...

Lots of changes here for version 0.22.10...

A semi-automatic Arduino detection command:- ARDDET<CR>
This requires a small amount of user input. Thanks Corona688 and Don...
The ARDDET<CR> section also creates a .PDE file to program the Arduino for a single ADC only <- read the code for more info...

An 8 second pure sinewave wave file now created for multi-platform use.
It IS now on my 'phone as a signal source using the default 'phone player in loop mode - nice'n'easy... ;o)

Another command:- BURST<CR> plays the above wave file using "afplay" for OSX or "aplay" for Linux.

DC now allows REAL DC into the scope IF Arduino is detected.
IF NOT then it defaults to a DEMO mode and samples /dev/urandom.
It displays itself inside the YELLOW section of the COMMAND window for a short period.

Another command:- ALTDC<CR> is a placeholder for a sound card DC input under development.

Other minor changes too...

This WILL have bugs and any discovered please let me know on this thread.

This site is the first to get this OFFICIAL release...

Enjoy...

EDIT:

To see Arduino working after programming it just temporarily wire a 10K pot' between +5V and Gnd with the wiper connected to ANALOG 0.

Last edited by wisecracker; 04-26-2014 at 02:00 PM.. Reason: Remove visible code and add it as an attachment.
# 44  
Old 04-25-2014
Right guys and Gals...

I have not been idle on AudioScope.sh but I have finally got it working on CygWin using the default /dev/dsp inside CygWin, using the relatively limited command set with CygWin...

I have not attempted to use Windows SOX yet but that might be on the agenda.

This is a snapshot only taken today, 25-04-2014, of AudioScope.sh running inside CygWin on an ancient HP laptop running Windows Vista.
It is SSLLOOWW ATM but works reasonably well...

Ignore the version number as this was the closest thing to current that I had at hand at work... ;o)
I am not releasing the code yet until I have cleaned it up on the current version but it is coming soon.

EDIT:
I forgot to add that the waveform is a whistle into the laptop's mic.
The Start Of A Simple Audio Scope Shell Script...-cygwinscopejpg

Last edited by wisecracker; 04-25-2014 at 02:15 PM.. Reason: See above.
This User Gave Thanks to wisecracker For This Post:
# 45  
Old 04-26-2014
CigWin is SSLLOOWW but that has not deterred me from attempting to include it.
The FREQ command works but is totally unusable do to said speed.
The BURST command only works in DSP mode, not DEMO.
SOX has not been included although I might attempt it.

Only tested on an old dual core HP laptop, and a quad core Philips desktop both
running Windows Vista, and a fairly recent version of CygWin.

You will have to set up test and mic inputs yourselves but DEMO mode still works
as normal...

Comments welcome, and tests on other Windows versions would be of great help.

It is uploaded in CygWin guise and is marginally slower on real UNIX like machines
however ALL of the original code is commented out and NOT deleted. All you need
to do is search for CYGWIN and comment out the relevant line(s)
below it and uncomment the single line above it. This changes the hex dumper from
"od" back to the original "hexdump" again...

Also another simple circuit at the end for the DC control pulse under construction.

Other changes too...

Enjoy finding simple solutions to often very difficult problems...

Last edited by wisecracker; 05-26-2014 at 05:56 PM.. Reason: Readable code removed. Use attachment from now on.
# 46  
Old 05-26-2014
Major update, including a program startup progress mode primarily for CygWin.

Another text mode circuit added and now the start of a manual inside the script.

Minor subtle fixes that would probably never be found.

All code is now open and all needed files are automatically saved to the /tmp drawer.

Thanks to Corona688 and pointing me to the here-doc, the manual, now inside the code,
is autosaved to the /tmp drawer also.

There is a lot to do with this manual yet and there will be a few typos so any proof reading
help would be most welcome. TIA...

As the script is now over 90kB in size I have made it an attachment only.

Enjoy finding simple solutions to often very difficult problems...

Barry...
# 47  
Old 06-24-2014
Right guys and gals this initially fun project is now grown into a very serious app.

This latest upload now includes another command PULSE<CR> that is used for the initial setup of the vertical amplifier.

The amplifier circuit in now included inside the Manual at the end of the script. It is a finalised version of the upload to this site here:-

Y amp now done and I am a very happy bunny...

Take note of Corona688's reply as this is very useful and there is no need for me to repeat it here.

The Manual now has the first part of the construction included too.

The script and three photos of the amplifier are now uploaded...

Thoroughly read the script for more infromation.

Enjoy...
This User Gave Thanks to wisecracker For This Post:
# 48  
Old 07-16-2014
Hi everyone...

Yup it is me again with Version 03010.

A bug has been found by someone, woohoo someone is actually interested. ;oD
Now cured and lots of code cleanup.

Manual inside the code taken further, still well unfinished but hey it takes time
to write boring manuals...

Now that this code auto-detects whether OSX 10.7+, Linux flavours, some UNIX
platforms and CygWin I am now working on Raspberry Pi as another platform.

I will let you all know in due course.

Still have to get the alternate DC input 'ALTDC' command hardware built ans SW
written.

Here are some stats:-

Total lines 2680.

Split up as:-

27 blank lines.

1255 comments including the manual and circuits so far.

1398 lines of proper code.

File length is now 108463 bytes in size as of this upload...

This site always gets the latest official release way before any other.

Thanks to the admin and staff for allowing it to be hosted...

Enjoy guys...
This User Gave Thanks to wisecracker For This Post:
# 49  
Old 09-05-2014
Well guys and gals, once again, being the host site, you are the first to get this unofficial release...

Lots of code cleanup and other snippets, however......

I have not been idle on this as some serious research has had to be done to get this to work with Quicktime Player as a capture source purely for OSX...

It is SLOW and likely to be buggy but hey, it works on my MBP, circa August 2012, OSX 10.7.5 using the deafult bash terminal.

The command to access it is:-

OSX107PLUS<CR>

It does not show up in the HELP listing yet but IF you try it you USE IT ENTIRELY AT YOUR OWN RISK.

On my machine the required file is autosaved I would like feedback if your Mac machine does NOT autosave.

The attached image is a whistle into the internal microphone grabbed using Quicktime.

Before switching to this mode manually run up Quicktime, start a short 'New Audio Recording' and ensure you are saving to your '$HOME/Movies' folder|drawer|directory. Also ensure you are saving the highest quality filename.aifc format.

IMPORTANT!!! ALL *.aifc audio files inside this folder WILL be deleted so BEWARE.

Locking a folder and other needed stuff too are TODOs.

Enjoy finding simple solutions to often very difficult problems...

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