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
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 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
Thanks Guys
This really helped (5 Replies)
Discussion started by: robert89
5 Replies
4. Slackware
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)
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)
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)
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
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
LEARN ABOUT DEBIAN
rdf::rdfa::generator
RDF::RDFa::Generator(3pm) User Contributed Perl Documentation RDF::RDFa::Generator(3pm)
NAME
RDF::RDFa::Generator - generate some data in RDFa
DESCRIPTION
Constructor
"$gen = RDF::RDFa::Generator->new(style => $style, %options)"
Creates a new generator object. $style is one of the following case-sensitive strings: 'HTML::Head' (the default), 'HTML::Hidden' or
'HTML::Pretty'. You can also construct an object like this:
$gen = RDF::RDFa::Generator::HTML::Head->new(%options);
Options include:
o base - the base URL where the output data will be published. This allows in some cases for the generated RDFa to include relative
URIs.
o data_context - if non-null, a URI (string) which indicates the context (named graph) containing the data to generate RDFa for.
o namespaces - a {prefix=>uri} hashref of preferred CURIE prefixes.
o ns - a {uri=>prefix} hashref of preferred CURIE prefixes. DEPRECATED - use namespaces instead.
o prefix_attr - use the @prefix attribute for CURIE prefixes (RDFa 1.1 only). Boolean, defaults to false.
o safe_xml_literals - prevents XML literals from injecting arbitrary XHTML into the output. Boolean, defaults to FALSE.
o title - assign a <title> element for generated XHTML documents.
o version - set generated RDFa version. Valid values are '1.0' (the default) or '1.1'.
Public Methods
"$gen->create_document($model)"
Creates a new RDFa file containing triples. $model is an RDF::Trine::Model object providing the triples. Returns an
XML::LibXML::Document object suitable for serialising using its "toString" method.
If you're planning on serving the RDFa with the text/html media type, then it is recommended that you use HTML::HTML5::Writer to
serialise the document rather than "toString".
Can also be called as a class method:
$document = RDF::RDFa::Generator->create_document($model)
# Same as:
# $document = RDF::RDFa::Generator->new->create_document($model)
"$gen->inject_document($document, $model)"
Injects an existing document with triples. $document is an XML::LibXML::Document to inject, or a well-formed XML string. $model is an
RDF::Trine::Model object providing the triples. Returns an XML::LibXML::Document object suitable for serialising using its "toString"
method.
See "create_document" for information about serving the RDFa with the text/html media type.
Can also be called as a class method. See "create_document" for details.
"$gen->nodes($model)"
Provides triple-laden XML::LibXML::Elements to be added to a document. $model is an RDF::Trine::Model object providing the triples. If
called in list context, returns a list of XML::LibXML::Element objects which can be added to a document; otherwise returns an
XML::LibXML::NodeList containing a list of such elements.
Can also be called as a class method. See "create_document" for details.
The HTML::Pretty generator can be passed a couple of additional options:
$gen->nodes($model, notes_heading=>'Additional Info', notes=>@notes);
The notes are a list of RDF::RDFa::Generator::HTML::Pretty::Note objects which are added as notes to the end of each subject's data.
Additionally the methods "serialize_model_to_file", "serialize_model_to_string", "serialize_iterator_to_file" and
"serialize_iterator_to_string" are provided for compatibility with the RDF::Trine::Serializer interface.
BUGS
Please report any bugs to <http://rt.cpan.org/>.
SEE ALSO
HTML::HTML5::Writer, XML::LibXML, RDF::RDFa::Parser, RDF::Trine, RDF::Prefixes.
<http://www.perlrdf.org/>.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
Copyright (C) 2010 by Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8 or, at
your option, any later version of Perl 5 you may have available.
Icons
RDF::RDFa::Generator::HTML::Pretty uses the FamFamFam Silk icons; see <http://famfamfam.com/lab/icons/silk/>.
perl v5.12.4 2011-07-06 RDF::RDFa::Generator(3pm)