Rayonics, Inc. Home | About Us | Links | Log In | MediaShout Files | Contact Us

  MIDI2CMD
Launch any program from a MediaShout Cue - or from any application that can play a midi file (eg: Windows Media Player).
 

MIDI2CMD.ZIP

Launch any command from a MediaShout Cue. Launch Windows Media Player, Microsoft Word, Notepad, Open Office Impress...etc
Fire "Annette" internet pages from a MediaShout cue.
Launch any application by playing a midi file.


MIDI2CMD ReadMe.doc

* To download the above files, right click on the link and click "Save Target As" ,select the folder that you want to use for downloading, click "Save".

The batch files can be saved to your desktop, or to another folder and then add a link to the file from your desktop. Right click the desktop link and change the name, or icon as you wish. The MediaShout logo icon is located at C:\Program Files\MediaComplete\MediaShout\rubric.ico

 

7/3/2006
Roger Noar
rknoar@wavecable.com

"To God  Be The Glory"

Description:

This VBscript program (MIDI2CMD.vbs) works with MIDIOX to monitor the midi stream sent to the Windows default midi device - and launch executable files when a midi file "plays" a corresponding encoded SYSEX event. Midi files are easily inserted as a sound cue in MediaShout - with this software, these midi cues can launch any program.

This program and information should only be used by those who are familiar with scripts and batch file processing. This software is NOT developed, endorsed or supported in any way by MediaComplete (tm) – please do not bother them with any problems, bugs, etc when using this software. This is unsupported freeware/hobbyware & may be used for any non-profit, church or educational purpose.

It works on my computer (XP Pro SP2, MediaShout 3.1b498), you may need to tweak it to work on yours.

Thanks to:

Jamie O'Connell, Jerry Jorgenrud at http://www.midiox.com/ for their terrific MIDI-OX software.

Mike Oliver at http://www.geocities.com/mikeolivercgp/ for his great info on Girder(tm), Midi and MediaShout(tm).

Dr. Ron Dutro (rdutro @ the MediaShout forums) for his groundbreaking work with MediaShout, Midi & Girder.

All of the developers at AutoIt (www.autoitscript.com) for their great (free) scripting automation software.

Of course - MediaComplete(tm) (http://www.mediashout.com/) for "MediaShout - The best Church presentation software!"

 

Disclaimer:
The individual user is responsible for obtaining the appropriate copyright, licenses, and abiding by legal restrictions and copyright law. This information contained in this document is not to be used to violate or infringe upon any copyright. The user agrees to not make illegal copies or distribution of software. The user accepts all liability for their use of this information, and/or any software distributed with this document. The author(s) of this information and/or software do not warrant or imply any suitability of use. By using this information and/or software, the user agrees to indemnify and hold harmless the author(s) for any damage, loss or claims arising from it’s use.

 

Installation Instructions:
1) Download and install the latest version of MIDIOX from http://www.midiox.com/. See the MidiOx website - Jamie O'Connell has graciously allowed churches and non-profit groups to use MIDIOX and MIDIYOKE without a license. However, please support MidiOx development by making a donation at their MIDIOX website or their Amazon Honor System page: http://www.amazon.com/paypage/P1VLAHDEV4OLFN

2) Download and install the latest version of MIDIYOKE from www.midiox.com , then reboot .

3) Create a new folder "MIDI2CMD" under c:\Program Files\MIDIOX  (eg: C:\Program Files\MIDIOX\MIDI2CMD)

4) Copy all the MIDI2CMD files contained in this .zip to the "C:\Program Files\MIDIOX\MIDI2CMD" folder

5) Click on "Control Panel"->"Sounds & Audio Devices"->"Audio",
Note (write down) your current default MIDI Playback Device eg: "Microsoft GS Wavetable SW Synth"
Set the MIDI Playback device to "MIDIYOKE NT:1", click "Apply" & "OK"

6) The following steps will configure MIDIOX to pass midi events through MIDIOX and "MIDI Yoke NT:1" to your previous default Midi device. By doing this, your midi files will play as before, but pass through MIDIOX for processing.
Start MidiOx by double clicking on it's icon, or from "Start"->"Programs"
Click on "Options"->"Midi Devices",
Double-Click on your previous default MIDI Output Device in the "Midi Outputs" pane
Double-Click on "MIDI Yoke NT:1" in the "Midi Inputs" pane
Note that the "Port Mapping" pane now should show your previous default Midi device
on top, double-click on that device and it should show that "Midi-OX Events" and
"MIDI Yoke NT: 1" underneath.
Click "OK" and exit MIDI-OX . Wait for MIDIOX to close.

7) Double-click on MIDI2CMD.vbs to start it, you will see a small icon appear in your system tray.
To terminate MIDI2CMD.vbs and MIDIOX, simply double click, fire, or otherwise play "Terminate.mid" .

8) Now open MediaShout and insert a midi command cue by clicking "Insert" -> "Sound" and choosing one of the midi command cues in the c:\Program Files\MidiOx\Midi2Cmd folder eg: CMDCUE0.MID .

When this cue is fired in MediaShout, MIDI2CMD will run the application that is named in the SYSEX portion of the midi file. The 10 pre-made CMDCUE’s all run a corresponding batch file - eg: CMDCUE0.MID runs MIDICMD0.BAT.You can rename the cue in the cue window to something more meaningful (eg: "Church Website Homepage")

If you don't want to use batch files to launch applications, you can directly execute any application by creating your own midi file using the information below.

9) I have put together 10 sample batch files:
MIDICMD0.bat launches Solitaire - not too useful, but fun for checking out the program!
MIDICMD1.bat launches a notepad file with example instructions for the Sunday A/V tech.
MIDICMD2.bat uses the powerful (use carefully) taskkill command to close the previous notepad
             program.
MIDICMD3.bat launches MediaPlayer and starts playing Track01 of a CD
MIDICMD4.bat starts an Auto-It3 script that fires any selected webpage from Annette!
             Edit the URL in the batch file to launch a particular web page - or put in a blank URL to just fire
              the current Annette page.
MIDICMD5.bat uses the powerful Microsoft Devcon command to disable all networking
             (see Microsoft link to download Devcon)
MIDICMD6.bat same as above but re-enables networking
MIDICMD7.bat uses taskkill to terminate Norton Antivirus 2006 processes (they will restart when
             the computer is rebooted)
MIDICMD8.bat mutes all sounds
MIDICMD9.bat unmutes all sounds

Be creative, come up with your own batch files. If you fire a CMDCUEnn.mid that tries to run a non-existant  file, you will get an error message: "The system cannot find the file specified" from WSH (Windows Scripting Host).

10) All of the MIDICMD batch files can be easily edited to do whatever you want, within the scope of batch file processing. The midi CMDCUE's were made using a hex editor to insert the SYSEX commands that are used to trigger MIDI2CMD.vbs and launch the corresponding application (see more info below).
Starting an automation script, such as AutoIt3, from within a batch file allows anything that can be clicked, typed or executed on a computer to be launched by a MediaShout cue.

It wouldn't be too hard to control X10 devices, from a cue - but that's easier to do using Girder.

11) The little batch file "Start MediaShout.bat" just starts the MIDI2CMD.vbs program and then starts MediaShout (Assumes both are installed in the default locations). The shortcut can be put on the desktop and renamed, etc .

NOTES:
Please open up the example batch files with notepad - and read them before trying them!
Be careful when using devcon, taskkill, etc - don't use them unless you know what you are doing. 

AutoIt3 was used to develop some of the automation scripts and compiled into executables - therefore you do not need to install AutoIt3 to run the scripts. If you are interested in editing the AutoIt3 scripts, I have provided the source code for the scripts (.au3 files). AutoIt3 can be downloaded at http://www.autoitscript.com/. The AutoIt3 scripts rely on the control-id's of the various MediaShout buttons, these could change in future releases and would require a tweak to the Auto-It3 scripts.  

The "CMDCUEnn.mid" midi files can be played by Windows Media Player - or any midi player for testing purposes, and will fire off the corresponding batch file as long as MIDI2CMD.vbs is running. 

With some minor changes in the MidiOx setup (processing Midi input instead of output), this software could be used to launch any application on your computer, control lights, sequence through MediaShout cues, launch a soundtrack or movie, etc by playing a specific Midi note, program change, etc on your Midi Keyboard, Synthesizer or Sequencer...

 

------------------------------------------------------------------------------------------------------------------------------

Information from Midi2cmd.vbs header - help on creating your own midi command files:

' MIDI2CMD - Executes commands after receiving special MIDI SYSEX messages
' Roger Noar 5/9/2006
'
' VBscript for use with MidiOx 7 - www.midiox.com
'
' Midi2Cmd SysEx commands are formatted as follows (in Hex):
' F0 followed by the length of the SysEx command
' 52 4D 32 43 4D 44  (RM2CMD)
' ww = winstyle (see details below)
' xx yy zz .... Command string - the actual command encoded in hex as ascii characters
' (see details below)
' F7 (signals the end of the SysEx event)
'
' winstyle details: ascii "7E" terminates this script, otherwise: 0-9 window style per VBscript "Run" method, encoded in hex as ascii characters
' (eg: 0 = "30", 7 = "37" etc) 0 = hide window, 1 = activate & display window, 2 = activate & minimize,
' 3 = activate & maximize,  7 = displays minimized & current window stays active , etc
'
' Command String details: the command should be enclosed in quotes, followed by any parameters,
' use full path or path referenced  to where this program is executed.
' Don't worry about leading/trailing spaces, they are eliminated.
' Example: "c:\program files\windows media player\wmplayer.exe" d:\Track01.cda

' This script uses the "Run method", so If a file type has been properly registered to
' a particular program,  calling run on a file of that type executes the program.
' For example, if Word is installed on your computer system, a command such as "readme.doc"
' starts Word and loads the document.
'
' Either a hex editor can be used to create your own midi command files, or the pre-made
'   "cmdcue_x.mid" files can be used to run  a corresponding batch file that can be easily edited
' with notepad to run whatever file you'd like.

ADDITIONAL HELPFUL SITES:

MIDI Software

MIDI File Format - The Sonic Spot

The DevCon command-line utility functions as an alternative to Device Manager

Windows NT VBscript

FS Hex Editor

Mike Oliver

AutoIt v3 - Automate and Script Windows Tasks - For Free!

MIDIOX

 

* To download the above files, right click on the link and click "Save Target As" ,select the folder that you want to use for downloading, click "Save".

The batch files can be saved to your desktop, or to another folder and then add a link to the file from your desktop. Right click the desktop link and change the name, or icon as you wish. The MediaShout logo icon is located at C:\Program Files\MediaComplete\MediaShout\rubric.ico

Disclaimer - All of the documents and programs listed above are provided free of charge for use by individuals, schools, churches and non-profit organizations. The documents and programs listed above are not developed, supported or endorsed by MediaComplete™ Inc. The individual user is responsible for obtaining the appropriate copyright, licenses, and abiding by legal restrictions and copyright law. This information contained in this document is not to be used to violate or infringe upon any copyright. The user agrees to not make illegal copies or distribution of song lyrics. The user accepts all liability for their use of this information, and/or any software distributed with this document. The author(s) of this information and/or software do not warrant or imply any suitability of use. By using this information and/or software, the user agrees to indemnify and hold harmless the author(s) for any damage, loss or claims arising from it’s use. We are not liable for any data loss arising from the use of this product.

MediaShout™ - The Best Church Presentation Software


HOME