I have:
experimented with SNACK.
searched wiki for DSP and FFT
reviewed first 300 hits at
http://www.google.com/search?q=tcl+dsp+OR+fft
Is there something I've missed?
BACKGROUND: I've seen some 'tutorial' (sic) sites on web
attempting to address various sampling and similar issues.
They had problems - but they got me thinking.
Sites were combination of JavaScript and 'flash'. Neither of
which I understand - *BUT* the got me thinking.
Before I take a "brute force"/"first principles" approach,
are there tools I should be looking at?
I *HATE* reinventing wheels ;/
TIA
Hi Richard,
The Tcl language is not a very efficient language for
mathematical/numerical operations.
That is to be noticed especially when those operations need to be
repeated as sequences, vectors or arrays. In that case, implementations
in pure Tcl are probably way too slow for you.
There exist C-extensions to Tcl for *generic* array operations: see the
package narray for example. However, for specific numerical operations
or algorithms, I haven't seen many of them. And that is somehow
understandable because specific numerical packages already exist either
as C libraries, or as separate applications.
If you choose to get the functionality you want from such specialized
packages/applications into Tcl, there are basically 2 methods:
1. For existing C libraries you need to write an extension to Tcl in C,
using the Tcl C library. You need to be familiar with (or willing to
learn) compiling and linking of binary code. This method can be greatly
facilitated by the packages SWIG.
Example: Snack might very well be using such a binding to an existing C
library to do its numerical processing.
2. For separate applications , well that depends on how well they
communicate to the world outside. IPC capabilities of applications vary
wildly. Especially those that have initially been designed for MS
Windows (only?), tend to be terribly poor in this regard. If the
application also has a unix implementation, chances are much better.
I haven't got much experience with method 1. However, if 2 seems
feasible to you, I can show you how to start.
>
> I *HATE* reinventing wheels ;/
>
You're not alone. The methods that I outlined, are there just because of
this.
Greetings,
Erik
--
leunissen@ nl | Merge the left part of these two lines into one,
e. hccnet. | respecting a character's position in a line.
BLT's [vector] stuff is usefull
expecially the [vector expr ... ] subcommand.
http://wiki.tcl.tk/3316
http://wiki.tcl.tk/15000 ;# Function plotting using [vector expr ...]
Snack has FFT and things.
http://www.speech.kth.se/snack/man/snack2.2/tcl-man.html
There is a pure tcl FFT around.
http://wiki.tcl.tk/11244
uwe
I'm using Tcl for it's ease of use, not its speed ;)
I've no C background so writing extensions/wrappers is not feasible.
SNACK &/or math::fourier can do what I need, but just checking if
there is existing package that would be "better".
thanks
I'd found those.
Thanks
The excellent open source language for signal processing is octave,
www.octave.org . Steep learning curve. If you search for "octave tcl"
there are a number hits about linking them.
I had forgotten about Octave. I looked at it about 4 years ago
and ended up using Scilab - at that time there were fewer
installation issues when running under WinXP. It was Scilab's
internal use of Tcl that turned me on to Tcl/Tk.
A "comfortable" user interface has been often more important than
number crunching speed. I switch back and forth depending on what
I'm doing at the moment. I go take another look at Octave.
Thanks.
You could also try NAP http://tcl-nap.sourceforge.net/
Donal.
Another possibility for connecting C code into tcl is the critcl
package. With this package you write a simple tcl wrapper for the C
functions you want to use and the critcl takes care of compiling the C
to tcl interface.
tomk
tomk wrote:
> On Apr 29, 7:34 pm, Richard Owlett<rowl...@pcnetinc.com> wrote:
>> Subject line is 'mildly' tongue-in-cheek.
>> I enrolled in a BSEE program *YEARS* before Cooley& Tukey
>> published. I was an analog person for whom 10 Hz was "wide band".
>> {digital was whether or not I had blown fuse ;}
>>
>> I have:
>> experimented with SNACK.
>> searched wiki for DSP and FFT
>> reviewed first 300 hits at
>> http://www.google.com/search?q=tcl+dsp+OR+fft
>>
>> Is there something I've missed?
>>
>> BACKGROUND: I've seen some 'tutorial' (sic) sites on web
>> attempting to address various sampling and similar issues.
>>
>> They had problems - but they got me thinking.
>> Sites were combination of JavaScript and 'flash'. Neither of
>> which I understand - *BUT* the got me thinking.
>>
>> Before I take a "brute force"/"first principles" approach,
>> are there tools I should be looking at?
>>
>> I *HATE* reinventing wheels ;/
>>
>> TIA
>
> Another possibility for connecting C code into tcl is the critcl
> package. With this package you write a simple tcl wrapper for the C
> functions you want to use and the critcl takes care of compiling the C
> to tcl interface.
>
> http://wiki.tcl.tk/2523
>
> tomk
*LOL* !!! ;/
There be generation GAP ( errr *CHASM* ) here.
Not only do I predate "Cooley & Tukey"
but also "Kernighan & Ritchie" ;/
{Isn't a typical acoustic coupler a high speed IO device? ;}
I must learn to write better questions.
[ JA of MIT need not comment ;]
An attempt to rephrase my question;
Are there Tcl/Tk only (or callable) routines available to
demonstrate/illustrate {any/all}:
1. Fourier series
2. DFT
3. FFT
4. Windowing
5. etc
Why?
I pulled up referenced (and some linked) pages.
You snipped/deleted too much for me to know why link.
Hello Richard,
I'm not sure about the pertinence of the comment referring to a
generation gap where you cite your predating items from the mid 1960s
and early 1970s (such as FFT and "C") and then want routines written
in TCL which comes from 1988 and later.
I would think you would have a greater chance of finding these
functions already written in C than TCL if for no other reason C has
been around since 1969.
If you already know TCL, could you not write these functions? They are
each pretty easy to implement with the FFT one being the most complex,
but there are many examples of FFT code out there even if they aren't
the most efficient. You can find these items in Numerical Recipes in C
along with source code. Does that help?
Clay
Tcl has all the math needed (via either "SNACK" or "Tcl Math
Library").
I was looking for illustrative UI's.
(My DSP specific problems will be posted to comp.dsp)
Thanks to all.