HTML syntax


[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.





midplug-image 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">
<PARAM NAME="Src" VALUE="***.mid"></OBJECT>

The third line from the top <PARAM NAME="Src" VALUE="***.mid"> specifies the song name.

<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.