473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Midi player, I can't set volume level...see code here

rod
Help with music volume control... the following code works fine but I can't
seem to control the volume... being to High or FULL... after setting it to
5 or 5% I also set autostart false and the music still autostarts..
Can anyone suggest...
mid0 = "./SYSmidiSounds/Absurdo.MID"
mid1 = "./SYSmidiSounds/HateNoMore.MID"
mid2 = "./SYSmidiSounds/LoombaLoomba.MID"
mid3 = "./SYSmidiSounds/PlanetStupitor.MID"
mid4 = "./SYSmidiSounds/Absurdo.MID"
mid5 = "./SYSmidiSounds/HateNoMore.MID"
mid6 = "./SYSmidiSounds/LoombaLoomba.MID"
mid7 = "./SYSmidiSounds/PlanetStupitor.MID"
mid8 = "./SYSmidiSounds/Absurdo.MID"
mid9 = "./SYSmidiSounds/HateNoMore.MID"
midr = 0
now=new Date()
midr=(now.getSeconds() )%10
mide = " "
if (midr == 0)
..
..
.........
if (midr == 9)
{mide = mid9}
document.write("<embed src='"+mide+"' autostart'false' width='75'
height='45' loop='true' volume='5' </embed> ")
Thanks do appreciate
Rod
Jul 23 '05 #1
1 2098
Lee
ro*@mastar.com said:

Help with music volume control... the following code works fine but I can't
seem to control the volume... being to High or FULL... after setting it to
5 or 5% I also set autostart false and the music still autostarts..
Can anyone suggest...
mid0 = "./SYSmidiSounds/Absurdo.MID"
mid1 = "./SYSmidiSounds/HateNoMore.MID"
mid2 = "./SYSmidiSounds/LoombaLoomba.MID"
mid3 = "./SYSmidiSounds/PlanetStupitor.MID"
mid4 = "./SYSmidiSounds/Absurdo.MID"
mid5 = "./SYSmidiSounds/HateNoMore.MID"
mid6 = "./SYSmidiSounds/LoombaLoomba.MID"
mid7 = "./SYSmidiSounds/PlanetStupitor.MID"
mid8 = "./SYSmidiSounds/Absurdo.MID"
mid9 = "./SYSmidiSounds/HateNoMore.MID"
midr = 0
now=new Date()
midr=(now.getSeconds() )%10
mide = " "
if (midr == 0)
.
.
........
if (midr == 9)
{mide = mid9}
document.write("<embed src='"+mide+"' autostart'false' width='75'
height='45' loop='true' volume='5' </embed> ")


You haven't set autostart to false. You're missing the "=" sign.

Note that you could eliminate all of those "ifs" by changing your
document.write() to:

document.write("<embed src='mide"+midr+"' autostart='false' width='75'
height='45' loop='true' volume='5' </embed> ")

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sleeds | last post by:
Does anyone know how I can raise or lower the volume via code for the MIDI SYNTH Volume in VB.net?
2
by: david | last post by:
1.I am considering doing a midi file generator for my 4th year project in B.SC. 2.I would do it using c language, but i'm not sure abou t the level of difficulyt involved 3.Basically, the...
3
by: rmorvay | last post by:
I wrote a quick app to play music and I am having difficulty connecting a slider control to the Windows Media Player control. Here is my difficulty. I need to set the sliders min and max properties...
4
by: sreekant | last post by:
Hi folks I hope someone here might be able to help. I scavenged some info and even code from the net and am trying to write a module that reads a text file and spits out a midi file. So far I...
9
by: outstretchedarm | last post by:
How exactly does HTML/Javascript handle playing midi files? Does it have a player imbedded in it? Or does it borrow from the computer's midi player? How could you make a webpage play certain...
3
by: ray well | last post by:
hi, i'm looking for an audio component to add to a .net 2005 program, that could play all or part (starting at a certain point and ending at a certain point within a audio file) of a wav, midi,...
3
by: alice | last post by:
I've been trying for a long time to figure this out, to have a page with several MP3 clips, and each one having a custom start and stop button next to them to play the track. I finally found a bit...
1
by: SeanBoyWalton | last post by:
Hi, I'm currently trying to build a website for a DJ friend of mine and I have come stuck with a couple of issues. I've searched everywhere and put some code together but I still have problems. ...
5
by: jbenner | last post by:
I have opened a PMR for this with IBM, and am not asking for advice from the DB2 DBA community. I am posting this as an FYI that DB2 Health Monitor, even at the latest version of DB2, still can cause...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.