open multiple music files?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • hamlet
    Forum Member
    • Mar 2004
    • 13

    open multiple music files?

    Does anyone have an example of how to make a music player open more than a single tune, i.e. multiple mp3's wav files, etc.? I have went through the help files and can't find the info i'm looking for, then again i'm new to 5.0.
    Last edited by hamlet; 03-09-2004, 04:38 AM.
  • Brett
    Indigo Rose Staff Member
    • Jan 2000
    • 2001

    #2
    Look at the help file for the action Audio.Load. There you will see that the first argument is the channel to load the music into. You can load and play up to 7 audio channels (Professional Edition) at once.

    Comment

    • TJ_Tigger
      Indigo Rose Customer
      • Sep 2002
      • 3159

      #3
      hamlet

      Are you wanting to open and play them at the same time or are you looking to open (i.e., queue) them in an external player like WMP or WinAmp.

      If it is the latter you could also look at using a playlist.

      Tigg
      TJ-Tigger
      "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
      "Draco dormiens nunquam titillandus."
      Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

      Comment

      • hamlet
        Forum Member
        • Mar 2004
        • 13

        #4
        tigger

        I dont want to play the tunes all at once, just want to be able to select multiple songs to play one after another in an audio player i making with ams 5.0. would also like to be able to open playlists as .m3u, .pls.

        Comment

        • TJ_Tigger
          Indigo Rose Customer
          • Sep 2002
          • 3159

          #5
          I would look at the following commands

          Dialog.FileBrowse --this will allow you to select files to play in a player. You might want to allow multiple select.

          Dialog.FolderBrowse along with
          Find.File to load all files from a folder.

          Are you going to store your files in a list box or keep them in a table like they are from the above actions.

          For loading playlists, since most playlists that I have seen are text files you can use the following

          TextFile.ReadtoTable

          The above actions store the found files in tables, I would look at how to enumerate a table

          for index,value in mytable do
          --perform some actions here
          end

          HTH
          Tigg
          TJ-Tigger
          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
          "Draco dormiens nunquam titillandus."
          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

          Comment

          • hamlet
            Forum Member
            • Mar 2004
            • 13

            #6
            don't understand syntax

            the syntax in 5.0 is different than that of 4. I have read about the FileBrowse and FolderBrowse, but it doesn't show the actual string and syntax. Forgive me i'm an amateur trying to learn. What i need is how to make it open multiple files (.mp3, .ogg., .wav) and then play through the playlist one after another (no popping up asking if you wanna hear same song again). Thus far, i have only been able to get it to open a single tune at a time, and then stop after playing that song. I want it to open a folder that user selects, remember last folder, then play song 1, song 2, song 3, etc. through all songs selected.

            Comment

            • TJ_Tigger
              Indigo Rose Customer
              • Sep 2002
              • 3159

              #7
              Here is a file that I have updated for you. I have posted this in the past and hopefully it should answer a lot of questions for you.

              Here is a quick overview of what you will see:
              There is a button (Linkin Park covers) that will load songs in a music directory from the project folder into the list box. The files are loaded from a playlist in the same directory as the .ogg files. This uses the TextFile.ReadtoTable function to load the songs. It would require some additional work to allow your user to select playlists and parse them automatically. But the basic code is there.

              There is a "Load Folder" button that will prompt the user for a directory to load and remember the last folder chosen while the project continues to run. It defaults to the music directory on the first go around (defined in the On Show actions for the page). This button will search for .ogg and .wav files, but uses a table to define the file extension for which you want to search. I did not add .mp3 because I was playing the files with the built-in audio player which does not support .mp3. If you play the files in the media player you can add in the *.mp3 to search for those as well.

              To play a song, double-click on the song to start. When one song finishes, it will go to the next song in the list and start to play, if it is the last song in the list it will go back to the beginning.

              What you see here is very basic code provided for learning purposes. There is a lot that could be added or improved on this code. The ability to select to play in order or a random order, to loop once the end of the songs have been reached, load folders, individual songs, and playlists all from the same button.

              I hope this helps you in what you are trying to do.

              Tigg
              TJ-Tigger
              "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
              "Draco dormiens nunquam titillandus."
              Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

              Comment

              • hamlet
                Forum Member
                • Mar 2004
                • 13

                #8
                nice tigger, but wrong menu

                thanx tigger, nice prog. But what i want is a music player i create to open multiple files. thanx anyway.

                Comment

                • TJ_Tigger
                  Indigo Rose Customer
                  • Sep 2002
                  • 3159

                  #9
                  As I said above
                  What you see here is very basic code provided for learning purposes.
                  The project was provided to help you learn how to work with the code in AMS5 so you can take what you learn and build your music playere the way you want it to be built. The above project will play the songs found in the list box. You need to double-click on the song in the listbox to have it play in the built-in audio player, which to reiterate will not play .mp3s. You can however, play them in the MediaPlayer object, which is a free plugin that can be found on autorun.org.

                  Tigg
                  TJ-Tigger
                  "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                  "Draco dormiens nunquam titillandus."
                  Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                  Comment

                  • Raj Kulshrestha
                    Forum Member
                    • Nov 2005
                    • 25

                    #10
                    Multiple files PLAY

                    Originally posted by TJ_Tigger
                    As I said above


                    The project was provided to help you learn how to work with the code in AMS5 so you can take what you learn and build your music playere the way you want it to be built. The above project will play the songs found in the list box. You need to double-click on the song in the listbox to have it play in the built-in audio player, which to reiterate will not play .mp3s. You can however, play them in the MediaPlayer object, which is a free plugin that can be found on autorun.org.

                    Tigg
                    Hi Tigger,

                    Could you please send me the attachments or coding for opening and playing multiple files. I created an MP3 player and set audio channel to play all channels. I can select multiple files, but the player only plays one song.

                    Thanks

                    Raj

                    Comment

                    Working...
                    X