[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multimedia in DrScheme



Funny running into you on this list (instead of the Squeak list).

DrScheme uses wxWindows for underlying functions, which has good and bad
features. Try: "((get-color-pixel viewport) p)" using the simple
graphics functions. It's under "Position Operations" and it took me a
while to find it myself. Note that "(open-pixmap name horiz vert)" can
be offscreen -- but I'm not sure if "get-color-pixel" works with it (I'd
assume yes?). 

I haven't tried the alternative functions under wxWindows -- but I think
the wxWindows DC provides some limited bit blitting operations (I don't
think as many as Smalltalk though). Search on "pixel" in the help desk
and the MrEd "get-pixel" function will be at the top, found also under
"bitmap-dc%".

I found the graphics to be 4 - 6 times faster doing 3D drawing using
DrScheme over Squeak. Although there could be all kinds of reasons, I
did feel the wxWindows viewport blitting to the screen might be faster
in DrScheme under win32.

I haven't looked at sound -- sorry. I did post an example to this list a
few weeks back on doing a file primitive as a DLL. That might be useful
if you have to write something it in C and interface to it. It should be
in the archive:
  http://www.cs.utah.edu/plt/mailarch/
There are of course several examples for extensions that ship with
DrScheme. 
Look under: C:/Plt/MzScheme/examples

If you find out more on sound, I hope you post a summary to the list.

It's a shame to see so much duplicate work required to maintain various
platforms in various projects -- all essentially similar effort
requiring substantial time by good people. Also the effort by all of us
to learn all these open source platforms (Squeak, DrScheme, GForth, what
have you) just to have a choice oof languages. I downloaded the DrScheme
source (6 Hours CVS!) and it's basically a forked version of wxWindows
from several years ago -- and so a maintenance requirement -- although
I'll given Matt and others here lots of credit for keeping it stable and
useful on the major platforms, and they do show a strong commitment to
supporting it. However, it's opaqueness (being compiled) means one has
to rely heavily on the HelpDesk for getting API information. I think the
HelpDesk in DrScheme if fabulous -- Squeak could benefit from something
like it.

I would love to see an open source Scheme, Smalltalk, Pascal, Forth,
etc. all using a common core, with native FFI interface functions,
native code generation as desired, and also good emulated widget set for
a simple common core API. Multimedia functions should be near identical
from any language you choose to use on this platform. Hope we get there
someday. Either Scheme or Squeak might be good underlying layers. I
think Squeak is in some ways the closest, because it adopts the approach
of generating the bulk of the C from an abstract representation
(Smalltalk), whereas MzScheme has to float on top of lots of C code only
maintainable in C. That's ironic because in practice Lisp syntax lends
itself more to translation. Too bad SqueakC hasn't in the past
emphasized reliability, exception handling, compactness, modularity,
etc. over expanding functionality. In my darker moods I think that lack
is intentional to keep everyone shackled as eToy alpha testers. At least
with DrScheme, clutter and rough edges are less obvious at the start.

I've enjoyed working with DrScheme. It's a fun system and quite snappy. 

-Paul Fernhout
Kurtz-Fernhout Software 
=========================================================
Developers of custom software and educational simulations
Creators of the Garden with Insight(TM) garden simulator
http://www.kurtz-fernhout.com

Mark Guzdial wrote:
> 
> Hi!  I'm a first time caller to the list, and a newcomer to DrScheme.
> We're using DrScheme in our introduction to computing class at
> Georgia Tech.
> 
> I'd like to invent some multimedia activities in DrScheme, and to do
> so, I need some existing toolbox functions available at just one
> level lower of abstract, it seems to me.  Or maybe what I want to do
> is already available, or easily implemented, but I just am not seeing
> it.
> 
> - I want students to be able to do simple "transition" animations
> between images, e.g., blurs, fades, or even morphing.  There is a
> function for loading a pixmap from a file, and there's another for
> setting a pixel in a viewport.  But what I really need are the
> lower-level functions: To be able to manipulate a pixmap in memory,
> and get individual pixel color values.
> 
> - I want students to be able to fill a sound buffer with computed
> values (e.g., a sine wave, and later, a sine wave modified by an
> envelope) and then play the sound buffer.  There is a function for
> playing a sound from a file, but I need to be able to access the
> sound buffer before it starts to play.
> 
> These are interesting because they're computationally not very
> complicated, but the results are fun and fairly different from
> traditional CS1 projects.
> 
> These basic abilities are available in other languages in
> cross-platform versions, so the basic source code should be
> available.  Squeak (http://www.squeak.org) can do this.  Java can do
> some of this.  CSound can do the sound example cross-platform.
> Tcl/Tk, I believe, can do the transitions programming cross-platform.
> 
> Can anyone tell me if
> (a) these functions are already available, and how I get to them? or
> (b) how to extend DrScheme to allow these facilities?
> 
> Thank you!
>   Mark
> --------------------------
> Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
> Associate Professor - Learning Sciences & Technologies.
> Collaborative Software Lab - http://coweb.cc.gatech.edu/csl/
> (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu
> http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html