[HTML syntax]
<EMBED SRC="xxxx.MID" (or "xxxx.wav" for example) WIDTH="150" HEIGHT="40" PANEL="0" AUTOSTART="true" REPEAT="true" TEXT="xxxxxx" SAVE="true">The size of the control panel can be specified as follows.
- "WIDTH=150 HEIGHT=40" will display a 150 x 40 pixel control panel.
(PANEL=0) (PANEL=1)
- "WIDTH=100 HEIGHT=30" will display a 100 x 30 pixel control panel.
(PANEL=0) (PANEL=1)
- "WIDTH=40 HEIGHT=35" will display a 40 x 35 pixel control panel.
- By setting "HEIGHT=0" you can hide the panel. In this case, control will not be possible.
- "AUTOSTART=true" is the normal setting, causing playback to begin automatically when the page is opened. When "AUTOSTART=false", playback will begin only when the Play button of the control panel is pressed.
- "REPEAT=true" is the normal setting, the song playback to repeat until the stop button is pressed. When "REPEAT=false", the song will playback once and then stop at the end of the song. The integral can be described after "=" to set the number of repeat. (Ex. when "REPEAT=3", the song playback to repeat three times.)
- When "PANEL=0" the control panel will have a light color scheme (normal setting). When "PANEL=1" the control panel will have a dark color scheme. (The 40 x 35 pixel control panel provides only one color scheme, and the same panel will appear regardless of whether "PANEL=" is set to 0 or 1.)
- If you input a character string following "TEXT=", the specified characters will appear in the display section. A maximum of approximately 14 characters can be displayed.If you do not use the TEXT option, the filename of the MIDI song will be displayed.
- "SAVE=false" is the normal setting, prohibit to save MIDI/Audio files. When "SAVE=true", permit to save files.
Using the OBJECT tag to attach a MIDI song to a page
When creating a page that uses ActiveX controls, you will use an OBJECT tag to specify controls as follows.<OBJECT ID="MIDPLUG"WIDTH=150 HEIGHT=40 CLASSID="CLSID:B0C207A3-42EE-11D0-9DB3-00805F8A73C5">The third line from the top <PARAM NAME="Src" VALUE="***.mid"> specifies the song name.
<PARAM NAME="Src" VALUE="***.mid"></OBJECT>
<PARAM NAME="***" VALUE="***"> are ActiveX control attributes known as properties, and specify functionality and appearance such as display size, color, and font.
To write all this by hand would be quite a job, but by using Microsoft's "ActiveX Control Pad" you can easily and accurately add such code to your HTML file.
This page will introduce the properties of MIDPLUG control for XG.(For details on using ActiveX Control Pad, access YAMAHA XG homepage.)
MIDPLUG Control properties
AutoStart Whether or not the MIDI file will be played back when the control starts up. Default is "True". EnableCue Whether or not Cue events will be generated. Default is "False". EnableEvent Whether or not MIDI OUT on each channel will generate an event. Bit 0 corresponds to channel 1. By default all bits are 0. If you don't want any of the 16 channels to generate events, specify 65535 or &hffff. Mute Whether or not to mute each channel. Bit 0 corresponds to channel 1. By default all bits are 0. If you want to generate events on all 16 channels, specify 65535 or &hffff. Panel Specify the panel color. 0: white, 1: black. PanelSize Specify the panel size. 0: small, 1: medium, 2: large. Repeat Specify whether or not playback will be repeated. Default is "False". Src Specify the MIDI file to be played back. *****.mid. Tempo Modify the tempo. Specify in the range of -45%--+45%. Default is 0. Text Show the specified character string in the display. Transpose Specify the amount of transposition. The pitch can be transposed up to one octave upward or downward (-12 -- +12). Default is 0. Volume Specify the volume in the range of 0--100%. Default is 100. Savable Specify the permission of saving MIDI files. 0:prohibit to save, 1:permit to save. Default is 0.
MIDPLUG Control properties (Read only)
IsPause Non-zero when paused, and 0 if not paused. IsPlaying Non-zero when playing, and 0 if not playing. IsReady Non-zero when ready to play, and 0 if not ready.
Methods (none of these have return values)
Play() Play. PlayEx(loop, Tune) Playback the data specified by Tune(filename).loop(True/False) specifies looping. Pause() Pause playback. Stop() Stop. SendMessage(mes1, mes2, mes3) A MIDI message mes1--3 will be output. Open() Opens the MIDI output. Close() Closes the MIDI output. MuteOn(ch) Mutes channel "ch". MuteOff(ch) Un-mutes channel "ch". VolumeUp() Raise volume one step in a range of 0--8. VolumeDown() Lower volume one step in a range of 0--8. TempoUp() Tempo up 5%. TempoDown() Tempo down 5%. PitchUp() Semitone up. PitchDown() Semitone down.
Events
ClickPlay() Occurs when the play button is pressed. ClickPause() Occurs when the pause button is pressed. ClickStop() Occurs when the stop button is pressed. NotifyEnd() Occurs when playback ends at the end of the song. MidiOut(mes1, mes2, mes3) Occurs when MIDI is output. MidiIn(mes1, mes2, mes3) Occurs when MIDI is input. Cue(Text) Occurs when a cue point (meta-event) is detected.
Back to main
Copyright(C)1998 YAMAHA CORPORATION All rights reserved.