Author |
Topic: Where to download sample scripts? (Read 2736 times) |
|
krav_magan
Member
The Mox Script Master
Gender:
Posts: 46
|
|
Where to download sample scripts?
« on: Sep 14th, 2014, 8:00pm » |
Quote Modify
|
I've been editing the sample scripts and I forgot to save the originals as separate files. Could someone upload the original sample scripts somewhere? Please!!
|
|
IP Logged |
|
|
|
krav_magan
Member
The Mox Script Master
Gender:
Posts: 46
|
|
Re: Where to download sample scripts?
« Reply #1 on: Sep 14th, 2014, 8:07pm » |
Quote Modify
|
actually if you could just upload the Breath2NRPN.js file, that would awesome!!
|
|
IP Logged |
|
|
|
krav_magan
Member
The Mox Script Master
Gender:
Posts: 46
|
|
Re: Where to download sample scripts?
« Reply #2 on: Sep 15th, 2014, 10:57am » |
Quote Modify
|
If anyone could just copy and paste the text inside the file as a comment that would be awesome!
|
« Last Edit: Sep 15th, 2014, 11:00am by krav_magan » |
IP Logged |
|
|
|
krav_magan
Member
The Mox Script Master
Gender:
Posts: 46
|
|
Re: Where to download sample scripts?
« Reply #3 on: Sep 15th, 2014, 11:25am » |
Quote Modify
|
Here it is if anyone ever needs it (Breath2NRPN.js): // MIDIOX Test // Copyright (c) 2000 by Jamie O'Connell // // This script is an example of doing JScript with MIDI-OX // It converts each single Breath controller event into 4 NRPN messages, that // control filters on Patches (XG instruments). var mox; var str, strWrk; var n, ii, nInst; var bGo; var notesOn; var baseChan; // Create object mox = WScript.CreateObject("Midiox.MoxScript.1", "On_"); n = mox.InstanceCount; // *** Try out our MIDI Input loop notesOn = 0; // init baseChan = 0; // init -- we expect channel 1 mox.DivertMidiInput = 1; mox.FireMidiInput = 1; WScript.Echo( "Press OK to end MIDI translate Loop" ); mox.FireMidiInput = 0; mox.DivertMidiInput = 0; str = null; strWrk = null; mox = null; // Exit Point //------------------------------------------ function On_MidiInput( ts, port, stat, dat1, dat2) { // We convert all breath control messages into 4 message NRPNS var statraw; statraw = stat & 0x0F0; if (statraw == 0x0B0 && dat1 == 0x02) { mox.OutputMidiMsg( -1, stat, 0x63, 0x01 ); // NRPN MSB -- on XG (GS?): Filter cutoff mox.OutputMidiMsg( -1, stat, 0x62, 0x20 ); // NRPN LSB mox.OutputMidiMsg( -1, stat, 0x06, dat2 ); // DataEntry MSB (value of breath CC) mox.OutputMidiMsg( -1, stat, 0x26, 0x00 ); // dataEntry LSB (0 in this case) } else // other message { mox.OutputMidiMsg( -1, stat, dat1, dat2 ); } }
|
|
IP Logged |
|
|
|
|