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
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
random music playing each time soneone enters site?
-
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2243
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 -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 80
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 -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 80
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 -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: May 09, 2010
- Posts: 872
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? -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 80
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 -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
http://www.hypergurl.com/randommidi.html
Google is your best friend.
That was the top link searching for javascript random midi
--
Zikula Themes -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Just use flash.
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
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 -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 842
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.
- Moderated by:
- Support
