TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Adesu on January 29, 2007, 10:04:40 PM
-
Hi Alls,
I'm not sure to play winamp with autolisp,because my ability not yet enough for it,is it possible to play winamp from autolisp?.
I would imagine if I 'm working cad and sometime bore it,then type "play" at command prompt,my Favourites song heard in my earphone.
-
If keith can do it (http://www.theswamp.org/index.php?topic=1177.msg160676#msg160676) in vba, I'm sure you can create it in lisp.
-
Use Mplayer(or Mark might be able to point out Mpg321), it would be easier.
-
Hi daron,
it's nice and good code,thanks for your share.
If keith can do it (http://www.theswamp.org/index.php?topic=1177.msg160676#msg160676) in vba, I'm sure you can create it in lisp.
-
Don't thank me. Keith coded it. It's all him.
-
Oops,sorry ,thanks for your code Keith.
-
hmmm .. I thought Mike Malone wrote CADAmp .... oh, well, old memories may not be precise.
-
hmmm .. I thought Mike Malone wrote CADAmp .... oh, well, old memories may not be precise.
I wrote the entire code from scratch. If you do a search around the swamp you will see that I also did an example of how you can utilize sounds in your lisp programs. The main problem with playing music with lisp is that while the lisp is active, the drawing cannot be worked on. In VBA you can subclass and execute the commands needed while you are working on the drawing.
-
Good point. Adesu, I'd stick with what Keith has written and if possible improve upon it. That is the idea of having the source, isn't it?
-
Hi Keith™ ,
It's good info,many thanks for your sharing.
-
Hi Keith™ ,
Aha....I got with lisp,here that code
; pwva is stand for Play Winamp Via Autolisp
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 07 February 2007
; Program no.: 0527/02/2007
; Edit by :
(defun c:pwva (/ file path fn winamp)
(setq file "D:/YBI/General/Music/Dangdut")
(if
(setq path (getfiled "Select a Song File Name " file "mp3" 0))
(progn
(setq fn (vl-string-translate "\\" "/" path))
(setq winamp "C:/Program Files/Winamp/winamp.exe")
(startapp winamp fn)
) ; progn
(alert "\nInvalid,there is not selected file")
) ; if
(princ)
)
The main problem with playing music with lisp is that while the lisp is active, the drawing cannot be worked on.
-
Hi Alls,
Sorry last time only contained one file,here more file
; pwva is stand for Play Winamp Via Autolisp
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 07 February 2007
; Program no.: 0527/02/2007
; Edit by :
(defun c:pwva (/ file all_file_name file_name fn winamp)
(setq file "D:/YBI/General/Music/Dangdut/")
(if
(setq all_file_name (cddr (vl-directory-files file)))
(progn
(foreach x all_file_name
(setq file_name (strcat file x))
(setq fn (append fn (list file_name)))
)
(setq fn (vl-string-trim "()" (vl-princ-to-string fn)))
(setq winamp "C:/Program Files/Winamp/winamp.exe")
(startapp winamp fn)
) ; progn
(alert "\nInvalid,there is not selected file")
) ; if
(princ)
)
-
I see .. basically you wanted to start an application, namely WinAmp, with lisp ... if I had understood that, I would have been able to provide it for you ... but I am glad you got it working
-
If the MP3 extension points to winamp, you can use the routine I posted here (http://www.theswamp.org/index.php?topic=14920.msg180567#msg180567) to. (change PDF to MP3 ;) )
-
Hi Keith™,
Thanks for your support.
I see .. basically you wanted to start an application, namely WinAmp, with lisp ... if I had understood that, I would have been able to provide it for you ... but I am glad you got it working
-
Hi Crank,
Your code is great,I like that,many thanks for your share.
; by Crank
(defun WinAmp (filename / shell bestand)
(vl-load-com)
(setq file "D:/YBI/General/Music/Dangdut/")
(setq bestand (findfile (strcat file filename)))
(if
bestand
(progn
(setq shell (vla-getinterfaceobject (vlax-get-acad-object) "Shell.Application"))
(vlax-invoke-method shell 'Open bestand)
(vlax-release-object shell)
)
(alert "MP3-file not found !")
)
(princ)
)
(WinAmp "Sesungguhnya.mp3")
If the MP3 extension points to winamp, you can use the routine I posted here (http://www.theswamp.org/index.php?topic=14920.msg180567#msg180567) to. (change PDF to MP3 ;) )
-
Winamp whoops the Llamas butt, but like i stated before, if you use the command line version of Mplayer (http://www.mplayerhq.hu/design7/info.html) you can do tons more. Like for instance, build a play list from a dir of files (movies, mp3, etc.) and play them all in one shot! (the GUI version only sends commands to the command line version based on your input.)
Another thing is that Mplayer uses config files that are just plain text so you could append or alter those config files per your needs. ...You can also stream internet radio from Mplayer. ...You could theoretically, build your very own AutoLisp GUI version of a movie, music player. Now that would be cool!
-
Winamp whoops the Llamas butt,
Lots of things do .. but CadAMP whoops Mplayer and WinAMP ... no stinking GUI at all ... just pure raw code acessing windows APIs to play all kinds of audio files ... and it uses less than 1/10th of the resources of either of the other programs.