473,657 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.MI D"
mid3 = "./SYSmidiSounds/PlanetStupitor. MID"
mid4 = "./SYSmidiSounds/Absurdo.MID"
mid5 = "./SYSmidiSounds/HateNoMore.MID"
mid6 = "./SYSmidiSounds/LoombaLoomba.MI D"
mid7 = "./SYSmidiSounds/PlanetStupitor. MID"
mid8 = "./SYSmidiSounds/Absurdo.MID"
mid9 = "./SYSmidiSounds/HateNoMore.MID"
midr = 0
now=new Date()
midr=(now.getSe conds() )%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 2111
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.MI D"
mid3 = "./SYSmidiSounds/PlanetStupitor. MID"
mid4 = "./SYSmidiSounds/Absurdo.MID"
mid5 = "./SYSmidiSounds/HateNoMore.MID"
mid6 = "./SYSmidiSounds/LoombaLoomba.MI D"
mid7 = "./SYSmidiSounds/PlanetStupitor. MID"
mid8 = "./SYSmidiSounds/Absurdo.MID"
mid9 = "./SYSmidiSounds/HateNoMore.MID"
midr = 0
now=new Date()
midr=(now.getS econds() )%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='fals e' 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
1192
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
4216
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 executable c program would read a text document with some "musical pseudocode" representing some `tune`. Then convert the "musical pseudocode" into "midi code" that could be played in any midi player like `windows media player`. 4.How would you do this?...
3
19912
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 and utilize its value property to manage the volume of the Windows Media Player control. I am not sure which property on the windows media control I am suppose to manipulate. I tried to use the following: mp.volume = vsVol.value in the sliders...
4
2691
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 managed to make it work to the level of reading a text file with appropriate notes, octaves, transposing, volume, aftertouch, polyphony, channeltouch etc.
9
3492
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 chosen notes via midi? Is there an existing library for such a thing?
3
1762
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, or mp3 file. i also need to be able to set the midi insturment. can anyone recomend such a component, or better still a location where such components are reviewed and compared as to features and price?
3
2913
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 of code that does this, but it's made for only one mp3 file. I don't know enough about javascript to customize the code myself. I know there probably needs to be an "array" of some sort, but I need some help figuring out where and how that works....
1
11623
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. I want to be able to map controls of the media player to images on the page ie - when user clicks play image - song plays. I can currently get it working in IE but I can't get it to work in Firefox. Problems: 1. The buttons (image buttons)...
5
14809
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 huge problems with slow connect times and heavy resource locking in high concurrency / high transaction volume environments. I have an OLTP with 30-90 transactions per second activity, and start of Health Monitor every 2 hours was crashing our...
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8326
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8845
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8743
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8522
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5647
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.