Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: =?ISO-2022-JP?B?GyRCTS06ZElZTTobKEI=?= <arisaka_110430 <at> icloud.com>
Subject: about Sound package
Newsgroups: gmane.comp.mathematics.maxima.general
Date: Wednesday 19th March 2014 11:34:23 UTC (over 3 years ago)
Hello,

I found a Sound package made by Mario recently.
<https://www.ma.utexas.edu/pipermail/maxima/2012/028375.html>
It is useful for me. Thanks a lot.

By the way, I had some minor troubles using the sound package.
So, I fixed them as follows.

1. $sound_sample_list function does not work with a Lisp error.
   I fixed it (for SBCL).

2. The option player = "open -a" does not work, 
   because it doesn't accept long directory names with spaces
   or adding command-options.
   I fixed it.
   My solution is that I put a command-path in double-quotes
   and I add $player_options to divide the player-command 
   between a command-path and command-options.

3. $wxplay function is added for wxMaxima. 
   (and always draws the waveform when it is called)


For example:
When I play sounds on Mac OS X, I call the next command using a terminal.
('QuickTime Player.app' is a music & movie player built in Mac OS X.)

open -a '/Applications/QuickTime Player.app' ~/maxout.wav

So, I set the following options and play sounds with wxMaxima.

load("~/sound.lisp")$

set_sound_defaults(
   player         = "open",
   player_options = "-a '/Applications/QuickTime Player.app'",
   draw_wave_options = [dimensions = [800,200]] )$

wxplay(
   file_name = "sound-out",
   envelope = adsr(0.01, 0.1, 0.8, 0.4),
   attenuation_coef = [1,1/2,1/3],
   note(440,1000,0.5,0,0.6,1.2)) $

Another player options like following is allowed:

   player = "/usr/bin/open"
   player = "~/maxima/A Maxima Sound package/playsound"


My environment:
	Mac OS X 10.6.8
	wxMaxima 13.04.0
	Maxima 5.30.0
	SBCL 1.0.55.0

The difference from the original sound.lisp is attached to this mail.
I hope you will enjoy playing Maxima with Mario's sound package.

Thanks.

Tomio


P.S.
I made the difference from an original sound.lisp as follows.

$ diff ./sound.lisp ./sound_fixed_by_me.lisp > ./sound.lisp.diff

Then you can make a patched one as follows.

$ patch ./sound.lisp ./sound.lisp.diff
 
CD: 4ms