Fork me on GitHub

random music playing each time soneone enters site?  Bottom

  • I'm trying to add two different midis on my site.

    Each time someone enters, it will randomly pick a midi to play.

    How do I do that? Its my blog not my postnuke site BTW
  • Throw a little SSI in there to include a PHP script that picks a random number and then outputs the code to include the midi of your choice. If it's a PHP page, just stick the code in there in your header. It's probably doable in javascript as well, but I have an unnatural fear of javascript.

    Please keep in mind that lots (and I mean lots) of people find the abrupt, LOUD bleeping of midi music... offensive. That $.02 is free. :)

    Frank
  • Yeah I've decided not to use midi but I still am playing some melody.

    Uhh, PHP doesn't work on it. They don't support it =X

    Is there any other way?
  • Kenshino

    Yeah I've decided not to use midi but I still am playing some melody.

    Uhh, PHP doesn't work on it. They don't support it =X

    Is there any other way?


    http://riverdrift.com/m2/rand_mid.php might assist.


    Zoom
  • Thanks but the thing is PHP is not supported.
  • Javascript will take care of you.

    Frank
  • Kenshino

    Thanks but the thing is PHP is not supported.


    You didn't say what was supported. Perhpas a little more info would suffice ;)

    Like Frank said javascript is most likely what your after.

    Zoom
  • Zoom

    Kenshino

    Thanks but the thing is PHP is not supported.


    You didn't say what was supported. Perhpas a little more info would suffice ;)

    Like Frank said javascript is most likely what your after.

    Zoom


    Actually I did say PHP was not supported =X

    And Frank, I really don't know javascript.

    Anyone can help me out abit here?
  • Kenshino

    Zoom

    Kenshino

    Thanks but the thing is PHP is not supported.


    You didn't say what was supported. Perhpas a little more info would suffice ;)

    Like Frank said javascript is most likely what your after.

    Zoom


    Actually I did say PHP was not supported =X



    Right.

    So far all we know is it isn't postnuke, it isn't PHP, and you don't know javascript.

    Now can ya tell us what IS supported so that we can try to help you?

    Zoom
  • http://www.hypergurl.com/randommidi.html

    Google is your best friend.

    That was the top link searching for javascript random midi

    --
    Zikula Themes
  • Just use flash.

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • Flash did occur to me... can Flash play midi? I know it can play mp2 & mp3, but is midi an option?

    Frank
  • FrankDeRosa

    Flash did occur to me... can Flash play midi? I know it can play mp2 & mp3, but is midi an option?

    Frank


    hmmm, not sure about this... it has got lots of new options with mx2004 in regards to what you can do with movies... but maybe it does:

    http://www.sonify.org/tutorials/links/pages/flash_audio/advanced/midisynth/

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • Is ASP supported? If so, it's pretty simple to do it that way.
  • And if you want to go with a Flash-type solution, but midi sin't supported (don't know this personally, just assuming) you could try SVG. SVG is fairly simple to learn (easier than Flash IMO) and the great thing is the code is open so you can make any adjustments you need, like including any type of sound file necessary.

This list is based on users active over the last 60 minutes.