Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 6 123 ... LastLast
Results 1 to 10 of 56
  1. #1
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,069

    Announce: Musly DSTM Mixer (mix by similarity)

    This is a DSTM mixer that uses Musly to obtain 'similar' tracks to 5 seed tracks. I started this plugin as MusicIP takes a long time to analyse files (and is closed source), whereas Musly is much faster (and open source) - ~20k tracks took about 50 minutes to analyse on a 5 year old i7 laptop with an SSD (as opposed to around 70hrs for MusicIP). However, in my opinion, the mixes are nowhere near as good – and a lot of tracks need to be filtered out due to genre, matching artist from seed tracks, etc. Still, I’ve made this release in case others are interested. The Musly analyser uses some code taken from Roland0’s LMS-Musly plugin.

    There are 2 parts to this plugin:
    1. The DSTM plugin, which is a standard LMS Plugin - https://github.com/CDrummond/lms-muslymixer
    2. A python script (musly-server) used to analyse music tracks, create a 'similarity' database, and provide access to query track similarity via a simple HTTP API - https://github.com/CDrummond/musly-server

    To run the 'musly-server' script you will need to build the musly library itself - my github repo has precompiled libraries for Fedora32 and Raspbian. You might also be able to use one of the binaries from Roland0’s LMS-Musly plugin

    Files are analysed by calling:
    Code:
    musyl-server.py --analyse <path to music>
    Once music has been analysed, the API server can then be started:
    Code:
    musyl-server.py
    Please refer to https://github.com/CDrummond/musly-server for more details. This server needs to be running before the DSTM mixer can create a mix. A systemd service is provided.

    The DSTM plugin can be installed by using a release ZIP file from github, or by adding my repo file to LMS.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    7,817
    Quote Originally Posted by cpd73 View Post
    This is a DSTM mixer that uses Musly to obtain 'similar' tracks to 5 seed tracks. I started this plugin as MusicIP takes a long time to analyse files (and is closed source), whereas Musly is much faster (and open source) - ~20k tracks took about 50 minutes to analyse on a 5 year old i7 laptop with an SSD (as opposed to around 70hrs for MusicIP). However, in my opinion, the mixes are nowhere near as good – and a lot of tracks need to be filtered out due to genre, matching artist from seed tracks, etc. Still, I’ve made this release in case others are interested. The Musly analyser uses some code taken from Roland0’s LMS-Musly plugin.

    There are 2 parts to this plugin:
    1. The DSTM plugin, which is a standard LMS Plugin - https://github.com/CDrummond/lms-muslymixer
    2. A python script (musly-server) used to analyse music tracks, create a 'similarity' database, and provide access to query track similarity via a simple HTTP API - https://github.com/CDrummond/musly-server

    To run the 'musly-server' script you will need to build the musly library itself - my github repo has precompiled libraries for Fedora32 and Raspbian. You might also be able to use one of the binaries from Roland0’s LMS-Musly plugin

    Files are analysed by calling:
    Code:
    musyl-server.py --analyse
    Once music has been analysed, the API server can then be started:
    Code:
    musyl-server.py
    Please refer to https://github.com/CDrummond/musly-server for more details. This server needs to be running before the DSTM mixer can create a mix. A systemd service is provided.

    The DSTM plugin can be installed by using a release ZIP file from github, or by adding my repo file to LMS.
    I was hoping this was going to be your cut down MusicIP plugin for DSTM . Is that close to release?

    Edit. Never mind I spoke too soon

    Sent from my Pixel 3a using Tapatalk
    Last edited by slartibartfast; 2020-08-05 at 23:48.

  3. #3
    Senior Member bakker_be's Avatar
    Join Date
    May 2009
    Location
    Kwaadmechelen, Belgium
    Posts
    945
    Will test this one as well
    Main System: Touch; Marantz SR-5004 + TMA Premium 905 + TMA Premium 901 + Teufel Ultima 20 Mk 2 + BK Monolith+ FF + Lenovo T460 + Kodi + Pioneer PDP-LX5090H
    Workshop: iPad 32GB Wifi + Squeezepad (local playback activated)
    Wherever needed: Acer Iconia Tab A700 + Squeezeplayer
    Kitchen: iPhone 5s + iPeng (local playback activated) + NAD 312 + Teufel Ultima 20 Mk 2
    Headphone (cozy corner): Lenovo T550 + Squeezelite-X + Cyrus Soundkey + Topping A30 + Focal Elear
    Car: TBC ...

  4. #4
    Senior Member bakker_be's Avatar
    Join Date
    May 2009
    Location
    Kwaadmechelen, Belgium
    Posts
    945
    Hmmm, running into a bit of bother with the musly server ...
    Code:
    bart@ubuntu_t540:~/musly-server$ ./musly-server.py -l DEBUG --analyse /mnt/music
    Traceback (most recent call last):
      File "./musly-server.py", line 13, in <module>
        from lib import app, config, metadata_db, musly, analysis
    ImportError: cannot import name 'app'
    You'll see analysis has been moved to the end of the import line. I did that to see if it was that file specifically or the import in itself. OS is Ubuntu 18.04 LTS Server.
    Main System: Touch; Marantz SR-5004 + TMA Premium 905 + TMA Premium 901 + Teufel Ultima 20 Mk 2 + BK Monolith+ FF + Lenovo T460 + Kodi + Pioneer PDP-LX5090H
    Workshop: iPad 32GB Wifi + Squeezepad (local playback activated)
    Wherever needed: Acer Iconia Tab A700 + Squeezeplayer
    Kitchen: iPhone 5s + iPeng (local playback activated) + NAD 312 + Teufel Ultima 20 Mk 2
    Headphone (cozy corner): Lenovo T550 + Squeezelite-X + Cyrus Soundkey + Topping A30 + Focal Elear
    Car: TBC ...

  5. #5
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,069
    Quote Originally Posted by bakker_be View Post
    Hmmm, running into a bit of bother with the musly server ...
    Code:
    bart@ubuntu_t540:~/musly-server$ ./musly-server.py -l DEBUG --analyse /mnt/music
    Traceback (most recent call last):
      File "./musly-server.py", line 13, in <module>
        from lib import app, config, metadata_db, musly, analysis
    ImportError: cannot import name 'app'
    You'll see analysis has been moved to the end of the import line. I did that to see if it was that file specifically or the import in itself. OS is Ubuntu 18.04 LTS Server.
    Odd. I don't use Ubuntu, but Fedora32 (I used Ubuntu for years, but switched due to 'snap' apps). Which version of python3? Fedora32 has 3.8.5, and Raspbian (which also works for me) has 3.7.3

    Does "python3 ./musly-server.py -l DEBUG --analyse /mnt/music/" Work???
    Last edited by cpd73; 2020-08-14 at 04:13.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  6. #6
    Senior Member bakker_be's Avatar
    Join Date
    May 2009
    Location
    Kwaadmechelen, Belgium
    Posts
    945
    Quote Originally Posted by cpd73 View Post
    Odd. I don't use Ubuntu, but Fedora32 (I used Ubuntu for years, but switched due to 'snap' apps). Which version of python3? Fedora32 has 3.8.5, and Raspbian (which also works for me) has 3.7.3

    Does "python3 ./musly-server.py -l DEBUG --analyse /mnt/music/" Work???
    This is what apt-get tells me when i want to install python3:
    Code:
    bart@ubuntu_t540:~/musly-server$ sudo apt-get install python3
    [sudo] password for bart:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    python3 is already the newest version (3.6.7-1~18.04).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    python3 ./musly-server.py -l DEBUG --analyse /mnt/music gives the same error, I'll look into getting a >3.7 python release ...

    EDIT: I'm now on 3.8.5, thanks to a PPA, it's not present in the default repositories, and I still have the same error ...
    Last edited by bakker_be; 2020-08-14 at 10:21.
    Main System: Touch; Marantz SR-5004 + TMA Premium 905 + TMA Premium 901 + Teufel Ultima 20 Mk 2 + BK Monolith+ FF + Lenovo T460 + Kodi + Pioneer PDP-LX5090H
    Workshop: iPad 32GB Wifi + Squeezepad (local playback activated)
    Wherever needed: Acer Iconia Tab A700 + Squeezeplayer
    Kitchen: iPhone 5s + iPeng (local playback activated) + NAD 312 + Teufel Ultima 20 Mk 2
    Headphone (cozy corner): Lenovo T550 + Squeezelite-X + Cyrus Soundkey + Topping A30 + Focal Elear
    Car: TBC ...

  7. #7
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,069
    Quote Originally Posted by bakker_be View Post
    EDIT: I'm now on 3.8.5, thanks to a PPA, it's not present in the default repositories, and I still have the same error ...
    Hmm, OK I'll see what I can do - but I'm not really a python coder.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  8. #8
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,069
    Quote Originally Posted by bakker_be View Post
    Hmmm, running into a bit of bother with the musly server ...
    Code:
    bart@ubuntu_t540:~/musly-server$ ./musly-server.py -l DEBUG --analyse /mnt/music
    Traceback (most recent call last):
      File "./musly-server.py", line 13, in <module>
        from lib import app, config, metadata_db, musly, analysis
    ImportError: cannot import name 'app'
    You'll see analysis has been moved to the end of the import line. I did that to see if it was that file specifically or the import in itself. OS is Ubuntu 18.04 LTS Server.
    How about if you change the start of 'musly-server.py' to be:

    Code:
    import sys
    import os
    sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib'))
    
    import argparse
    import logging
    from lib import analysis, app, config, metadata_db, musly
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  9. #9
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,069
    Quote Originally Posted by bakker_be View Post
    Hmmm, running into a bit of bother with the musly server ...
    Code:
    bart@ubuntu_t540:~/musly-server$ ./musly-server.py -l DEBUG --analyse /mnt/music
    Traceback (most recent call last):
      File "./musly-server.py", line 13, in <module>
        from lib import app, config, metadata_db, musly, analysis
    ImportError: cannot import name 'app'
    You'll see analysis has been moved to the end of the import line. I did that to see if it was that file specifically or the import in itself. OS is Ubuntu 18.04 LTS Server.
    Ah, is it just 'app' that has the error? If so what if you rename app.py to (e.g.) muslyapp.py and use "from lib import muslyapp, config, metadata_db, musly, analysis" ???
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  10. #10
    Senior Member bakker_be's Avatar
    Join Date
    May 2009
    Location
    Kwaadmechelen, Belgium
    Posts
    945
    Quote Originally Posted by cpd73 View Post
    Ah, is it just 'app' that has the error? If so what if you rename app.py to (e.g.) muslyapp.py and use "from lib import muslyapp, config, metadata_db, musly, analysis" ???
    It's not only app. Initially analysis was first in the line of imports (you had it alphabetically, structured thinking, I like that), so to verify if it was something with analysis I moved it to the end of the line. This shifted focus to app, as it is now first in line, so I'm guessing it's something with the import ...
    I'll try your modification suggestion from this and the previous post later today when I'm in front of a PC with easy access to the LMS machine where all this resides.

    EDIT: I first modified the code as you suggested. This resolve the issue. I've then changed the names of the files (and modified the musly-server.py accordingly of course), still no luck
    Last edited by bakker_be; 2020-08-15 at 04:11.
    Main System: Touch; Marantz SR-5004 + TMA Premium 905 + TMA Premium 901 + Teufel Ultima 20 Mk 2 + BK Monolith+ FF + Lenovo T460 + Kodi + Pioneer PDP-LX5090H
    Workshop: iPad 32GB Wifi + Squeezepad (local playback activated)
    Wherever needed: Acer Iconia Tab A700 + Squeezeplayer
    Kitchen: iPhone 5s + iPeng (local playback activated) + NAD 312 + Teufel Ultima 20 Mk 2
    Headphone (cozy corner): Lenovo T550 + Squeezelite-X + Cyrus Soundkey + Topping A30 + Focal Elear
    Car: TBC ...

Posting Permissions

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