Re: Words for accessing the sound card

From: Bruno Gauthier <Bruno.GAUTHIER5_at_wanadoo.fr>
Date: Sun, 28 May 2000 22:57:47 +0200

Hello,
Give a look at the web page of Mike Kemper
http://216.132.198.179/
They are a sound class for SwiftForth

Bruno Gauthier

----- Original Message -----
From: "Ed Borasky" <znmeb_at_teleport.com>
To: <sftalk_at_forth.com>
Sent: Sunday, May 28, 2000 10:45 PM
Subject: [sftalk] Words for accessing the sound card

> I'm starting a Forth project which involves generating sounds. I want to
be
> able to play sounds from a SwiftForth program without having to write out
> files to disk in some format, such as the standard Windows "WAV" format.
Are
> there any words available for this, or do I have to do all the digging
into
> the Windows architecture myself? I have access to some C and C++ code that
> does this, but there is little documentation. I also have the GNU Compiler
> Collection for Windows, so if I have to link to a DLL in C or C++, I can
> certainly do that. And I can always write "WAV" format out to a pipe (if
> such things exist in Windows 98 :-) to be played by a file player. But I'd
> much rather do the whole thing in SwiftForth; the sound generation
> algorithms I'm going to be using work fine in real time, given a fast
enough
> processor (400 MHz currently) and enough memory (192 MB currently).
>
>
> _______________________________________________
> Sftalk mailing list Sftalk_at_forth.com
> Visit Sftalk on the web at http://www.forthinc.com/mailman/listinfo/sftalk

Return-Path: <mikek_at_cfl.rr.com>
Delivered-To: sftalk_at_gerd.forthinc.com
Received: from forth.com (forth.com [192.41.57.119])
        by gerd.forthinc.com (Postfix) with ESMTP id 1CBEA145E8
        for <sftalk_at_gerd.forthinc.com>; Sun, 28 May 2000 19:43:05 -0700 (PDT)
Received: from smtp-server.tampabay.rr.com (smtp-server1.tampabay.rr.com [24.92.1.13]) by forth.com (8.8.5) id UAA02875; Sun, 28 May 2000 20:37:02 -0600 (MDT)
X-Authentication-Warning: forth.com: Host smtp-server1.tampabay.rr.com [24.92.1.13] claimed to be smtp-server.tampabay.rr.com
Received: from MIKEK (curryford-ubr-c4-52.cfl.rr.com [24.95.242.52])
        by smtp-server.tampabay.rr.com (8.9.3/8.9.3) with SMTP id WAA24068
        for <talk_at_forth.com>; Sun, 28 May 2000 22:36:52 -0400 (EDT)
Message-ID: <001501bfc917$c1326780$34f25f18_at_cfl.rr.com>
From: "Michael Kemper" <mikek_at_cfl.rr.com>
To: "SFTALK" <talk_at_forth.com>
Date: Sun, 28 May 2000 22:44:04 -0400
MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="----=_NextPart_000_0012_01BFC8F6.39DDA400"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Subject: [sftalk] TFC Question
Sender: sftalk-admin_at_forth.com
Errors-To: sftalk-admin_at_forth.com
X-BeenThere: sftalk_at_forth.com
X-Mailman-Version: 2.0beta2
Precedence: bulk
Reply-To: sftalk_at_forth.com
List-Id: The SwiftTalk list <sftalk.forth.com>

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01BFC8F6.39DDA400
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

It seems that the objects can be statically instantiated, but cannot be =
dynamically instantiated at runtime. Is that correct?
Is this because the class system cannot parse the methods at run time?

What I'm trying to do is something like:

ObjType SUBCLASS Foo
    ...
END-CLASS

ObjType SUBCLASS Bar
    : Constructor
        Foo BUILDS FooInstance ;

    : SomeMethod =20
        FooInstance -> SomeOtherMethod ;
      =20
    : Destructor
        FooInstance DESTROY ;
END-CLASS

The only way I can seem to accomplish what I'm after is to have both =
objects pre-built, then have the code that invokes the Bar class also =
invoke the Foo class then manually pass the handle of Foo to Bar, and it =
tends to get a lot messier that it needs to be. =20

I'm not sure that my point is clear. Hopefully it is.=20

    Mike

------=_NextPart_000_0012_01BFC8F6.39DDA400
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>It seems that the objects can be =
statically=20
instantiated, but cannot be dynamically&nbsp;instantiated at =
runtime.&nbsp; Is=20
that correct?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is this because the class system cannot =
parse the=20
methods at run time?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>What I'm trying to do is something=20
like:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ObjType SUBCLASS Foo</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>END-CLASS</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ObjType SUBCLASS Bar</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; : =
Constructor</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foo=20
BUILDS FooInstance&nbsp;</FONT><FONT face=3DArial =
size=3D2>;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; : =
SomeMethod&nbsp;&nbsp;&nbsp;=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
FooInstance=20
-&gt; SomeOtherMethod</FONT><FONT face=3DArial size=3D2>=20
;</FONT></DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; : =
Destructor</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
FooInstance=20
DESTROY ;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>END-CLASS</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The only way I can seem to accomplish =
what I'm=20
after is to have both objects pre-built, then have the code =
that&nbsp;invokes=20
the Bar class also&nbsp;invoke the Foo class then manually pass the =
handle of=20
Foo to Bar, and it tends to get a lot messier that it needs to be.&nbsp; =

</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm not sure that my point is =
clear.&nbsp;=20
Hopefully it is. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
Mike</FONT></DIV></BODY></HTML>

------=_NextPart_000_0012_01BFC8F6.39DDA400--
Received on Sun May 28 2000 - 14:03:38 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 08-Feb-2012. Archive updated nightly.