Author Topic: Play winamp with Autolisp  (Read 6141 times)

0 Members and 1 Guest are viewing this topic.

Adesu

  • Guest
Play winamp with Autolisp
« 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.

daron

  • Guest
Re: Play winamp with Autolisp
« Reply #1 on: January 29, 2007, 10:17:26 PM »
If keith can do it in vba, I'm sure you can create it in lisp.

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: Play winamp with Autolisp
« Reply #2 on: January 29, 2007, 10:32:16 PM »
Use Mplayer(or Mark might be able to point out Mpg321), it would be easier.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Adesu

  • Guest
Re: Play winamp with Autolisp
« Reply #3 on: January 29, 2007, 11:03:38 PM »
Hi daron,
it's nice and good code,thanks for your share.

If keith can do it in vba, I'm sure you can create it in lisp.

daron

  • Guest
Re: Play winamp with Autolisp
« Reply #4 on: January 29, 2007, 11:31:19 PM »
Don't thank me. Keith coded it. It's all him.

Adesu

  • Guest
Re: Play winamp with Autolisp
« Reply #5 on: January 30, 2007, 12:25:30 AM »
Oops,sorry ,thanks for your code Keith.


Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Play winamp with Autolisp
« Reply #6 on: January 30, 2007, 01:46:36 AM »
hmmm .. I thought Mike Malone wrote CADAmp .... oh, well, old memories may not be precise.

« Last Edit: January 30, 2007, 01:50:24 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Play winamp with Autolisp
« Reply #7 on: January 30, 2007, 08:36:40 AM »
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.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

daron

  • Guest
Re: Play winamp with Autolisp
« Reply #8 on: January 30, 2007, 09:35:05 AM »
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?

Adesu

  • Guest
Re: Play winamp with Autolisp
« Reply #9 on: January 30, 2007, 06:44:25 PM »
Hi Keith™ ,
It's good info,many thanks for your sharing.

Adesu

  • Guest
Re: Play winamp with Autolisp
« Reply #10 on: February 07, 2007, 03:20:18 AM »
Hi Keith™ ,
Aha....I got with lisp,here that code
Code: [Select]
; 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)
  )  

Quote
The main problem with playing music with lisp is that while the lisp is active, the drawing cannot be worked on.

Adesu

  • Guest
Re: Play winamp with Autolisp
« Reply #11 on: February 07, 2007, 04:23:49 AM »
Hi Alls,
Sorry last time only contained one file,here more file
Code: [Select]
; 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)
  )
« Last Edit: February 07, 2007, 07:04:04 PM by Adesu »

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Play winamp with Autolisp
« Reply #12 on: February 07, 2007, 08:18:53 AM »
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
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Crank

  • Water Moccasin
  • Posts: 1503
Re: Play winamp with Autolisp
« Reply #13 on: February 07, 2007, 02:19:00 PM »
If the MP3 extension points to winamp, you can use the routine I posted here to. (change PDF to MP3 ;) )
Vault Professional 2023     +     AEC Collection

Adesu

  • Guest
Re: Play winamp with Autolisp
« Reply #14 on: February 07, 2007, 07:06:23 PM »
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