Waveform Mini-Language

Have you looked into csound?

- FChE

Reply to
Frank Ch. Eigler
Loading thread data ...

It's the frequency response curve of your telephone. I regret mentioning it, as it seems to have misled the readers (which is almost always the fault of the writer). IT'S JUST ONE OF A MILLION EXAMPLES I COULD HAVE PICKED to try to convey the huge number of possible waveforms that can not be described by specifying frequency, amplitude, etc.

Yup. That's what I need to do. And I need to do it without knowing the requirements.

Moore invented FORTH without knowing anything about the requirements of the wide variety of things it would be used for.

Hoff invented the microprocessor without knowing anything about the requirements of the wide variety of things that would contain it.

They invented general-purpose solutions that can be used to meet a wide range of requirements that they never even imagined. That's what I am trying to do here.

That's the obvious solution, but it isn't clear that it is the best solution. It just seems like bulding a sort command into a programming language rather than creating more general purpose commands that can be used to build a sort routine or any number of other kinds of routines. Maybe it is the only way, but I am hoping for more generality and abstraction.

Another analogy: one can make parts out of metal with molds and casting, and have thousands of molds for thousands of parts. Or one can use a lathe that can make a wide variety of parts -- as long as they are cylendrical. Or one can use metal three dimensional printing / rapid prototyping. See

formatting link
and
formatting link

Good point about the compression; I wouldn't expect any mini-language to be able to describe an orchestra playing Mozart!

That's a brilliant idea. Exactly the kind of out-of-the-box idea I was hoping for. Yesterday I was looking at various CAD formats to see how they described things, but they aren't language-like. Postscript *is* a language that describes all sorts of two dimensional outputs that the designers of Postscript never imagined. Something like it that decribes one dimensional waveforms might be just what I am looking for. Thanks! More later after I investigate further.

I have no problem with RPN (postfix) if that makes the mini-language simpler. It is a great solution to the common desire to change a bunch of waveform parameters and then have them all be applied to the output at once.

Guy Macon

Reply to
Guy Macon

Not until just a moment ago. It looks quite promising. More later when I learn more.

Csound:

formatting link

Related: MPEG-4 Structured Audio

formatting link

Guy Macon

Reply to
Guy Macon

formatting link

The basic waveforms should not really be that much of a problem to generate and, as has been said elsewhere, should be fairly simple to generate out through the DAC at the desired frequency and amplitude. You are also looking to add in distortion influences and things like phase shift distortion, 3rd harmonic etc. should not be too much of a problem (these are at least mathematically related to the fundamental). Where you might find the greater difficulty is in the incorporation of transient impulses.

I would expect that producing a language that firstly described the desired basic waveforms and then layered the additional distortions and transients would be the way to go here.

So, something like:-

\ Setting Channel A Output

50 HZ SINE 10 VAC AMPLITUDE 3 HARMONIC [+] 5 DEGREE PHASE-DISTORT [+] CHAN-A [SET]

The [+} and [SET] commands are just the ways in which you add and transfer the vectors of the waveforms (and hides a whole lot of detail about the underlying complexity).

The underlying code to do all of this depends on the way your hardware can generate all of the required waveform variations you require. If you are directly generating the waveforms from the software then you have a great deal of flexibility to edit a single instance of the waveform and send that to the DAC. Thinking of it as two processes, each individual wave shape to be emitted could be assembled (from the descriptions) by the waveform compiler before being sent as a data-block to the waveform generator. I suppose that if there was enough repetition you could save individual single waveforms in the compilers memory space to feed in to the generator in the appropriate sequence.

In such things you need to evolve the hardware and software together with a common view of the overall system architecture. The system architecture needs to grow out of the problem domain and evolve to provide you with a clear view to the solution domain. Waveform generation seems to suggest a ready series of models that could be explored for ideas and selecting the right combination will get you to your goal I am sure.

--
********************************************************************
Paul E. Bennett ....................
Forth based HIDECS Consultancy .....
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-811095
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
Reply to
Paul E. Bennett

If you are prepared to adapt for RPN input, design the syntax for Forth. It's not difficult - we make similar use of the Forth interpreter for setting up COM ports under DOS, calibrating anaesthetic ventilators, and configuring web-attached widgets.

If you later find that the Forth syntax doesn't satisfy your users, a BNF parser in Forth can be done in 100 lines or so with productions. You can use the BNF parser to get to a more traditional syntax that uses the existing Forth inside the productions. We use this approach for parsing Windows API definitions to produce Forth equivalents.

Stephen

--
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
Reply to
Stephen Pelc

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.