Sponsored Content
Operating Systems OS X (Apple) An Audio Function Generator... Post 302970209 by wisecracker on Monday 4th of April 2016 01:36:59 AM
Old 04-04-2016
Hi Don...

# defined, $VER will not be expanded in an awk string constant.

This made me smile...

It is not meant to be a variable at all.

As I am still an ancient AMIGA _fanatic_ this is how any executable file in the AMIGA directory tree displays what the program and its version is when _asked_.
$VER is always the first 4 characters followed by a space and after that is pure text. I use underscores instead of other spaces.
So if you see anything of mine it will always have $VER in it. In AudioScope the '$' is escaped so as not to be confused with a variable in 'sh'...
It is a quirk of mine...

All of the files are now created but I forgot about the 'close()' you mentioned in post 8, my bad.

Anyhow it looks as though this creation will be yours too... ;oD

Once again you have added to my learning and I had thought about a function but was not sure at this stage where to start.

As for the ARBITRARY waveform size anything greater that 480,000 bytes is OK and that was my next job...

2 questions:-

Eventually for the ARBITRARY generation I was going to call the shell command ed as this is difinitve on all versions of Linux and UNIX flavours.

1) Which editor would you use to call?
2) Is it possible to save the file without a newline?

I have checked three editors, 'Gedit' is my GUI editor of choice, 'ed' and 'vi(m)'. I might be missing something with 'ed' and 'vi(m)' as I am no expert by any stretch of the imagination...

TIA.
 

8 More Discussions You Might Find Interesting

1. Programming

Python, Platform Independent, Pure Audio Sinewave Generator...

IKHz_SW_OSX.py A DEMO mono _pure_ sinewave generator using standard text mode Python 2.6.7 to at least 2.7.3. This code is EASILY modifyable to Python version 3.x.x... This DEMO kids level 1KHz generator is mainly for a MacBook Pro, (13 inch in my case), OSX 10.7.5 and above. See below...... (0 Replies)
Discussion started by: wisecracker
0 Replies

2. Shell Programming and Scripting

A Crude 1KHz Audio Sinewave Generator Demo...

A very simple crude sinewave generator. The file required is generated inside the code, is linear interpolated and requires /dev/audio to work. Ensure you have this device, if not the download oss-compat from your OS's repository... It lasts for about 8 seconds before exiting and saves a... (5 Replies)
Discussion started by: wisecracker
5 Replies

3. Shell Programming and Scripting

Sequence generator

Thanks Guys This really helped (5 Replies)
Discussion started by: robert89
5 Replies

4. Slackware

Problems with audio recording in Audacity 2.0.5. Slackware64 14.1; Intel HD Audio.

I'm trying to record audio using Audacity 2.0.5 installed from SlackBuilds. My system is 64-bit Slackware 14.1 and a sound card is Intel HD Audio. I didn't change my sound system to OSS. (Default sound system in Slackware 14.1 is ALSA, isn't it?) First, I set Internal Microphone slider in KMix... (2 Replies)
Discussion started by: qzxcvbnm
2 Replies

5. OS X (Apple)

A Bash Audio Sweep Generator...

This is a small program as a tester for a basic sweep generator for bandwidth testing of AudioScope.sh. This DEMO is only capable of 4KHz down to about 85Hz and back due to the low bit rate, but it is proof of concept for a much wider variant using a much higher bit rate. The file generated... (4 Replies)
Discussion started by: wisecracker
4 Replies

6. OS X (Apple)

Variable frequency audio generator...

Hi all... I intend to do an Audio Function Generator using Awk, (already started thanks to Don), but the biggest thing I have struggled with was variable frequency. I was going to generate differing sized waveforms on the fly but that would that would mean the frequencies are dependent on any... (2 Replies)
Discussion started by: wisecracker
2 Replies

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

8. Shell Programming and Scripting

Hostsfile generator

Hello I use a bash script to creating the hosts file /etc/hosts But there is a bug inside my output and I want to fix this. My Array looks like this: 205,IP 111.122.133.20 205,HOST2 unas 205,HOST1 unas15533 205,COMMENT # UNAS 775,IP ... (9 Replies)
Discussion started by: Marti95
9 Replies
Package::Reaper(3)					User Contributed Perl Documentation					Package::Reaper(3)

NAME
Package::Reaper - pseudo-garbage-collection for packages VERSION
version 0.103 SYNOPSIS
use Package::Generator; use Package::Reaper; { my $package = Package::Generator->new_package; my $reaper = Package::Reaper->new($package); ... } # at this point, $package stash has been deleted DESCRIPTION
This module allows you to create simple objects which, when destroyed, delete a given package. This lets you approximate lexically scoped packages. INTERFACE
new my $reaper = Package::Reaper->new($package); This returns the newly generated package reaper. When the reaper goes out of scope and is garbage collected, it will delete the symbol table entry for the package. package my $package = $reaper->package; This method returns the package which will be reaped. is_armed if ($reaper->is_armed) { ... } This method returns true if the reaper is armed and false otherwise. Reapers always start out armed. A disarmed reaper will not actually reap when destroyed. disarm $reaper->disarm; This method disarms the reaper, so that it will not reap the package when it is destoryed. arm $reaper->arm; This method arms the reaper, so that it will reap its package when it is destroyed. By default, new reapers are armed. AUTHOR
Ricardo SIGNES, "<rjbs@cpan.org>" BUGS
Please report any bugs or feature requests to "bug-package-generator@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. COPYRIGHT
Copyright 2006 Ricardo Signes, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2009-07-09 Package::Reaper(3)
All times are GMT -4. The time now is 04:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy