1. Post #1
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,054 Posts
    [h2]SEMV : The Sexually Exhilarating Music Visualizer[/h2]

    [release]
    Written in C++ and using SFML with libsndfile and DecMPA, I have for you ief015's Sexually Exhilarating Music Visualizer because I can't really think of another name.


    > Fireworks shoot and burst with the song
    > Colours change with the intensity
    > Waveforms with a ball to display progress through the song
    > Particle fountains
    > The orange orb dances to the beat and the blue orb expands with the bass
    > Play whole folders
    > Create your own visualizations with Lua scripting!


    Example song packaged by UNICQRN http://soundcloud.com/unicqrn

    Supported audio formats are:
    MP3, WAV, OGG (seems to have issues decoding, can make cracking noises. This isn't me, it's libsndfile), FLAC, RAW, AIFF, SND, SGI, AIFC, Sun, DEC, AU, PAF, IFF, SVX, SF, VOC, W64, MAT4, MAT5, PVF, XI, HTK, CAF, SD2
    [/release]

    [release]No, this will most likely not run very well on granny's computer. You will need a half-decent machine. If not, you may need to change some settings in the configuration file. Or, you may download a premade settings.cfg file that you find suitable at the end of this post.
    It will not run on integrated graphics with default settings due to an SFML issue. You may download one of the premade settings.cfg files at the end of this post.

    If you are missing OpenAL32.dll, install the OpenAL runtime for Windows:
    http://connect.creativelabs.com/open...ds/oalinst.zip
    [/release]

    Get your screenies here:







    Latest version:
    Download this shit right here for Windows: SEMV 1.4
    You should also download the SEMV 1.4.1 Patch to fix a common "3-song crash" bug with SEMV 1.4. Just swap the EXE files.

    Older versions (I don't know why you would ever need them but here they are):
    semv 1.0 semv 1.1 semv 1.2 semv 1.3 semv 1.3.1


    Lua Scripts (Place in the "lua" folder to install. If you made a script and want it posted here, send me a PM):
    Only download scripts from developers you trust! I am not responsible for any damage or harm these scripts cause! I will review the scripts before I post them here.

    Included Example script - by ief015
    Waveform Explosion - by ief015

    Get the included SEMV Lua Documentation here


    Premade settings.cfg Files (If you are having issues with default settings, or need another copy of the original settings file, download and replace the settings file with one of these):
    Default High-Quality Settings
    Low-Quality Settings (Recommended for Integrated Graphics - Disables motion blur, lowers glowing effect quality, and disables AA)
    Very Low-Quality Settings (Recommended for older machines - Disables Glowing effects and disables AA)


       Intentionally not used to help erectile disfunctions. You're welcome, if it does.   
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Programming King x 107Artistic x 10Dumb x 3Optimistic x 2Informative x 2Winner x 2Funny x 2Friendly x 1Zing x 1 (list)

  2. Post #2
    Desolategrunt's Avatar
    June 2011
    610 Posts
    that looks sweet, i'll try it
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Programming King Programming King x 1Agree Agree x 1Friendly Friendly x 1 (list)

  3. Post #3
    Mr Nagasaki's Avatar
    November 2007
    217 Posts
    I know you worked hard on it! It's great <3
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Friendly x 13Dumb x 8Programming King x 1Zing x 1Optimistic x 1 (list)

  4. Post #4
    KillerTaco's Avatar
    November 2010
    83 Posts
    I love you now.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree x 3Friendly x 2Programming King x 1Disagree x 1Optimistic x 1 (list)

  5. Post #5
    Gold Member
    Metroid48's Avatar
    February 2007
    1,020 Posts
    This is acting a bit weird for me. Resolution changes don't affect the window size but cause glow artifacts and framerate issues. The audio also crackles, while it's fine in my regular player.

    Though it is a really kickass-looking visualizer, looks like a lot of work too. Nice job!
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Agree Agree x 5Programming King Programming King x 1 (list)

  6. Post #6
    Gold Member
    Xeon06's Avatar
    September 2005
    1,222 Posts
    README BITCH posted:
    Supported sound files are: ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64
    Hmm... there seems to be a fairly popular sound type missing from that list... But no problem at all; media.io to the rescue!
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Programming King Programming King x 3 (list)

  7. Post #7
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,054 Posts
    The audio also crackles, while it's fine in my regular player.
    I know, something's up with that and I'm not sure what it is... I've been trying to figure it out for quite some time why it crackles sometimes.

    This is acting a bit weird for me. Resolution changes don't affect the window size but cause glow artifacts and framerate issues.
    Really? I'll have to do a quick fix for that then.

    Edited:

    This is acting a bit weird for me. Resolution changes don't affect the window size but cause glow artifacts and framerate issues. The audio also crackles, while it's fine in my regular player.

    Though it is a really kickass-looking visualizer, looks like a lot of work too. Nice job!
    Alright, I fixed the window size/artifact issue for now (it was a stupidly simple mistake, too :doh: ). Try redownloading using the same link.
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Programming King Programming King x 1Dumb Dumb x 1Friendly Friendly x 1 (list)

  8. Post #8

    June 2011
    81 Posts
    Hmm... there seems to be a fairly popular sound type missing from that list... But no problem at all; media.io to the rescue!
    SFML can't use MP3 because it's a commercial format.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Informative Informative x 5Agree Agree x 1Programming King Programming King x 1 (list)

  9. Post #9
    raubana's Avatar
    April 2009
    655 Posts


    (User was banned for this post ("Image macro" - Overv))
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 78Programming King Programming King x 1 (list)

  10. Post #10
    Gold Member
    Metroid48's Avatar
    February 2007
    1,020 Posts
    Alright, I fixed the window size/artifact issue for now (it was a stupidly simple mistake, too :doh: ). Try redownloading using the same link.
    Yup, works! I have to turn the glow down for higher resolutions though - it's pretty intensive! Straight from 100 to 17 fps at 1024x768 by toggling it.
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Programming King Programming King x 1 (list)

  11. Post #11
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,054 Posts
    Yup, works! I have to turn the glow down for higher resolutions though - it's pretty intensive! Straight from 100 to 17 fps at 1024x768 by toggling it.
    It was a lot better than it used to be... :eng99:
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Programming King Programming King x 1Dumb Dumb x 1Friendly Friendly x 1 (list)

  12. Post #12
    Gold Member
    Larikang's Avatar
    November 2005
    2,563 Posts
    SFML can't use MP3 because it's a commercial format.
    It is legal for free and open source software to include MP3 decoders. Only commercial products need to have a license.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 6Informative Informative x 3Programming King Programming King x 1 (list)

  13. Post #13
    voodooattack's Avatar
    October 2009
    1,939 Posts
    It crashes when you #comment the first line..
    Reply With Quote Edit / Delete Reply Windows 7 Egypt Show Events Programming King Programming King x 3 (list)

  14. Post #14

    June 2011
    81 Posts
    It was a lot better than it used to be... :eng99:
    Hey, would you mind accepting my request on Steam? I'm the one with the flash avatar.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Programming King Programming King x 1Informative Informative x 1Friendly Friendly x 1Dumb Dumb x 1 (list)

  15. Post #15
    sim642's Avatar
    July 2010
    1,039 Posts
    Awesome! It needs more different effects though, because it soon gets pretty boring with those few effect repeating all over again.
    Reply With Quote Edit / Delete Reply Windows Vista Estonia Show Events Programming King Programming King x 2Friendly Friendly x 1Agree Agree x 1 (list)

  16. Post #16
    Gold Member
    Naelstrom's Avatar
    June 2010
    2,688 Posts
    This is wonderful, i love how everything has a glow to it.
    Reply With Quote Edit / Delete Reply Linux United States Show Events Programming King Programming King x 1Friendly Friendly x 1 (list)

  17. Post #17

    April 2008
    245 Posts
    Where could I get the song used in the video? I love it, also nice work.
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Programming King Programming King x 1Friendly Friendly x 1 (list)

  18. Post #18
    Dr. Punchgroin's Avatar
    November 2009
    1,224 Posts
    The only complaint I have is the interface, otherwise this kicks ass. Amon Tobin (the guy who did Chaos Theory Soundtrack) is especially sexy.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Programming King Programming King x 1 (list)

  19. Post #19
    Mr Nagasaki's Avatar
    November 2007
    217 Posts
    Where could I get the song used in the video? I love it, also nice work.
    I made the song for the video and for the example in the visualizer, they are both not finished yet actually (WIP's), ief put my soundcloud in the OP if you are interested.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Artistic Artistic x 6Programming King Programming King x 1Winner Winner x 1 (list)

  20. Post #20

    April 2008
    245 Posts
    I made the song for the video and for the example in the visualizer, they are both not finished yet actually (WIP's) but here is my soundcloud if you're interested. http://soundcloud.com/unicqrn
    Ah well thanks, you're music is fantastic I must say.
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Programming King Programming King x 1Friendly Friendly x 1 (list)

  21. Post #21
    Mr Nagasaki's Avatar
    November 2007
    217 Posts
    Ah well thanks, you're music is fantastic I must say.
    Thanks! it means a lot, though I haven't finished a song in a while, just keep starting new ones :c
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Programming King Programming King x 1 (list)

  22. Post #22
    Gold Member
    Karmah's Avatar
    December 2007
    4,844 Posts
    Is there a way to build it into windows media player?
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Agree Agree x 4Programming King Programming King x 1Useful Useful x 1 (list)

  23. Post #23
    Gold Member
    Larikang's Avatar
    November 2005
    2,563 Posts
    It would be more useful if there was an option for it to use your sound card's output as its input. Then it would work with every media player out there. That's how Sound Spectrum's G-Force visualizer works and it is very convenient.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 5Optimistic Optimistic x 1Informative Informative x 1 (list)

  24. Post #24
    Citrusfruit's Avatar
    June 2011
    94 Posts
    i came at around 0:17
    Reply With Quote Edit / Delete Reply Windows 7 Hong Kong Show Events Late Late x 1Optimistic Optimistic x 1 (list)

  25. Post #25
    DatZach's Avatar
    May 2011
    139 Posts
    No mod, xm or s3m support?
    I am disappoint, otherwise orgasmic
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Artistic Artistic x 1 (list)

  26. Post #26
    Gold Member
    ZeekyHBomb's Avatar
    June 2006
    3,577 Posts
    No mod, xm or s3m support?
    I am disappoint, otherwise orgasmic
    I've written an implementation for sf::SoundStream and sf::SoundBuffer using libmodplug. I can't find the link to the github-page, but here's the code
    //xmsound.h
    #ifndef SLC_CONTENT_XMSOUND_H
    #define SLC_CONTENT_XMSOUND_H
    
    #include <SFML/Audio/SoundStream.hpp>
    
    #include <libmodplug/modplug.h>
    
    #include "core/filesystem/path.h"
    
    namespace sf{
      class SoundBuffer;
    }
    
    namespace content{
    
      /**
       *  Opens an XM into a sf::SoundBuffer
       *  @param [in] path the path of the XM-file
       *  @param [out] the sf::SoundBuffer to load the XM into
       *  @return true if successful, false otherwise
       */
      extern bool openXMFile(const core::filesystem::path &path, sf::SoundBuffer &buf);
      
      /**
       *  @brief a sf::SoundStream for XM
       *
       *  This class extends sf::SoundStream for XM files.
       */
      class XMStream : public sf::SoundStream
      {
      public:
        XMStream();
        ~XMStream();
        
        //bool Open(const std::string &path);
        bool Open(const core::filesystem::path &path);
        
      private:
        bool OnGetData(Chunk& data);
        
        void OnSeek(float timeOffset){ ModPlug_Seek(mod, timeOffset * 1000);}
        
      private:
        ModPlugFile *mod;
        int singleSampleSize, samplesSize;
        char *samples;
      };
    
    }
    
    #endif
    
    //xmsound.cpp
    #include <fstream>
    #include <string>
    
    #include <SFML/Audio/SoundBuffer.hpp>
    
    #include <libmodplug/modplug.h>
    
    #include "content/xmsound.h"
    #include "core/staticconstructor.h"
    #include "core/filesystem/path.h"
    
    namespace content{
      
      STATIC_INIT()
      {
        ModPlug_Settings modSettings;
        ModPlug_GetSettings(&modSettings);
        modSettings.mBits = 16;
        ModPlug_SetSettings(&modSettings);
      }
      
      static bool parseXMFile(const core::filesystem::path &path, ModPlugFile *&mod)
      {
        // first we read the whole file (modFile) into a buffer (fileData)
        std::ifstream modFile(path.string().c_str(), std::ifstream::in | std::ifstream::binary);
        
        if(!modFile.is_open())
          return false;
    
        modFile.seekg(0, std::ifstream::end);
        const std::streampos fileSize = modFile.tellg();
        modFile.seekg(0, std::ifstream::beg);
    
        char *fileData = new char[fileSize];
        modFile.readsome(fileData, fileSize);
        
        if(!modFile)
        {
          delete[] fileData;
          return false;
        }
    
        modFile.close();
    
        // now we let modplug handle this data
        mod = ModPlug_Load(fileData, fileSize);
        delete[] fileData;
        
        if(!mod)
          return false;
        
        return true;
      }
    
      bool openXMFile(const core::filesystem::path &path, sf::SoundBuffer &buf)
      {
        ModPlugFile *mod;
        if(!parseXMFile(path, mod))
          return false;
          
        ModPlug_Settings modSettings;
        ModPlug_GetSettings(&modSettings);
    
        // one sample (a single sound so to say) is made up out of the bits per individual sound * number of channels (mono, stereo, ..)
        const int sampleSize = modSettings.mChannels * (modSettings.mBits / 8);
        const int guessedSize = modSettings.mFrequency * sampleSize * (ModPlug_GetLength(mod) * 0.001f);
        std::vector<char> samples;
        samples.reserve(guessedSize);
    
        char *sample = new char[sampleSize];
      
        // ModPlug_GetLength deems itself unreliable; it is not said how. It will lead to appended silence if guessed length > actual length
        // we read only sample by sample, to be safe. Non-streamed content loading should not be done in a performance-critical area anyways.
    #if 0
        ModPlug_Read(mod, sample, guessedSize);
        samples.insert(samples.end(), sample, sample + guessedSize);
    #endif
        
        // OBSOLETE | we already allocated memory, why reallocate to something smaller?
    #if 0
        delete[] sample;
        sample = new char[sampleSize];
    #endif
        
        // while something was read, store it in vector
        while(ModPlug_Read(mod, sample, sampleSize))
          samples.insert(samples.end(), sample, sample + sampleSize);
        
        ModPlug_Unload(mod);
        delete[] sample;
    
        //  [url]http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69[/url]
    #if 0
        char* sampleArray = new char[samples.size()];
        std::copy(samples.begin(), samples.end(), sampleArray);
    #endif
        // we just convert to sf::Int16* (16-bit samples); as sizeof(sf::Int16) > sizeof(char) we also need take care of the new size
        return buf.LoadFromSamples(reinterpret_cast<const sf::Int16*>(&samples.front()), samples.size() / sizeof(sf::Int16), modSettings.mChannels, modSettings.mFrequency);
      }
      
      XMStream::XMStream()
        :samples(NULL){}
    
      XMStream::~XMStream()
      {
        delete[] samples;
        
        // GetSampleRate is an indicator if a sound was present
        // TODO: couldn't we use samples as an indicator?
        if(GetSampleRate() != 0)
          ModPlug_Unload(mod);
      }
      
      bool XMStream::Open(const core::filesystem::path &path)
      {
        // TODO: what if XMStream already open?
        if(!parseXMFile(path, mod))
          return false;
        
        ModPlug_Settings modSettings;
        ModPlug_GetSettings(&modSettings);
        
        singleSampleSize = modSettings.mChannels * (modSettings.mBits / 8);
        samplesSize = singleSampleSize * (modSettings.mFrequency / 10); // 1 / 10 second chunk
        // ^- note: this might cause up to 1 / 10  - (1 / (modSettings.mFrequency / 10)) seconds unwanted silence at the end of the song!
        // ^- I think it's worth it instead of reading sample by sample here ;z33ky
        
        
        Initialize(modSettings.mChannels, modSettings.mFrequency);
        
        return true;
      }
      
      bool XMStream::OnGetData(Chunk& data)
      {
        // char *samples = NULL; // member for workaround for delete[] (see below)
        // TODO: delete every fucking time?! ;z33ky
        delete[] samples;
        samples = new char[samplesSize];
        
        // note: in theory, ModPlug_Read should return the number of bytes read, at least it informs us when nothing was read
        data.NbSamples = (ModPlug_Read(mod, samples, samplesSize) / singleSampleSize) * sizeof(sf::Int16);
        data.Samples = reinterpret_cast<sf::Int16*>(samples);
          
        // delete[] samples; // seems to sometimes make problems (only at song start?)?
        //  ^- worked around that ;z33ky
          
        return data.NbSamples != 0;
      }
      
    }

    The implementation for sf::SoundBuffer looks a bit questionable... but it did work.
    STATIC_INIT simply creates a static object and the code seen represents its constructor.
    Also, an version of SFML 2 used creating this.

    Use it however you want, no credits whatsoever required.
    Reply With Quote Edit / Delete Reply Linux Germany Show Events Programming King Programming King x 8Disagree Disagree x 1Friendly Friendly x 1Useful Useful x 1 (list)

  27. Post #27
    yumi_cheese's Avatar
    February 2011
    166 Posts
    For me the yellow/orange pulsator at the bottom left makes my eyes scream for mercy.
    Reply With Quote Edit / Delete Reply Windows 7 Australia Show Events Winner Winner x 1Agree Agree x 1 (list)

  28. Post #28
    AntonioR's Avatar
    April 2011
    1,039 Posts
    I watched Krizik "singing" Fountain in Prag and this is way better. Great work.
    Reply With Quote Edit / Delete Reply Windows Vista Croatia Show Events Funny Funny x 1 (list)

  29. Post #29
    Anthophobian's Avatar
    June 2010
    1,926 Posts
    55gb of music and you're actually expecting me to convert a file to wav everytime I want to play something? MP3 compatibility plz.
    Reply With Quote Edit / Delete Reply Windows 7 Netherlands Show Events Agree Agree x 14Funny Funny x 3Disagree Disagree x 1 (list)

  30. Post #30
    BOSSMAN
    leontodd's Avatar
    January 2009
    4,454 Posts
    I love you.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  31. Post #31
    DeadKiller987's Avatar
    September 2010
    1,070 Posts
    The music I listen to doesn't make much effects :(

    Code:
    song_file=07itsonlyrockNRoll.ogg
    song_vol=50 #volume from 0 - 100
    
    scr_width=1270
    scr_height=970
    scr_fullscreen=0 #0 = windowed, 1 = fullscreen
    scr_antialias=16
    
    glow_size=16 #size of the glow effect, may cause visualizer to become unstable if too high
    glow_colmul=4.5 #multiply the colours!
    
    max_particles=8192 #the max amount of particles allowed
    Say, I have a pretty good rig, what are the biggest values for some of these settings? (antialias max_particles stuff like that)

    Edit: Oh great Snippingtool snipped part of its dialog and a tool tip...

    (User was banned for this post ("Warez" - Big Dumb American))
    Reply With Quote Edit / Delete Reply Windows 7 Lithuania Show Events Funny Funny x 85Winner Winner x 2Programming King Programming King x 1Friendly Friendly x 1 (list)

  32. Post #32
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,054 Posts
    I am adding mp3 support tonight after work. Also, the settings are able to go as high as you wish, just be nice to them. (AA I believe goes up to either 8 or 16.

    And huzzah! My second highlighted thread :D
    Reply With Quote Edit / Delete Reply Germany Show Events Winner Winner x 1 (list)

  33. Post #33
    Gold Member
    MangoJuice's Avatar
    February 2010
    4,810 Posts
    I can't read the readme file, it's just a .file.

    Edited:

    Fixed it.

  34. Post #34
    Gold Member
    Karmah's Avatar
    December 2007
    4,844 Posts
    It would be much better if you could easily listen to your music, like drag it onto the window.
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Agree Agree x 7 (list)

  35. Post #35
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,054 Posts
    I know, i hate the way you have to keep typing in music filenames. Once i get .mp3 working i may just make it so you select a directory and scroll through songs.
    Reply With Quote Edit / Delete Reply Germany Show Events Agree Agree x 1 (list)

  36. Post #36
    Skeleton Porn-Star
    Devil Traitor's Avatar
    August 2009
    7,376 Posts
    Can we also have sex with the music too?
    Reply With Quote Edit / Delete Reply Windows Vista Canada Show Events Agree Agree x 6 (list)

  37. Post #37
    PacManPrince's Avatar
    April 2011
    10 Posts
    This is really amazing, but you should add some integration with other programs like WinAmp and Windows Media player as a plugin.

  38. Post #38
    Gold Member
    smurfy's Avatar
    October 2007
    21,628 Posts

    I like how it matches the part where the song kicks off
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Artistic Artistic x 4Funny Funny x 2Agree Agree x 1Winner Winner x 1 (list)

  39. Post #39
    DeadKiller987's Avatar
    September 2010
    1,070 Posts
    I am adding mp3 support tonight after work. Also, the settings are able to go as high as you wish, just be nice to them. (AA I believe goes up to either 8 or 16.

    And huzzah! My second highlighted thread :D

    D:
    Reply With Quote Edit / Delete Reply Windows 7 Lithuania Show Events Funny Funny x 22Agree Agree x 3Late Late x 1 (list)

  40. Post #40
    Gold Member
    JustExtreme's Avatar
    April 2007
    7,104 Posts
    Very nice, would be really cool if you could somehow integrate it with a media player using a plugin :P
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Late Late x 1 (list)