Written decoding software for sound cards?

Written decoding software for sound cards?

Post by MOstrowsk » Fri, 28 May 1999 04:00:00

I'd like to hear from anyone who has written digital signal decoding
software using sound cards.

I'm currently searching for information relating to decoding digital signals
(CW, RTTY, AMTOR,
CLOVER, PSK31, etc) using a sound card. I've used several of such software
packages currently
available for download and I like to try my hand a writing something
similar. I have many years
experience professionally programming both DOS and Windows applications
using C/C++/MFC,
but have never had need to interface to a sound card until now. I'd like
this application to be
Windows 95/98 based but I've heard rumors that directly accessing the sound
card interface is
difficult, if not impossible, under that OS.

Any tips you can pass along that can get me started will be greatly
appreciated; also any info
on books/articles/websites/source code/libs you've found helpful.

Michael Ostrowski - KI8IK
Saline, MI


 
 
 

Written decoding software for sound cards?

Post by W6RCecil » Fri, 28 May 1999 04:00:00



> Any tips you can pass along that can get me started will be greatly
> appreciated; also any info
> on books/articles/websites/source code/libs you've found helpful.

Peter, of PSK31 fame, told me that the Microsoft mmsystem.dll
handles interfacing to the sound card. I haven't looked for
info on that DLL but I assume it is available from Microsoft.
I'm also interested so please post whatever sound card interfacing
info you gather.
--
73, Cecil, W6RCA   http://www.bigfoot.com/~w6rca
 
 
 

Written decoding software for sound cards?

Post by Spunky The Waffle Iro » Fri, 28 May 1999 04:00:00

The problem with programs that use soundcards that decode radio info can't be built around visual basic
as VB is so damned slow.
Thus, soundcard decoder programs require the knowledge of real programmers (C++) which explains why they are so
damned buggy, due to Windows needing thousands of lines of C++ code just to initialise a stupid program (being
sarcastic but you C++ Windows programmers know exactly what I mean).
 
 
 

Written decoding software for sound cards?

Post by George Privalo » Fri, 28 May 1999 04:00:00



t>...
:The problem with programs that use soundcards that decode radio info can't
be built around visual basic
:as VB is so damned slow.

Actually VB 6 is not that slow.  Problem is in lack of support for
Multi-threading and callbacks that are required to fully exploit the
potential of mmsystem.dll API.

:Thus, soundcard decoder programs require the knowledge of real programmers
(C++) which explains why they are so
:damned buggy, due to Windows needing thousands of lines of C++ code just to
initialise a stupid program (being
:sarcastic but you C++ Windows programmers know exactly what I mean).

Well, It's not that bad.  But there is function of complexity of
implementation vs. size of the project.  For VB it grows steeper
but VB starts at 0 value.  C++ starts at some positive number (since you
will need bunch of to put "Hello World" on the screen") but grows slower
with size of the project.  To make story short: smaller projects are easier
to do at VB while large ones on C++.

George

 
 
 

Written decoding software for sound cards?

Post by Oris » Fri, 28 May 1999 04:00:00


> I'd like to hear from anyone who has written digital signal decoding
> software using sound cards.

> I'm currently searching for information relating to decoding digital signals
> (CW, RTTY, AMTOR,
> CLOVER, PSK31, etc) using a sound card. I've used several of such software
> packages currently
> available for download and I like to try my hand a writing something
> similar. I have many years
> experience professionally programming both DOS and Windows applications
> using C/C++/MFC,
> but have never had need to interface to a sound card until now. I'd like
> this application to be
> Windows 95/98 based but I've heard rumors that directly accessing the sound
> card interface is
> difficult, if not impossible, under that OS.

> Any tips you can pass along that can get me started will be greatly
> appreciated; also any info
> on books/articles/websites/source code/libs you've found helpful.

> Michael Ostrowski - KI8IK
> Saline, MI



I hope you find what your looking for. I would make a sujestion to you.
I would sujest that you try to do this under Linux (i.e. Unix) first. I
think that you would have alot better response with the linux OS versus
Windows. Good luck let me know what you find out.
               Thanks Oris
--

                    http://www.dirtball.com

97.1  Basis and purpose.
   (d)  Expansion of the existing reservoir within the amateur radio
   SERVICE of trained operators, technicians, and electronics experts.

 
 
 

Written decoding software for sound cards?

Post by Gerhard-Hermann Niepha » Fri, 28 May 1999 04:00:00

On Thu, 27 May 1999 10:38:55 -0400, "MOstrowski"


>I'd like to hear from anyone who has written digital signal decoding
>software using sound cards.

>I'm currently searching for information relating to decoding digital signals
>(CW, RTTY, AMTOR,
>CLOVER, PSK31, etc) using a sound card. I've used several of such software
>packages currently
>available for download and I like to try my hand a writing something
>similar. I have many years
>experience professionally programming both DOS and Windows applications
>using C/C++/MFC,
>but have never had need to interface to a sound card until now. I'd like
>this application to be
>Windows 95/98 based but I've heard rumors that directly accessing the sound
>card interface is
>difficult, if not impossible, under that OS.

>Any tips you can pass along that can get me started will be greatly
>appreciated; also any info
>on books/articles/websites/source code/libs you've found helpful.

>Michael Ostrowski - KI8IK
>Saline, MI



Michael,
you can find at least one very usefull source code example
demonstrating sound card programming under MS Windows on creative labs
(soundblaster) ftp server:
        ftp://ftp.creaf.com/pub/creative/devinfo
The file I used is
        fullduplex.exe
I used this example as a starting point for my DSP programming under
Windows NT using Visual C++ 5.0.

Good luck!

Gerd Niephaus

 
 
 

Written decoding software for sound cards?

Post by Mark J. Fin » Fri, 28 May 1999 04:00:00

George hit the nail on the proverbial head.  The problem with signal
processing in real time is that you need a real-time processor.  Unless your
eating all of the processing time this can't be done reliably in Win9x.

The second problem is that Win9x does not let you talk to the card at the
hardware level, as well as to the DMA.  You would need to do that to
effectively perform near real-time capture and hold processes of any sound
frames you're trying to deal with.  Best bet there is to write a 16-bit dll,
which will allow you to do these things.

73,

[*     Mark J. Fine * FineWare * 11252 Cardinal Drive     *]
[*  Remington, ***ia  22734-2032 * USA * 3834N 07751W  *]

[* Smart R8 Control * SWBC Schedule Subscription Service  *]
[*  Smart Lowe Ctrl * Smart Kenwood Ctrl * Smart NRD Ctrl *]
[*SWBC Interval Signals * Smart Audio Control * TTY Reader*]




> t>...
> :The problem with programs that use soundcards that decode radio info can't
> be built around visual basic
> :as VB is so damned slow.

> Actually VB 6 is not that slow.  Problem is in lack of support for
> Multi-threading and callbacks that are required to fully exploit the
> potential of mmsystem.dll API.

> :Thus, soundcard decoder programs require the knowledge of real programmers
> (C++) which explains why they are so
> :damned buggy, due to Windows needing thousands of lines of C++ code just to
> initialise a stupid program (being
> :sarcastic but you C++ Windows programmers know exactly what I mean).

> Well, It's not that bad.  But there is function of complexity of
> implementation vs. size of the project.  For VB it grows steeper
> but VB starts at 0 value.  C++ starts at some positive number (since you
> will need bunch of to put "Hello World" on the screen") but grows slower
> with size of the project.  To make story short: smaller projects are easier
> to do at VB while large ones on C++.

> George

 
 
 

Written decoding software for sound cards?

Post by Robert Lay (W9D » Sat, 29 May 1999 04:00:00

On Thu, 27 May 1999 10:38:55 -0400, "MOstrowski"


>I'd like to hear from anyone who has written digital signal decoding
>software using sound cards.

>I'm currently searching for information relating to decoding digital signals
>(CW, RTTY, AMTOR,
>CLOVER, PSK31, etc) using a sound card. I've used several of such software
>packages currently
>available for download and I like to try my hand a writing something
>similar. I have many years
>experience professionally programming both DOS and Windows applications
>using C/C++/MFC,
>but have never had need to interface to a sound card until now. I'd like
>this application to be
>Windows 95/98 based but I've heard rumors that directly accessing the sound
>card interface is
>difficult, if not impossible, under that OS.

Dear Mike,

The most comprehensive source that I have found (excepting purchase of
an SDK from Microsoft) is "Windows 95 Multimedia & ODBC API Bible" by
The Waite Group Press - Richard J. Simon, Tony Davis, John Eaton, and
R. Murray Goertz.  
It has chapters on Waveform and Auxiliary Audio and on Multimedia File
I/O. Those two chapters are really all you need to do everything that
needs to be done for a mode like PSK31.

If you can locate a "Books-a-Million" store, they may be able to help
you - I got my copy at 50% discount - normally $54.99. CD-ROM is
included.

 
 
 

Written decoding software for sound cards?

Post by Shiva Natara » Sat, 29 May 1999 04:00:00



>The file I used is
>    fullduplex.exe
>I used this example as a starting point for my DSP programming under
>Windows NT using Visual C++ 5.0.

Yes, but where did you go from there? Getting the samples is the easy
part. ;-)
 
 
 

Written decoding software for sound cards?

Post by Hamish Moffat » Sat, 29 May 1999 04:00:00


Quote:> The problem with programs that use soundcards that decode radio info can't be built around visual basic
> as VB is so damned slow.
> Thus, soundcard decoder programs require the knowledge of real programmers (C++) which explains why they are so
> damned buggy, due to Windows needing thousands of lines of C++ code just to initialise a stupid program (being
> sarcastic but you C++ Windows programmers know exactly what I mean).

And even then, "real time" is a bit of a joke. For example, the best resolution
and lowest timer interval you can get out of the high resolution timer is 1ms.

Hamish
--

Rising Software Australia Pty. Ltd.
Developers of music education software including Auralia & Musition.
31 Elmhurst Road, Blackburn, Victoria Australia, 3130
Phone: +61 3 9894 4788  Fax: +61 3 9894 3362  USA Toll Free: 1-888-667-7839
Internet: http://www.rising.com.au/

 
 
 

Written decoding software for sound cards?

Post by Michael Youn » Sat, 29 May 1999 04:00:00



> I hope you find what your looking for. I would make a sujestion to
you.
> I would sujest that you try to do this under Linux (i.e. Unix) first.
I
> think that you would have alot better response with the linux OS
versus
> Windows. Good luck let me know what you find out.

Fah!! I'm not against Linux (I run it here myself), but the difference
in available tools makes comparison less than likely.

Best advice: write the FFT and multimedia modules as OCX's using C++,
and build the front end using whatever trash you like. The FFT module is
very small, about 300 lines. The MM interface is similarly small, about
100 lines.

Michael.

 
 
 

Written decoding software for sound cards?

Post by George Privalo » Sat, 29 May 1999 04:00:00


>In rec.radio.amateur.digital.misc Spunky The Waffle Iron

>And even then, "real time" is a bit of a joke. For example, the best
resolution
>and lowest timer interval you can get out of the high resolution timer is
1ms.

With PerformanceCounter API and high priority levels you can get better
resolution and response.   Win NT will be much  better choice for
time-critical applications.  The reason for that is Win95 memory management
is designed to better utilize physical memory at the expense of response
time.  For sound processing NT offers more then plenty real-timeness unless
you want 44Khz resolution stereo (don't need that for SWLing).

Don't know much about Linux but am very curious about it.

 
 
 

Written decoding software for sound cards?

Post by Will Spark » Sun, 30 May 1999 04:00:00

One of the nice things about Win95/NT/OS/2/Linux is that you don't have to
write low level code to access the sound card. The drivers take care of it,
and it should would on all types of sound cards. One of my biggest peeves is
that most of the sound card software requires a SB16 or 64AWE sound card and
doesn't support anything else since they use direct hardware calls.

Decoding RTTY doesn't need real-time processing.  Sure, VB isn't quite up to
***for it, but it does make a nice front end so you don't have to spend a
lot of time writing C++ code. Use a DLL for all the signal processing.
Buffers can take care of any processing lag, although decoding RTTY isn't
exactly "intensive".



> George hit the nail on the proverbial head.  The problem with signal
> processing in real time is that you need a real-time processor.  Unless
your
> eating all of the processing time this can't be done reliably in Win9x.

> The second problem is that Win9x does not let you talk to the card at the
> hardware level, as well as to the DMA.  You would need to do that to
> effectively perform near real-time capture and hold processes of any sound
> frames you're trying to deal with.  Best bet there is to write a 16-bit
dll,
> which will allow you to do these things.

> 73,

> [*     Mark J. Fine * FineWare * 11252 Cardinal Drive     *]
> [*  Remington, ***ia  22734-2032 * USA * 3834N 07751W  *]

> [* Smart R8 Control * SWBC Schedule Subscription Service  *]
> [*  Smart Lowe Ctrl * Smart Kenwood Ctrl * Smart NRD Ctrl *]
> [*SWBC Interval Signals * Smart Audio Control * TTY Reader*]






- Show quoted text -

Quote:> > t>...
> > :The problem with programs that use soundcards that decode radio info
can't
> > be built around visual basic
> > :as VB is so damned slow.

> > Actually VB 6 is not that slow.  Problem is in lack of support for
> > Multi-threading and callbacks that are required to fully exploit the
> > potential of mmsystem.dll API.

> > :Thus, soundcard decoder programs require the knowledge of real
programmers
> > (C++) which explains why they are so
> > :damned buggy, due to Windows needing thousands of lines of C++ code
just to
> > initialise a stupid program (being
> > :sarcastic but you C++ Windows programmers know exactly what I mean).

> > Well, It's not that bad.  But there is function of complexity of
> > implementation vs. size of the project.  For VB it grows steeper
> > but VB starts at 0 value.  C++ starts at some positive number (since you
> > will need bunch of to put "Hello World" on the screen") but grows slower
> > with size of the project.  To make story short: smaller projects are
easier
> > to do at VB while large ones on C++.

> > George

 
 
 

Written decoding software for sound cards?

Post by Mark J. Fin » Sun, 30 May 1999 04:00:00


> One of the nice things about Win95/NT/OS/2/Linux is that you don't have to
> write low level code to access the sound card. The drivers take care of it,

The problem with what you're saying is that the drivers are only meant for
playback and recording in a certain format - NOT the kind of FFT processing
that's required. This processing is also not available in the standard sound
dll.

Quote:> Decoding RTTY doesn't need real-time processing.  Sure, VB isn't quite up to
>***for it, but it does make a nice front end so you don't have to spend a
> lot of time writing C++ code. Use a DLL for all the signal processing.
> Buffers can take care of any processing lag, although decoding RTTY isn't
> exactly "intensive".

Disagree.  It's a lot more complicated than you think.  There's not just the
decoding part that needs to be done here.  There's also the issue of
discriminating the desired tones from the rest of the clutter and noise that
you're passing through there.  You need FFTs to do this since zero-crossing
techniques just don't cut it in a real signal environment.

Once that filtering is done, only then can you start decoding the signal.  I
agree that some buffering is required, but you only have so much buffer space
for windowing an accurate capture and hold function.  Sooner or later if the
processing isn't fast enough, you will have a buffer overflow and will lose
synchronization.  I've done this with single-processor 486s, Pentiums and
Pentium II machines.  They all overflow at some point when trying to do this
with the standard interfaces to a sound card.

Since we're not talking about true multi-processing operating
systems/environments, the signal processing is too intense for the results to
be refreshed to any Windows user interface (especially with VB).  This may be
a bad analogy, but the result is similar to getting dropouts on RealAudio.  If
you're dropping large chunks of data during the buffering process, what's the
point.

The bottom line here is that sound cards were never designed to be true signal
processing chips like the TMS series.  If people want a real decoder in their
machines, they need a different card that's going to do the extra processing
for them rather than rely on their main processor to do it for them.

73,

[*     Mark J. Fine * FineWare * 11252 Cardinal Drive     *]
[*  Remington, ***ia  22734-2032 * USA * 3834N 07751W  *]

[* Smart R8 Control * SWBC Schedule Subscription Service  *]
[*  Smart Lowe Ctrl * Smart Kenwood Ctrl * Smart NRD Ctrl *]
[*SWBC Interval Signals * Smart Audio Control * TTY Reader*]

 
 
 

Written decoding software for sound cards?

Post by W6RCecil » Sun, 30 May 1999 04:00:00


> One of the nice things about Win95/NT/OS/2/Linux is that you don't have to
> write low level code to access the sound card.

DOS is conspicuous by its absence. Aren't there DOS drivers available
for soundcards? Are there standard DOS calls available for soundcards?
If not, could we come up with some? How is/was soundcard interfacing
handled under DOS?
--
73, Cecil, W6RCA   http://www.bigfoot.com/~w6rca