SpotiAmp

Spotify is a great service! I have been using it for quite a while, but I felt that something was missing.
Winamp has been my main player for years and I got inspired to make a combination support thing with this application, here is what SpotiAmp is all about.

SpotiAmp v0.95

Features

  • Global keyboard hotkeys to control play, stop, pause, next, previous, volume up/down and mute
  • Mute commercials / ads. It comes with a price, read about below!
  • Simple Webserver support, now Ajax-support
  • Winamp WM_COMMAND / WM_WA_IPC support to let other applications (like girder) control Spotify
  • Version 0.95 fixes bugs regarding the interface and have some new eye candy

Requirements
You must install Microsoft Visual C++ 2010 SP1 Redistributable Package to use SpotiAmp (This also apply to Vista and Windows 7!)

    32-bit version (You need 32-bit, even if you have a 64-bit system. Spotiamp is a 32-bit software)

Download

Download html for webserver
The Ajax HTML shall be unpacked in the same directory as the Spotiamp.exe.
If you put Spotiamp.exe in the same directory as Spotify then the directory structure should look like this:
C:\Program Files\Spotify\Spotify.exe
C:\Program Files\Spotify\Uninstall.exe
C:\Program Files\Spotify\SpotiAmp.exe
C:\Program Files\Spotify\html\ <-- All files from ajaxhtml.zip here Download old versions (v0.9 uses 2010 Redist, older 2008)

You must install Microsoft Visual C++ 2008 SP1 Redistributable Package to use SpotiAmp v0.8 (This also apply to Vista and Windows 7!)
32-bit version

Known limits:
1. It has been tested with Windows XP (SP3) and Windows 7. Vista suck and does not work quite right. Wine is NOT supported!
2. This version is confirmed working with Spotify v0.9.7.17 (Spotify updates itself each time you start it, you should check version, if you have trouble)

Global hotkeys, neat
SpotiAmp hotkeys
You select the hotkey combination you like. Windows-key has also been added (made a new hotkey-ctrl for that silly button).
Should be pretty straight forward to configure, you’ll get an error if a combination already exists.

Mute commercials, wtf?
SpotiAmp commercial muting
I know, but after hours of programming I got really, really, reeeeally tired of the commercials.
Audio commercials should be banned in my eyes, especially when Spotify actively pauses when you want to mute. This is your counter-measure, but remember it could easily be “fixed” by Spotify-crew if they want.
In the other end Spotify needs to live and royalties has to be paid. Just to nag you and not letting you forget that you don’t use premium a nag-screen has been implemented.
It looks like this:
SpotiAmp nagscreen
(Note: If Spotify actively contacts me regarding this function, I will permanently remove the feature.)

Webserver support
Download the really simple html-page and extract it in the same where you have SpotiAmp.exe (desktop is not a good place for it, if you want to use webserver).

A really simple interface has been added, by requesting control.htm?[command] on the port the server is opened to a command is executed.
Here are the [command] alternatives: PREV, PLAY, NEXT, VOLUP, VOLDOWN and MUTE.

If the SpotiAmp works in Wine a simple wget should be able to execute commands on your Spotify 🙂 Perfect for HTPC computers who want to control Spotify a little.

The html look like shit and if you bother check out degeros version. Neat solution to grab the screen!

Winamp WM_COMMAND support
Many people have Girder or something similar together with a remote (or simular).
By adding a simple WM_COMMAND Winamp-style based IPC you’ll manage Spotify the same way as Winamp.
It fakes the Winamp v1.x window and you can use the PostCommand(::FindWindow(NULL, L”Winamp v1.x”), WM_COMMAND, NULL, WINAMP_BUTTON2) or simular.

Please check out Winamp developer site and download the SDK extract the WINAMPCMD.H and wa_ipc.h. Most functions are not supported, but you can control the basics.

Comments
If you have any comments regarding the release, please add it below.

0 Replies to “SpotiAmp”

  1. This doesn’t work under Wine (Ubuntu 8.10). Error log:

    >wine spotiamp.exe
    W: client-conf.c: Failed to open configuration file ‘/etc/pulse/client.conf’: No such file or directory
    ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused

    W: client-conf.c: Failed to open configuration file ‘/etc/pulse/client.conf’: No such file or directory
    ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused

    fixme:shdocvw:PersistStreamInit_InitNew (0x158e70)
    fixme:shdocvw:navigate_url Unsupported args (Flags 0x32f138:3; TargetFrameName 0x32f148:8)
    fixme:urlmon:URLMoniker_BindToObject use running object table
    fixme:system:SetProcessDPIAware stub!
    fixme:dwmapi:DwmIsCompositionEnabled 0x32ded0
    fixme:iphlpapi:NotifyAddrChange (Handle 0x212e918, overlapped 0x212e920): stub
    fixme:iphlpapi:GetAdaptersAddresses no support for IPv6 addresses
    0[1620e8]: IMM32: InitKeyboardLayout, aKeyboardLayout=04140414, sCodePage=1252, sIMEProperty=00090000
    fixme:shdocvw:ClOleCommandTarget_QueryStatus (0x158f10)->((null) 1 0x32e468 (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 25 2 0x32e47c (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 26 2 0x32e47c (nil))
    fixme:shdocvw:ClientSite_GetContainer (0x158f10)->(0x32e4b8)
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->({000214d1-0000-0000-c000-000000000046} 37 0 0x32e58c (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->({000214d1-0000-0000-c000-000000000046} 84 0 (nil) 0x32e61c)
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 29 2 0x32e804 (nil))
    fixme:shdocvw:DocHostUIHandler_GetDropTarget (0x158f10)
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->({000214d1-0000-0000-c000-000000000046} 84 0 (nil) 0x32e714)
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:mshtml:nsChannel_GetSecurityInfo default action not implemented
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->({000214d0-0000-0000-c000-000000000046} 69 0 (nil) 0x32e71c)
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->({000214d0-0000-0000-c000-000000000046} 69 0 (nil) 0x32e71c)
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 26 2 0x32e7e4 (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 29 2 0x32e7f4 (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->({000214d1-0000-0000-c000-000000000046} 103 0 (nil) (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->({de4ba900-59ca-11cf-9592-444553540000} 2315 0 (nil) (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 35 0 (nil) (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 28 2 0x32e71c (nil))
    fixme:shdocvw:ClientSite_GetContainer (0x158f10)->(0x32eb78)
    fixme:shdocvw:InPlaceFrame_SetStatusText (0x158f10)->(0xf7ec7815)
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 25 2 0x32eaac (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 26 2 0x32eaac (nil))
    fixme:shdocvw:ClOleCommandTarget_Exec (0x158f10)->((null) 21 2 (nil) (nil))

    1. Works with winetricks so I could get Visual C++ 2008 SP1 Redistributable. Running SpotiAmp on Ubuntu 10.10 and have encountered no bugs so far (in fact, it works better than in XP).

  2. Hva med at du bytter navn pÃ¥ din app? det er allerede en “app” som heter SpotAmp… Ã¥ legge til en i holder ikke..

    Edit: [removed shitty link]

    Stealing names isnt a good way to get a new thing out 😉

    Comment from Author:
    Could not care less, this ain’t a shitty mIRC plugin…

  3. SpotAmp is for showing people what you’re playing over mirc or something, so not very useful. Besides, it’s declared dead:-) If this guy coud just make a linux version that worked, it would really make my day!

  4. Kurt:
    I’m sorry to say that Wine support will not work because of the “FindWindow” API in Wine. (Maybe they update it later on?)
    In windows a FindWindow call can find other windows running in the same “userspace”, but since Wine creates a own userspace for each app, it will fail.

    Wine does show the Window, but the GUI will not work. SpotiAmp uses IE DHTML-class, so the buttons will not trigger. SpotiAmp needs the FindWindow call to work 100%, so I wouldn’t spend any time messing around with it.

  5. Hmmm.. that’s a bummer:-( So there’s no way to run any commands to get the the userspace id or something and pass it as a paramter to SpotiAmp?

    I guess the only way would be to run VMWare with windows then, but that’s kind of overkill..

  6. Well I dunno any commands atm that fixes the problem. It has been reported to Wine-crew earlier, but they didn’t care much. Vmware with windows is your only way ATM I’m afraid.

  7. Future improvements

    Can you add this new feature, when users flag a commercial this updates a central database of known ads, then all users syncronise with this database of known ads on a regular basis, to prevent idiots from flagging legitemate songs to ad database you can make a rule so that an ad has to me flagged by x number of users before being added to database (blacklist)

    Thx

  8. Coolio:
    There will not be such a feature, since there are so few commercials atm.
    A simple sharemethod between friends would be the “Commercials.ini” file, simple as that.

  9. Err.. I’ll have to revise my previous statement. It does indeed work on Windows 7 with Spotify 0.3.19, but it does not silence the commercials. I now start to think that I’m missing something… anyone care to share some light?

  10. In Windows Vista neither the Mute buttom nor the automatic mute commercial works. However, it works by using the mute hotkey shortcut. All other buttons and hotkeys work fine. Any clue why is this happening?

  11. First of all, thanks for your application. I thinks it’s great!

    But I’m having problems with it. I think it’s a memory leak. I’m using it at work where I leave the computer on during all the week. In the first minutes it occupies a merely 6MB but a the end of the week it has sky rocketed to more than 200MB (now, with a few hours, it occupies more than 10MB).

    I have get this values from the free Microsoft Process Explorer tool (the Private Bytes column).

    PD: I haven’t found any place to put bug reports…

  12. I’d bet all my money that you have a version of this software without the nagscreen that you use yourself.
    Why are you forceing us to suffer from your moral issues. Let each and everyone decide for them selves. This software could be perfect if it were not for the nagscreen. I guess your intension was to solve a problem. Guess what? you only moved it to another location!

  13. If you don’t like the nagscreen then listen to the commercials. The nagscreen cannot be disable by option nor I have my own version of it. Spotify deserve premium-customers and this app gives you a little taste (with an after-taste) on how it is on-the-other-side.

    A simple hex-editor could fix your problem though. I don’t have any control over people “cracking” my software.

  14. “15
    chete:
    September 21st, 2009 at 21:01:42

    Using regular expression for mute commercials would be very useful. (Or mute commercials just by Artist Name)

    +1

  15. Man… People are pretty ungrateful. Have seen a lot of unnecessary complaints both on this site and in the other places (forums) you’ve posted this. It’s not like anyone have paid you to do this.

    Lars: This was a perfect app! Completely flawless! Noticed some minor things, but nothing to mention. It solves its purpose.

    Congrats, and thanks for sharing it with the masses of ungrateful SOBs that we apparently are. 🙂

    Kind regards from Oslo

  16. Thnx! I made it for myself and really don’t care about others in the loop. I don’t use it anymore since Spotify + mobilephone = Ultimate combination. Spotify gets gladly 99 NOK from me pr month.

  17. Thanks man for an awesome app! I’ve always get angry because of the ungrateful bastards that complains about something someone made on their spare time without any requests on money. The same thing when it comes to subtitlers. cheers from SkÃ¥ne m8!

  18. Thank you a lot !

    it work really well ! I would love to have it onto my osx also of course 😉 but it’ll probably never happen of course 😉

    thank you !

  19. It didn’t work in Windows 7 Professional 64bits. The error is:
    “No se pudo iniciar la aplicación; la configuración en paralelo no es correcta”.
    In English this means something like “Couldn’t start app; paralel config not correct”.

  20. It’s working on Spotify v.0.3.22, under Win 7 (32-bit), no compatibility required for it to run, its all working smoothly.

  21. Hey great idea about blocking the adds and stuff, nice!

    Just one problem though… I can’t get it working, when I click on the .exe file
    it tells me that the programs configuration is wrong and that I should try to re-install
    it, any idea about what to do?

  22. Malin:
    Make sure that you have the Visual Studio runtimes installed (see above).
    If the problem still exists, delete the *.ini files where you have placed Spotiamp.exe (the config might have gone corrupt)

  23. Heisann, fantastisk program, tusen takk!
    Men det er et par småting som ikke stemmer helt.
    Først: Mute-knappen virker ikke i selve programmet. På webserveren funker den som den skal.
    SÃ¥: Artist og title-feltet henger ett spor etter. SÃ¥ hvis jeg spiller sang B, viser den sang A, spiller jeg sang C, viser den sang B. Dette gjelder bÃ¥de nÃ¥r jeg trykker pÃ¥ “next” og “previous”. Men hvis jeg trykker pÃ¥ play/pause eller mute, sÃ¥ blir den “synkronisert”, men trykker jeg pÃ¥ “next” eller “previous” igjen, sÃ¥ stÃ¥r det bare det samme helt til jeg trykker en gang til, og da henger den etter.
    Er dårlig til å forklare, så hvis du ikke skjønner hva jeg mener, så er det bare å sende meg en mail, så skal jeg prøve å forklare bedre..

    Og sist: En liten ønskefunksjon hvis det er mulig.. Ã? velge spilleliste i programmet / pÃ¥ webserveren hadde vært kjekt. Men for all del, klager ikke 😉

    Ha en god kveld!

  24. This is a fantastic product!
    I hope you don’t mind me making a suggestion? It would be great if it supported wildcards, possibly using the asterisk symbol, so that all all titles by a specific artist can be muted.
    Other than this, it’s perfect! 🙂

  25. Update: seems to work on WinXP but fails on Win7 x64 for some reason. Themida in Spottify makes it a pain to debug your app to find the source of the bug…

  26. listener: Sure does work with 0.3.22, but I’m guessing you are using Vista/Windows 7 that have a different soundcard handling. So what you are really saying is that the mute-commercials doesn’t work for you…

  27. Hi!
    Great working program.
    But it would be even greater if the “Comersials database” could be copied and merged between computers. I have one computer at home and one at work and i would like to use and enlarge the databeáse on both at the same time. If possible it would even be useful to share database over the internet.

    Regards
    Tomas

  28. Hi!
    Mute function doesn’t work here nor “manually” or auto, XP SP3 with Spotify 0.3.22 .
    It adds to the counter in settings.ini but doesn’t actually mute.
    All other functions work.
    Any suggestions appreciated.

  29. Hi,
    Great tool, been using it for while now!
    There seems to be a problem with the french commercial “People for Cinema” that won’t mute. Other new ads are perfectly muted, but that one seems to resist and needs to be added to the commercial list every time it appears.
    I think you use an other version than the french one and the problem may not occur on other languages’ versions, but anyway, you know, just reporting some bugs.

  30. Awesome app! Just what I wanted, however I agree with anon’s comment — memory leak problems — I’ve seen 700mb ++ and wondered why my compiler was taking so long :). However this is with an uptime measured in weeks on my main machine…

    You have the source code for me to look at anywhere?

    Annonymouse

  31. This is a cool tool. Would you consider releasing the source code to allow people to make their own improvements?
    Thanks,
    Chris

  32. Chris:
    No I didn’t consider it… Since people can very easy controll Spotify with know methods. As I answered another person earlier:

    Download the Toastiy sourcecode: http://toastify.codeplex.com/SourceControl/list/changesets

    Check out spotify.cs file:
    public enum SpotifyAction : long
    {
    None = 0,
    ShowToast = 1,
    ShowSpotify = 2,
    CopyTrackInfo = 3,
    PlayPause = 917504,
    Mute = 524288,
    VolumeDown = 589824,
    VolumeUp = 655360,
    Stop = 851968,
    PreviousTrack = 786432,
    NextTrack = 720896
    }

    These commands emulate keyboard presses on multimediakeyboards with this function: Win32.SendMessage(GetSpotify(), Win32.Constants.WM_APPCOMMAND, IntPtr.Zero, new IntPtr((long)a));

    Where GetSpotify return a HWND of the spotify window and the a-variable is one of the SpotifyAction messages.

    That is it 🙂

    This should be easy to convert for people to C++ like I did…

  33. ano:
    Sjekk om du har portforwardet riktig, hvis du vil ha eksterne brukere inn på den (anbefales ikke). Sjekk også lokal brannmur på f.eks Vista & W7 som skiller mellom offentlig og privat nett.

  34. Koskila:
    I’m not even on crappy Facebook.

    Can you explain more? Does it direct download from me or something like that after a crappy survey?

    Any rapport functions?

  35. Sorry, I’m not very keen on writing long texts, so here are a few screenshots instead. Hope you get something out of them! 🙂

    http://tiedostot.koskila.net/for_lars/

    If it shows no files in the folder, just hit f5 a couple of times – that should do the trick. It’s a crappy server after all…

    Oh, I already reported their facebook page abusive, but as far as I know, they never do anything about that kind of pages.

  36. Koskila:
    That really sux… I’m gonna fix a “iframe-fix” for the site and block that damn idiot that owns the freeipadapple.info domain, Jamal Hussein. Damn swedish idiot…

  37. large:
    I’m not entirely sure how that iframe-redirect-thingie works, but you could also block all the visitors who have freeipadapple-domain or it’s ip-address as “referring site”. Although, that might be a bit harsh..

    But yeah, profiting from someone other’s work doesn’t seem entirely right thing to do. I commented on their fb-page too, but my comment wasn’t posted.

    You could also ask the guy to share his profits with you 😉
    Okay, that probably wouldn’t work.

  38. I would like to be able to turn the volume down on ads but not mute them. Would it be possible to add that feature? Because when I listen to classical music the ads are much louder than the music. I could mute them, but if everyone did that Spotify would get no ad income and the service would finish, so I’d rather just make them a sensible volume.

  39. Large: Have you considered setting spotify volume to 1 instead of muting system volume? That would be much better than muting everything.

    Either that, or just skip to the next song 1 second before each song ends. Most songs end in a few seconds of silence anyways…

  40. Sure -V-, I’ll add it to the list for later use. Skipping songs right before end cannot be accomplished, the Spotify-client doesn’t give feedback on time in the header.

  41. Hello! Would it be possible for you to add an option to the next version so that turning volume up or down would change the volume level in Spotify’s own volume slider instead of Windows’ own volume slider?

    Apart from that Spotiamp is an excellent software, thanks for it!

  42. I still hear the commercial on my right speaker when I’m using Spotiamp v0.8. I’m using Spotify version 0.4.3.426.

  43. Sked:
    What OS are you using, 32/64-bit?

    Make sure to not run Spotiamp in xp-comp-mode if you’re running W7. Some people have notified my that the problem went away after upgrading Realtek-drivers (if you have that soundcard).

  44. I’m still hearing certain commercials even though I have 100% muted them and they are listed in the blocked commercials list. Most of these commercials are Spotify’s “default” commercials so that the artist is titles as ‘Spotify’. And idea what’s causing this?

  45. Har Spotify 0.4.3.426, WinXP, og SpotiAmp 0.8. Dell laptop med “IDT High Definition Audio Codec” og “SRS Premium Sound”.

  46. Thank you for this wonderful tool.
    It works great on my desktop, but on my netbook I get the error message “Could not find Visual C++ 2008 SP1 runtime files. …” when I try to run.
    I’ve installed and reinstalled the Visual C++ 2008 SP1 Redistributable Package several times but no luck. Seems like SpotiAmp is looking for the runtime files at the wrong location.
    Any idea how to fix this?
    Running Windows 7 Home Premium 64-bit.

    1. I guess my check routines for the x64 wasn’t good enough (didn’t have a x64 to test it on myselv).

      Please run it in XP-mode and see if the problem goes away.

      1. I’m running 64 bit on my desktop aswell (sorry for not mentioning it). The only difference is that this is Ultimate edition.

        Tried it in both XP and Vista mode, but no luck.

          1. Yes thats the one I installed.
            Could’t install the x86 (tried running that in xp mode aswell). Got message that it couldn’t install on my machine type.

            So I guess it’s byebye VC++ redist-checker 😛

  47. Any fixes for the muting of only the left speakers? If I click the mute button four times it mutes both sides, but it does not do it automatically.

      1. Thank you siggvara, that did the trick!

        No more “When did I add THAT song to my playlist” looking around, feeling embarresed “Oh, it’s just Justin Bieber commercial – phew” 😀

        Thank you Lars Werner!

    1. I haven’t been able to reproduce the issue.

      My suggestion is to update the sound drivers + SRS software since Spotiamp mutes the “master” channel. When master is muted no sound should be heard from any software.

    1. Sorry no… I’m currently paying for Spotify and don’t use the commercial-part of the app anymore.
      I guess adding Spotify* in both artist/song will mute a lot of crap 😉

    1. What do you want Girder todo with Spotiamp, send hotkeys?
      Create a new command: Under “Keyboard” put in whatever hotkey combo SpotiAmp/Spotify uses.

  48. I like SpotiAmp and use it all the time, but lately the commercials are using just an artist name with no title at all, and looks like SpotiAmp cannot deal with this.
    Also – I’m using the french version of Spotify and SpotiAmp cannot deal with special letters (e.g letters with accents).

    Is this possible to publish the source code? or even just restructure the software such that the whole regular expression match will be in its own DLL and publish this code?
    Thanks in advance

    1. Thank you for the feedback Shay.
      Could you please send/paste me the commercials.ini file when it failes?

      Also examples on the “special” characters, I think I might have forgotten some Unicode for handling the text?

  49. Pingback: Listas spotify
  50. Hi again

    I don’t use spotify that much lately,but when I do and I try using spotiamp I came across some annoying behaviour that keeps me from using spotiamp. Whenever an ad is playing, spotiamp is trying to mute it and now it is stuck in some endless loop, the name of the song is alternating with “paused”, spotify is paused and there’s no way out of it other than closing spotiamp and manually unmuting.

    Thanks

    Shay

    1. Hi Shay,

      It might be changes in the Spotify client, I dunno since I pay for premium.
      Without running Spotiamp, try this while a commercial is running:
      1. Press mute On in Windows
      2. Notice that Spotify client automatically pauses the commercial.
      3. Press play, without unmuting.

      Here you can have 2 scenarios:
      1. If the commercial still continues, the commercials.ini file is probably wrong.
      Try to rename it to something else, and start collecting commercials again.
      2. If it pauses again, the Spotify client have changed behaviour.
      Please let me know what is the smallest volume it continues to play on…

      -Lars

    1. Hi, it is not heavily updated, but it works as expected.
      It does not change the playlists by command, but if there has been introduced keyboard shortcuts or simular it can be integrated.

      Cheers, Lars

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.