• The Sexually Exhilarating Music Visualizer
    204 replies, posted
  • [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 [B]Sexually Exhilarating Music Visualizer[/B] 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 [URL]http://soundcloud.com/unicqrn[/URL] Supported audio formats are: [quote]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[/quote] [/release] [release][B]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.[/B] 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: [URL]http://connect.creativelabs.com/openal/Downloads/oalinst.zip[/URL] [/release] Get your screenies here: [quote] [IMG]http://img861.imageshack.us/img861/2461/58984718.png[/IMG] [IMG]http://img88.imageshack.us/img88/6549/24697515.png[/IMG] [IMG]http://img818.imageshack.us/img818/6306/34981209.png[/IMG] [/quote] [video=youtube;FfM-vPbD6n0]http://www.youtube.com/watch?v=FfM-vPbD6n0[/video] [video=youtube;muEXgutiRdE]http://www.youtube.com/watch?v=muEXgutiRdE[/video] [highlight][B]Latest version:[/B][/highlight] [B]Download this shit right here for Windows: [URL="http://www.mediafire.com/download.php?c90sfn2tuebz616"]SEMV 1.4[/URL][/B] You should also download the [URL="http://www.mediafire.com/download.php?71n81jq1i8316qt"]SEMV 1.4.1 Patch[/URL] to fix a common "3-song crash" bug with SEMV 1.4. Just swap the EXE files. [B]Older versions [/B](I don't know why you would ever need them but here they are): [URL="http://www.iefhost.com/dl/semv/semv.rar"]semv 1.0[/URL] [URL="http://www.iefhost.com/dl/semv/semv1.1.rar"]semv 1.1[/URL] [URL="http://www.iefhost.com/dl/semv/semv1.2.rar"]semv 1.2[/URL] [URL="http://www.iefhost.com/dl/semv/semv1.3.rar"]semv 1.3[/URL] [URL="http://www.mediafire.com/?bwxayib65sof5hv"]semv 1.3.1[/URL] [B]Lua Scripts[/B] (Place in the "lua" folder to install. If you made a script and want it posted here, send me a PM): [U]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. [/U] [URL="http://www.mediafire.com/?rda19sbdbrc1kz8"]Included Example script[/URL] - by ief015 [URL="http://www.mediafire.com/?nb3scdw9gy74bat"]Waveform Explosion[/URL] - by ief015 Get the included SEMV Lua Documentation [URL="http://www.mediafire.com/?em8ez3u96v4o04l"]here[/URL] [B]Premade settings.cfg Files[/B] (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): [URL="http://www.mediafire.com/?m98op1bzab1hp7y"]Default High-Quality Settings[/URL] [URL="http://www.mediafire.com/?ok255gm3v51z6go"]Low-Quality Settings[/URL] (Recommended for Integrated Graphics - Disables motion blur, lowers glowing effect quality, and disables AA) [URL="http://www.mediafire.com/?kpz1dx6njpn9c69"]Very Low-Quality Settings[/URL] (Recommended for older machines - Disables Glowing effects and disables AA) [sp]Intentionally not used to help erectile disfunctions. You're welcome, if it does.[/sp]
  • 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!
  • [quote=README BITCH]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[/quote] Hmm... there seems to be a fairly popular sound type missing from that list... But no problem at all; [url=http://media.io]media.io[/url] to the rescue!
  • [QUOTE=Metroid48;30733034]The audio also crackles, while it's fine in my regular player.[/QUOTE] 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. [QUOTE=Metroid48;30733034]This is acting a bit weird for me. Resolution changes don't affect the window size but cause glow artifacts and framerate issues.[/QUOTE] Really? I'll have to do a quick fix for that then. [editline]26th June 2011[/editline] [QUOTE=Metroid48;30733034]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![/QUOTE] Alright, I fixed the window size/artifact issue for now (it was a stupidly simple mistake, too :doh: ). Try redownloading using the same link.
  • [QUOTE=Xeon06;30733041]Hmm... there seems to be a fairly popular sound type missing from that list... But no problem at all; [url=http://media.io]media.io[/url] to the rescue![/QUOTE] SFML can't use MP3 because it's a commercial format.
  • [img]http://myfacewhen.com/images/204.jpg[/img] [highlight](User was banned for this post ("Image macro" - Overv))[/highlight]
  • [QUOTE=ief014;30733083]Alright, I fixed the window size/artifact issue for now (it was a stupidly simple mistake, too :doh: ). Try redownloading using the same link.[/QUOTE] 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. :v:
  • [QUOTE=Metroid48;30733414]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. :v:[/QUOTE] It was a lot better than it used to be... :eng99:
  • [QUOTE=snergwerf;30733266]SFML can't use MP3 because it's a commercial format.[/QUOTE] It is legal for free and open source software to include MP3 decoders. Only commercial products need to have a license.
  • [QUOTE=ief014;30733452]It was a lot better than it used to be... :eng99:[/QUOTE] Hey, would you mind accepting my request on Steam? I'm the one with the flash avatar.
  • Awesome! It needs more different effects though, because it soon gets pretty boring with those few effect repeating all over again.
  • The only complaint I have is the interface, otherwise this kicks ass. Amon Tobin (the guy who did Chaos Theory Soundtrack) is especially sexy.
  • [QUOTE=Thecoolgman2;30735016]Where could I get the song used in the video? I love it, also nice work.[/QUOTE] 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.
  • [QUOTE=Mr Nagasaki;30735258]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. [url]http://soundcloud.com/unicqrn[/url][/QUOTE] Ah well thanks, you're music is fantastic I must say.
  • [QUOTE=Thecoolgman2;30735499]Ah well thanks, you're music is fantastic I must say.[/QUOTE] Thanks! it means a lot, though I haven't finished a song in a while, just keep starting new ones :c
  • 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.
  • [QUOTE=DatZach;30736354]No mod, xm or s3m support? I am disappoint, otherwise orgasmic[/QUOTE] 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 [cpp]//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; } }[/cpp] 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.
  • I watched Krizik "singing" Fountain in Prag and this is way better. Great work.
  • 55gb of music and you're actually expecting me to convert a file to wav everytime I want to play something? MP3 compatibility plz.