Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Advanced control of audio zones without display.

  1. #1
    Join Date
    Apr 2007
    Posts
    18

    Default Advanced control of audio zones without display.

    I would like to be able to take control of my mp3 library using only a russound keypad. From all of the support on this site, I've been able to control multiple winamp zones independently, but using the "next" command through a library of several thousands of songs is getting tiresome. I have a vision of menu structure using voice feedback, but I have no idea of how best to implement. I've been posting on the winamp forums, but I think my posts are too noob to merit a response. Any advice would be appreciated.

    Example:
    Zone 1 - Winamp instance opened with all songs in playlist. There are also 5 smart views available and 10 playlists available.

    Actions:
    Press "Mode" on the Russound keypad.
    - Girder responds by announcing "Search for playlist"
    Press "Mode" again
    - Girder responds by announcing "Search for smart list"
    Press "Mode" again
    - Girder responds by announcing "Search for artist"
    Press "select" and Girder begins naming all available artists alphabetically
    - "Abc"
    - "Amy Winehouse"
    - "Coldplay"
    - (pressing the right or left arrows rapidly moves forward or back in the list)
    - "Counting Crows"
    Press "Select" and all of the artists songs begin playing.

    New scenario:
    Press "Mode" on the Russound keypad.
    - Girder responds by announcing "Search for playlist"
    Press "Select" and Girder begins announcing playlists
    - "Baily's playlist"
    - "Party playlsit"
    - "Rock playlist"
    Press "Select" and all of the playlist begins playing.


    I know that such a menu structure would require a special winamp plugin to handle the populating the lists and maybe even the sequencing through the list while passing the announcement text back to Girder... From my research on winamp, JRMC, SageTV, CQC, etc, I'm not aware of any player or home automation product with a setup to allow blind control of a database. I think that such a control system would be very popular as I'm sure that there are many people who would appreciate a control system that doesn't require touchscreens.

    Any advice would be appreciated.

    Thanks!

  2. #2
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    woa, that will require a lot of lua coding

    I would suggest doing all the playlist handeling in Girder, it's fully capable of searching for audio and playlist files or searching within a library, no Winamp plugin is needed for that.

    What's your level of experience with lua or any type of programming?

  3. #3
    Join Date
    Apr 2007
    Posts
    18

    Default

    Thanks for the reply.

    My lua programming experience is very limited although it's not from lack of desire. I've done some extensive programming using msexcel vba, and have a couple of semesters of c (pre visual studio) under my belt, but I've not been able to get over the hump and start productively working with lua. Maybe this will get me going though :-).

    I wasn't aware that Girder was capable of working at that level with playlists and libraries. When you say libraries, does that mean a generic type of library or does it mean a winamp, jrmc, or mpc library? So if I could extract all audio files of a certain artist, I could push the list or table of files to a player such as winamp?

  4. #4
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    Quote Originally Posted by jryan15 View Post
    Thanks for the reply.

    My lua programming experience is very limited although it's not from lack of desire. I've done some extensive programming using msexcel vba, and have a couple of semesters of c (pre visual studio) under my belt, but I've not been able to get over the hump and start productively working with lua. Maybe this will get me going though .
    That should be enough to get started

    Quote Originally Posted by jryan15 View Post
    I wasn't aware that Girder was capable of working at that level with playlists and libraries. When you say libraries, does that mean a generic type of library or does it mean a winamp, jrmc, or mpc library? So if I could extract all audio files of a certain artist, I could push the list or table of files to a player such as winamp?
    playlist:
    The most common playlist files are plain text (.pls, .m3u) and can be read and written using Lua, just like a .txt file.

    libraries:
    Some applications use a database format in one of the many variations on SQL. If those work with either LuaSql or Odbc then you can connect to them via Lua. Other applications may provide export capabilities to an Xml file for example, which can be read just like a .txt file.
    It's also possible to create a table of the files within a directory, to create your own library.

    Winamp control:
    You can use command line parameters to start each instance of Winamp with it's own settings and playlists.

    also have a look here: http://www.promixis.com/forums/showthread.php?t=20631 for a multi-zone control example using Winamp and MPC-HC.
    Last edited by blubberhoofd; July 12th, 2010 at 12:53 PM.

  5. #5
    Join Date
    Apr 2007
    Posts
    18

    Default

    Thanks for the explanations, and I like the idea of handling everything in Girder. I have some minor sql experience, so I'll start doing some reading. It would be great to stumble across some lua code that is already pushing custom libraries or tables or songs to winamp though :wink:.

    With regard to control of multiple winamp instances, I've had great success. I've been able to control several zones independently. I used the kx driver package to split one soundcard into several zoned outputs. I even use the Girder voice feature to annouce the song titles (in conjunction with the very cool DVDspy dll for winamp)!

  6. #6
    Join Date
    Apr 2007
    Posts
    18

    Default

    Ok. Spent a few hours going through the Girder manual, but I still don't know where to start with creating a table of audio files. May someone can give me a hand with lua coding to complete an objective. Any help would be great!

    Objective: Play a specific audio file titled "xyz" from a folder full of audio files arranged in subfolders.

    Questions:
    1. What kind of code would be used to create a table of all audio files in a directory?
    2. After a table is formed, and the resultant song titled "xyz" is located in the table, is there a way for me to push the secondary table out to a media player?

  7. #7
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    Quote Originally Posted by jryan15 View Post
    Thanks for the explanations, and I like the idea of handling everything in Girder. I have some minor sql experience, so I'll start doing some reading. It would be great to stumble across some lua code that is already pushing custom libraries or tables or songs to winamp though :wink:.
    I have some experience interfacing with a database created by Meedio (Sqlite2) with good results. It does require you to have proper filenaming convention and/or tags, I always use mp3tag (http://www.mp3tag.de/en/) to correct tags and filenames for a batch of files.

    Quote Originally Posted by jryan15 View Post
    With regard to control of multiple winamp instances, I've had great success. I've been able to control several zones independently. I used the kx driver package to split one soundcard into several zoned outputs. I even use the Girder voice feature to annouce the song titles (in conjunction with the very cool DVDspy dll for winamp)!
    nice setup, I had already forgotten the kx driver package, because I didn't have a compatible soundcard at the time

  8. #8
    Join Date
    Apr 2007
    Posts
    18

    Default

    Tags are good, and I agree, mp3tag is a great program!

    Before I move on to the nuts and bolts, I would like to query everyone on how best to proceed. Should I begin working off of winamp's data files and playlist files, or should I attempt to make an independent audio file table? Also do people tend to create playlists using external apps? I've only used winamp and itunes to create playlists.

    With regard to winamp filed:
    I did some digging and found the main database file (main.dat), the playlist files (*.m3u8), as well as the playlist.xml file (links the playlist names to the .m3u8 file)... Is there an ideal command string for converting the main.dat file into a workable table?

  9. #9
    Join Date
    Jul 2005
    Location
    Uithuizen, The Netherlands
    Posts
    575

    Default

    Quote Originally Posted by jryan15 View Post
    Tags are good, and I agree, mp3tag is a great program!

    Before I move on to the nuts and bolts, I would like to query everyone on how best to proceed. Should I begin working off of winamp's data files and playlist files, or should I attempt to make an independent audio file table? Also do people tend to create playlists using external apps? I've only used winamp and itunes to create playlists.

    With regard to winamp filed:
    I did some digging and found the main database file (main.dat), the playlist files (*.m3u8), as well as the playlist.xml file (links the playlist names to the .m3u8 file)... Is there an ideal command string for converting the main.dat file into a workable table?
    Don't know about the Winamp data files, but .pls or .m3u playlist files should be easy to work with. You can either leave playlist files as they are and pass them to Winamp via command line parameters, or read the contents of the playlist file and pass the contents to Winamp, again via command line parameters.

    Another method is to import music files directly into a Lua table
    Code:
    local Path = 'D:\\discman'
    local fs = luacom.CreateObject("Scripting.FileSystemObject")
    music_files_table = {}
    
    local function GetFiles(sPath)
        local dir = fs:GetFolder(sPath)
        local folders = luacom.GetEnumerator(dir.SubFolders)
        local folder = folders:Next()
        while folder do
            GetFiles(sPath..'\\'..folder.Name)
            folder = folders:Next()
        end
        local files = luacom.GetEnumerator(dir.Files)
        local file = files:Next()
        while file do
            if string.find(file.Name, '.mp3') or string.find(file.Name, '.flac') then
                table.insert(music_files_table, sPath..'\\'..file.Name)
                print('added: \"'..sPath..'\\'..file.Name..'\"')
            end
            file = files:Next()
        end
    end
    
    print ('Getting files in '..Path)
    GetFiles(Path)
    print ('List of files complete')
    fs = nil
    collectgarbage()
    This will create a table called 'music_files_table' and fill it with '.mp3' and '.flac' files found in 'D:\\discman' using a recursive function.

    btw: thanks to Harleydude for helping me with this one

    I would recommend using an actual database (like the SQLite2 Meedio option mentioned before) with all it's sort and filter functionality by filename or tags, as it will get you a very flexible and powerfull solution pretty quickly.

  10. #10
    Join Date
    Apr 2007
    Posts
    18

    Default

    Very cool! Thanks!!! I would love to try the database method. I had checked out the Meedio site before and thought that that was a separate home theater software package. I didn't realize that you could use its database independently. I'll start doing some homework on sqlite too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •