I looked in the documentation and didn't see anything related to playing sounds, either resources or external files. Is there a way to do this?
thanks,
Geoff
Depends on what you understand for sound?
And what platform?
When you search on http://mini.net/tcl/ for 'sound' there are various option based on TCL/TK.
Other solution maybe possible on your target platform using DLL's via import.
Hi gcanyon,
I created a demo with libMikMod. Please look here:
http://www.turtle.dds.nl/newlisp/
If you are running windows, you need the mikmod DLL as well (hosted at same site).
There is also a demo with SDL from camperman:
http://www.alh.net/newlisp/phpbb/viewtopic.php?t=1135
Regards
Peter
And on MacOS, it's a frequently asked question, since even AppleScript doesn't have a play sound command any more, I think.
But an easy solution is to install //http://rainbowflight.googlepages.com/#qtplay, a free 64K binary that plays sound files. Then you can call it from newLISP depending on how you want to run it.
Use (exec ... ) to wait until sound finishes before continuing, or (fork (exec ... )) to start the sound without interrupting program flow.
For simultaneous play of more than one sound, use fork and exec more than once:
(fork (exec "/Users/.../bin/qtplay '/Users/.../Library/Sounds/MystMenuClose.aiff'"))
(fork (exec "/Users/.../bin/qtplay '/Users/.../Library/Sounds/MystSliderTrackPress.aiff'"))
(fork (exec "/Users/.../bin/qtplay '/Users/.../Library/Sounds/MystWindowOpen.aiff'"))
instead of (fork (exec "...")) have you tried (process "...") ? It also does not block, but returns immediately using less resources.
Lutz
Yes, that makes sense!
I suppose I got the mistaken impression that 'process' was for interacting with processes and that 'exec' was for running single commands. If 'process' just runs a command without blocking and then exits it's certainly easier to type and remember than (fork (exec ...)). And if it's more economical with resources as well - even Greenpeace would approve...!