Announcement

Collapse
No announcement yet.

mp3's and play lists

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    mp3's and play lists

    Hi - I would like to create a very simple script that runs a pre-made playlist of mp3s. I've messed around with launching winamp and getting it to play a single song, same with the com object, and same with windows media player. All the scripts I've come across seem overly simple (ie playing a single song) or overly complicated (dynamically creating a playlist) I would be happy just playing a directory too, so I hit A6 on my controller and winamp or wmp starts playing everything in my bluegrass directory or on a prebuilt list. Should be simple - maybe it is just me. If anyone can provide some simple advice I would appreciate it. Cheers - Seth

    #2
    The most basic m3u playlist is a text file with the .m3u extension. Each line in the file contains the path to an mp3 file. Start your mp3 player using this file.

    You can build the text file using the Scripting.FileSystemObject if you want to parse a folder and build the file from the folder contents.

    Comment


      #3
      Take a look at this script. You should be able to modify for your needs.

      It just reads a directory of playlists and lets you select which gets played.

      This simple script has raised my WAF by a factor of 5.

      Thanks,

      Scott

      Comment


        #4
        Thanks to both of you for your quick replies. And for your patience. I am pretty new to x10 and scripting. One more follow-up question here...

        I should have included my code last time....pretty basic & you can see I don't know what I am doing. I know how to add a file and play it, but not how to add a playlist (or as Michael said, start winamp with a playlist) In various scripts I've seen clear play list methods, but not add playlist methods. When I try the add file method - no luck.

        Set winamp = CreateObject("WinampCom.Application")
        winamp.AddFile ("C:\Program Files\Winamp\playlist.m3u")
        winamp.Play

        Scott - thanks for the script you posted. I will give it a shot when I get home. WAF is another problem I am encountering :-)

        Comment


          #5
          There are a few scenarios. The simpliest is to start playing a m3u playlist with the default application that is associated with that file type. It is likely it is Winamp if that is your primary audio player.

          You can do this from a script or from an event.

          From the script it should be
          <pre class="ip-ubbcode-code-pre">

          sub main()
          hs.launch "c:\PlaylistFolderPath\myPlaylist.m3u"
          end sub

          </pre>

          From an event it will be the from the Applications Tab of Homeseer where the Application is the same c:\PlaylistFolderPath\myPlaylist.m3u as above


          If you want to explicitly use Winamp then you would launch it with the playlist as a parameter. The script is below. The event is the same approach as above, but with both the executable and parameter lines completed.

          <pre class="ip-ubbcode-code-pre">

          sub main()
          hs.launch "c:\program Files\Winamp\Winamp.exe","c:\PlaylistFolderPath\myPlaylist.m 3u"
          end sub

          </pre>

          You can use the WinampCom object as you have shown to control it after it is loaded. When I load a new playlist I always close winamp and then reopen it with the new playlist rather than clearing the existing playlist and populating a new one with the desired tracks. I have found this to be both easier and more reliable.

          Comment


            #6
            Thanks - just got home and both approaches are working. WAF increasing too

            Thanks again - Seth

            Comment

            Working...
            X