Results 1 to 7 of 7

Thread: Music playing software I can control over network?

  1. #1
    Join Date
    Dec 2016
    Posts
    5
    Post Thanks / Like

    Default Music playing software I can control over network?

    Does anyone know of a music player program (mp3) that can respond to commands remotely?

    I've tried Windows Media Player which doesn't let me pause or rewind via OLE (though I can start the song at least)
    I've also tried VLC but haven't been successful.

    I'm trying to find a way to have a program start up and pause until I'm ready to go. This approach would hopefully avoid the seemingly random music program startup times that cause desyncronization from the start.

    Wondering what other people use in my situation.

    Here's my ruby code using windows media player. Here's some documentation:

    require 'win32ole'
    player = WIN32OLE.new('WMPlayer.OCX')
    player.OpenPlayer(song.mp3')
    player.controls.pause # This line doesn't do anything for some reason

  2. #2
    Join Date
    Dec 2014
    Posts
    91
    Post Thanks / Like

    Default Re: Music playing software I can control over network?

    if you have the technical ability to make your own control i would recomend NAudio. i dont do any ruby/web stuff so never looked. but maybe someone already made something you can call using NAudio. check out their site. its open source and very good. you really should have your lights and the audio using the same clock for good synchronization. you will probably get drift doing it how you are doing it

  3. #3
    Join Date
    Dec 2016
    Posts
    5
    Post Thanks / Like

    Default Re: Music playing software I can control over network?

    Thanks, I'll check it out. Also, I intend to run the music program on the same computer so same clock - the network part would just be a loopback connection.
    Last edited by gizmosmith; 10-03-2017 at 03:54 PM.

  4. #4
    Join Date
    Jul 2015
    Posts
    158
    Post Thanks / Like

    Default Re: Music playing software I can control over network?

    Maybe you could describe your overall situation. Reading between the lines I sense you have some standalone boards running your lights which are timed to music but not controlled by a music/lights player like lor, vixen or xlights. And you are trying to manually start them together?

  5. #5
    Join Date
    Oct 2010
    Location
    Great White North
    Posts
    38
    Post Thanks / Like

    Default Re: Music playing software I can control over network?

    Media Player Daemon (MPD) resides on a server and is controlled from any computer that can connect. It runs on all platforms and is hackable if so desired with scripts

  6. #6
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    644
    Post Thanks / Like

    Default Re: Music playing software I can control over network?

    are you using vixen to play your sequence? it already syncs music and sequence.

  7. #7
    Join Date
    Dec 2016
    Posts
    5
    Post Thanks / Like

    Default Re: Music playing software I can control over network?

    After playing around some more last night, I was able to get vlc to work. The relevant lines in Ruby follow:

    require 'vlc-client' # http://www.rubydoc.info/github/mguin.../MediaControls
    vlc = VLC::Client.new('localhost', 9999)
    vlc.connect
    vlc.play('song.mp3')
    vlc.seek(seconds=seek_to_seconds) # for fastforwarding to a specific time so you don't have to hear the whole song each time and go insane
    I had to make sure to start an instance of VLC running as a server on my same computer before running my program:
    "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -I rc --rc-host localhost:9999'
    For those that asked, I'm not running vixen, this is all home-rolled. My setup is to control some Christmas lights with solid-state relays with an arduino controlling the relays. Additionally, some of the lights are pixels and are also controlled via arduinos. All the arduinos are on an RS-485 bus attached to my laptop (38400 baud). The arduinos have algorithms built in and are told when to run each algorithm. For example, one of the arduinos controls pixels on a group of arches. I can tell that arduino to run the "fire" program for x number of 1/20 of a second time slices and then wait for the next command - this allows very high framerates without overwhelming the main communication bus. All the arduinos can take direct commands (turn on this specific pixel to this specific color or turn on this specific relay, etc...)

Bookmarks

Posting Permissions

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