Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Own3d Jukebox

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,63074
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> Own3d Jukebox
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Own3d Jukebox - 8/3/2008 10:38:43 PM   
  TomRiddle


Posts: 191
Score: 4
Joined: 2/7/2008
Status: offline
Nice and simple little HTA for playing your mp3 music out of your speakers or out of any other computer's speakers that you own on the network.
Code is reasonably commented and more is displayed about the program when you run it for the first time and when you click the close button.

Correct me if I am wrong but no one else has written a media player before that uses a remote computer's speakers.

Copy and paste the below code into a file with HTA extension. Enjoy





      

Attachment (1)

< Message edited by TomRiddle -- 8/6/2008 10:01:02 PM >
 
 
Revisions: 4 | Post #: 1
 
 RE: Own3d Jukebox - 8/4/2008 12:52:06 AM   
  p0ng

 

Posts: 33
Score: 0
Joined: 6/18/2008
Status: offline
nice work!

(in reply to TomRiddle)
 
 
Post #: 2
 
 RE: Own3d Jukebox - 8/4/2008 5:11:32 PM   
  djredmar


Posts: 61
Score: 0
Joined: 12/11/2006
From: Europe, The Netherlands
Status: offline
Looks nice man!

(in reply to p0ng)
 
 
Post #: 3
 
 RE: Own3d Jukebox - 8/6/2008 12:37:00 AM   
  AMBience

 

Posts: 5
Score: 0
Joined: 7/24/2008
Status: offline
Interesting.

(in reply to djredmar)
 
 
Post #: 4
 
 RE: Own3d Jukebox - 8/6/2008 1:44:50 PM   
  TomRiddle


Posts: 191
Score: 4
Joined: 2/7/2008
Status: offline
Thanks for the interest. I am going to update the original post tonight with some more minor enhancements.

AMBience, I had a look at your original Sine and had a go at using one of those effects in the player but seemed to make it a bit top heavy and the waveform was obviously not responsive to the sound as it is. But anyway that might make another interesting project to do in vbscript.

The only other features I can think that would make this script better are a volume control and maybe a repeat button. I am going to investigate if accessing the volume control via vbscript is feasible.

(in reply to AMBience)
 
 
Post #: 5
 
 RE: Own3d Jukebox - 8/7/2008 2:05:53 AM   
  AMBience

 

Posts: 5
Score: 0
Joined: 7/24/2008
Status: offline
Hi Tom,
Visualizations would indeed be cool, getting it to react to the music however would be impossable...I think! (never say never in VBS, is my motto)

As for your code...Multiple "interesting" really :-)  Very nice interface,  good music taste, but I'm confused about the music player code. I'm guessing that's the only way to play music in pure VBS?  Funny enough I have been experementing a lot with sound and music in HTAs recently.  I've found that including a ClassID instead of the usual embedded sound in a HTA exposes some very nice commands to the DOM.

Drop this into your HTML part of the HTA...

<OBJECT ID="MyPlayer" WIDTH="0" HEIGHT="0" CLASSID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"><PARAM NAME="AutoStart" VALUE="false"></OBJECT>


This is Media player 6 (I use this for compatability and low resource use) You can now use these very cool commands......

[Loading]
MyPlayer.Filename = "C:\Music\Reign in blood.mp3" 

[Setup]
MyPlayer.Balance = 0  (-2000=Left 0=Middle 2000=Right)
MyPlayer.Volume = 5000  (-5000=Silence 5000=Full blast)

[Playing]
MyPlayer.Play
MyPlayer.Pause
MyPlayer.Stop
MyPlayer.CurrentPosition = 1.234  (milliseconds)

[FX]
MyPlayer.Rate = 1.5   (0.001= Very slow, 1=Normal,  1.999=Very fast)

This last one changes the actual pitch of the music, so it's only good for sound FX (or a piano program :-) ) It took me ages to find out the boundries, even w3schools are very vague about them. You can also test all the above values, but you need to do it inside a fast loop (SetInterval 1) for any position type code, Like:-

Sub PlayLoop()
If MyPlayer.CurrentPosition => 3.123 then MyPlayer.CurrentPosition = 2.000
End Sub

This will loop the song at that place forever....
Have fun!

(in reply to TomRiddle)
 
 
Post #: 6
 
 RE: Own3d Jukebox - 8/7/2008 11:31:26 AM   
  TomRiddle


Posts: 191
Score: 4
Joined: 2/7/2008
Status: offline
Thanks, I will check out your code AMBience, if I can get all those extra controls working might be worth my while redesigning the interface, maybe copy something like a winamp player layout.
It looks like the only other technique for volume control is sendkeys on sndvol32.exe but that's for the master volume so it might still be useful if clunky.

Rock On

(in reply to AMBience)
 
 
Post #: 7
 
 RE: Own3d Jukebox - 8/12/2008 1:38:51 AM   
  p0ng

 

Posts: 33
Score: 0
Joined: 6/18/2008
Status: offline
quote:

ORIGINAL: TomRiddle

Thanks, I will check out your code AMBience, if I can get all those extra controls working might be worth my while redesigning the interface, maybe copy something like a winamp player layout.
It looks like the only other technique for volume control is sendkeys on sndvol32.exe but that's for the master volume so it might still be useful if clunky.

Rock On


Post your code if you get it updated.

(in reply to TomRiddle)
 
 
Post #: 8
 
 RE: Own3d Jukebox - 10/5/2008 5:50:09 AM   
  htac

 

Posts: 12
Score: 0
Joined: 10/2/2008
Status: offline
Sounds interesting

(in reply to TomRiddle)
 
 
Post #: 9
 
 RE: Own3d Jukebox - 10/18/2008 1:44:25 AM   
  blksith0


Posts: 38
Score: 0
Joined: 10/17/2008
Status: offline
Cannot find file "C:/windows/rp.vbs" Thats what i get when I try to play the music.

(in reply to htac)
 
 
Post #: 10
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> Own3d Jukebox Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts