NRPN Calculator v1.0 ==================== (C)Copyright 2009, Rich ¯Weeds¯ Nagel - All rights reserved Overview -------- This utility is a simple NRPN calculator for use with any EMU8000, EMU10K1, or EMU10K2 based MIDI hardware (such as Creative Labs' AWE-32, Sound Blaster Live!, or Audigy line of sound cards). The utility makes calculating actual NRPN values, Data Entry MSB values, and Data Entry LSB values a snap... all without the confusing equations and formulas listed in the various FAQs and help files for these sound cards. Installation ------------ Simply unzip NRPNCalc.zip to any directory on your hard drive. Usage ----- From the MS-DOS prompt (or the Windows taskbar "Start/Run/Browse"), type NRPNCalc and press "ENTER". All of the menu options are self-explanatory. Simply press the hotkey on your keyboard for the option or calculation that you wish to perform, and then press "ENTER". Press "D" to calculate Data Entry MSB and Data Entry LSB values (using actual NRPN values). Press "A" to calculate actual NRPN values (using Data Entry MSB and Data Entry LSB values). Press "V" to view the results file created from previous calculations (Results.txt). Then press "M" to view the results file using MS-DOS Editor, press "W" to view the results using Windows Notepad, or press "R" to return to the NRPN Calculator's main menu. Press "F" to delete the results file created from previous calculations (Results.txt). Press "H" to view the NRPN Calculator's help and readme file (NRPNCalc.txt). Press "Q" to quit and exit the NRPN Calculator. Changing an Instrument's SoundFont Banks Parameters Using NRPN -------------------------------------------------------------- Note: The information below was borrowed directly from the various FAQs and help files for the above-mentioned sound cards (with a few additions, and some minor text editing and formating). You can change an instrument's SoundFont Banks parameters (for example, LFO depth and speed, envelope contour) through MIDI in real time via NRPN, or Non Registered Parameter Number control. NRPN is identical to that of RPN, except that Registered Parameter Numbers are agreed upon by the MMA (MIDI Manufacturers Association) and JMSC (Japan MIDI Standards Committee), and Non Registered Parameter Number may be assigned as needed by individual manufacturers. As NRPN and Data Entry messages are MIDI controller messages, any MIDI sequencer software that supports editing of controller messages (such as Cakewalk, MasterTracks Pro) is capable of sending them. For audio hardware NRPN to be functional, NRPN MSB has to be 127, and NRPN LSB set to the desired parameter to be controlled (see section, "Audio Hardware NRPN LSB Implementation" for a list of available NRPN LSB effects). To control the audio hardware's NRPNs, enter the following series of controller events in your MIDI sequencer software: Controller Parameter Description ---------- --------- ----------- 99 127 This is the NRPN MSB. It is always 127. 98 NRPN LSB # The number of the effect as listed in section, "Audio Hardware NRPN LSB Implementation". 6 Data Entry MSB # (See formulas below) 38 Data Entry LSB # (See formulas, and "An Explaination of Modulo Arithmetic" section below) Data Entry MSB # = (Actual Value + 8192) / 128 Data Entry LSB # = (Actual Value + 8192) % 128 Where "Actual Value" represents the desired increment in a specified range (see section, "Audio Hardware NRPN LSB Implementation"). For example, here is a listing from the above-mentioned section: NRPN LSB 26 (Reverb Effects Send) Realtime : No Range : [0, 255] Reverb send, with 0 being the driest (no reverb effects processing), and 255 being the wettest (full reverb effect processing). In the example above, reverb may be controlled from levels 0 to 255. Select the desired reverb level, and use that number as the Actual Value in the formulas above. These formulas determine the parameters for controllers 6 and 38, respectively. For example, if you wanted to have a reverb value of 140, you would enter 140 into the formulas above, and the results would be a value of 65 for controller 6, and 12 for controller 38. If you need to determine the Actual Value of an NRPN already present in a MIDI file, use the following formula: Actual value = (MSB * 128 + LSB) - 8192 Note that a "Reset All Controllers" message (MIDI controller 121) restores the instrument's original SoundFont Banks parameters. NRPN Calculation Formulas *SIMPLIFIED* - An Explaination of Modulo Arithmetic ----------------------------------------------------------------------------- Note: The information below is simply my own description of the various NRPN calculation equation and formulas, and is simplified for the non-mathematic folks... like myself ! Data_Entry_MSB_# = (Int)((Actual_Value + 8192) / 128) Data_Entry_LSB_# = (Actual_Value + 8192) % 128 Note that the "%" (percent sign) above is "Modulo" arithmetic, and does NOT mean "percent". Modulo arithmetic is denoted by the modulus (or "remainder") operator "%". Modulo arithmetic provides the remainder, rather than the quotient, of an integer division. Hence, the LSB calculation above is the same as the following formula: Data_Entry_LSB_# = (Actual_Value + 8192) - ((Int)((Actual_Value + 8192) / 128) * 128) To determine the Actual Value of an NRPN already present in a MIDI file (as detailed in the section "Changing an Instrument's SoundFont Banks Parameters Using NRPN"), use the following formula: Actual_Value = ((Data_Entry_MSB_# * 128) + Data_Entry_LSB_#) - 8192 Audio Hardware NRPN LSB Implementation (MIDI Controller 98) ----------------------------------------------------------- Note: The information below was borrowed directly from the various FAQs and help files for the above-mentioned sound cards (with a few additions, and some minor text editing and formating). NRPN LSB 0 (Delay before LFO1 starts) Realtime : No Range : [0, 5900] Unit : 4 milliseconds Delay from 0 to 22 seconds. NRPN LSB 1 (LFO1 Frequency) Realtime : Yes Range : [0, 127] Unit : 0.084Hz LFO1 frequency from 0Hz to 10.72 Hz. NRPN LSB 2 (Delay before LFO2 starts) Realtime : No Range : [0, 5900] Unit : 4 milliseconds Delay from 0 to 22 seconds. NRPN LSB 3 (LFO2 Frequency) Realtime : Yes Range : [0, 127] Unit : 0.084Hz LFO2 frequency from 0Hz to 10.72 Hz. NRPN LSB 4 (Envelope 1 delay time) Realtime : No Range : [0, 5900] Unit : 4 milliseconds Envelope 1 Delay from 0 to 22 seconds. NRPN LSB 5 (Envelope 1 attack time) Realtime : No Range : [0, 5940] Unit : Milliseconds Envelope 1 attack time from 0 to 5.9 seconds. NRPN LSB 6 (Envelope 1 hold time) Realtime : No Range : [0, 8191] Unit : Milliseconds Envelope 1 hold time from 0 to 8 seconds. NRPN LSB 7 (Envelope 1 decay time) Realtime : No Range : [0, 5940] Unit : 4 Milliseconds Envelope 1 decay time from 0.023 to 23.7 seconds. NRPN LSB 8 (Envelope 1 sustain level) Realtime : No Range : [0, 127] Unit : 0.75dB Envelope 1 sustain level from full level down to off (0.75 dB step). NRPN LSB 9 (Envelope 1 release time) Realtime : No Range : [0, 5940] Unit : 4 milliseconds Envelope 1 release time from 0.023 to 23.7 seconds. NRPN LSB 10 (Envelope 2 delay time) Realtime : No Range : [0, 5900] Unit : 4 milliseconds Envelope 2 Delay from 0 to 22 seconds. NRPN LSB 11 (Envelope 2 attack time) Realtime : No Range : [0, 5940] Unit : Milliseconds Envelope 2 attack time from 0 to 5.9 seconds. NRPN LSB 12 (Envelope 2 hold time) Realtime : No Range : [0, 8191] Unit : Millisecond Envelope 2 hold time from 0 to 8 seconds. NRPN LSB 13 (Envelope 2 decay time) Realtime : No Range : [0, 5940] Unit : 4 milliseconds Envelope 2 decay time from 0.023 to 23.7 seconds. NRPN LSB 14 (Envelope 2 sustain level) Realtime : No Range : [0, 127] Unit : 0.75dB Envelope 2 sustain level from full level down to off. NRPN LSB 15 (Envelope 2 release time) Realtime : No Range : [0, 5940] Unit : 4 milliseconds Envelope 2 release time from 0.023 to 23.7 seconds. NRPN LSB 16 (Initial Pitch) Realtime : Yes Range : [-8192, 8191] Unit : cents Pitch tuning between -8192 and 8191 cents. NRPN LSB 17 (LFO1 to Pitch) Realtime : Yes Range : [-127, 127] Unit : 9.375 cents If data value is greater than 0, this will cause a positive (from 0 to maximum) 1 octave shift at LFO peak. On the other hand, if data value is smaller than 0, this will cause a negative (from 0 to minimum) 1 octave shift at LFO peak. NRPN LSB 18 (LFO2 to Pitch) Realtime : Yes Range : [-127, 127] Unit : 9.375 cents If data value is greater than 0, this will cause a positive (from 0 to maximum) 1 octave shift at LFO peak. On the other hand, if data value is smaller than 0, this will cause a negative (from 0 to minimum) 1 octave shift at LFO peak. NRPN LSB 19 (Envelope 1 to Pitch) Realtime : No Range : [-127, 127] Unit : 9.375 cents If data value is greater than 0, this will cause a positive (from 0 to maximum) 1 octave shift at envelope peak. On the other hand, if data value is smaller than 0, this will cause a negative (from 0 to minimum) 1 octave shift at envelope peak. NRPN LSB 20 (LFO1 to Volume) Realtime : Yes Range : [0, 127] Unit : 0.1875 dB Data values smaller than 64 causes a positive phase (from 0 to maximum) volume modulation via LFO1 with magnitude of 12 dB at LFO peak. On the other hand, data values greater than or equal to 64 causes a negative phase (from 0 to minimum) volume modulation via LFO1 with magnitude of 12 dB at LFO peak. NRPN LSB 21 (Initial Filter Cutoff) Realtime : Yes Range : [0, 127] Unit : 62Hz Filter cutoff from 100Hz to 8000Hz NRPN LSB 22 (Initial Filter Resonance Coefficient) Realtime : No Range : [0, 127] The Audio Effects Processor (EMU8000/EMU10K1/EMU10K2) has a built in resonance coefficient table comprising 16 entries. Values 0-7 will select the first (0) entry, values 8-15 selects the second (1) entry and so on. Coeff Low Fc(Hz) Low Q(dB) High Fc(kHz) High Q(dB) DC Attenuation(dB) ----- ---------- --------- ------------ ---------- ------------------ 0 92 5 Flat Flat -0.0 1 93 6 8.5 0.5 -0.5 2 94 8 8.3 1 -1.2 3 95 10 8.2 2 -1.8 4 96 11 8.1 3 -2.5 5 97 13 8.0 4 -3.3 6 98 14 7.9 5 -4.1 7 99 16 7.8 6 -5.5 8 100 17 7.7 7 -6.0 9 100 19 7.5 9 -6.6 10 100 20 7.4 10 -7.2 11 100 22 7.3 11 -7.9 12 100 23 7.2 13 -8.5 13 100 25 7.1 15 -9.3 14 100 26 7.1 16 -10.1 15 100 28 7.0 18 -11.0 NRPN LSB 23 (LFO1 to Filter Cutoff) Realtime : Yes Range : [-64, 63] Unit : 56.25 cents Data values smaller than 64 causes a positive phase (from 0 to maximum) filter modulation via LFO1 with magnitude of 3 octaves at LFO peak. On the other hand, data values greater than or equal to 64 causes a negative phase (from 0 to minimum) filter modulation via LFO1 with magnitude of 3 octaves at LFO peak. NRPN LSB 24 (Envelope 1 to Filter Cutoff) Realtime : No Range : [-127, 127] Unit : 56.25 cents Data values greater than 0 cause a positive phase (from 0 to maximum) filter modulation via Envelope 1 with magnitude of 6 octaves at envelope peak. On the other hand, values smaller than 0 cause a negative phase (from 0 to minimum) filter modulation via Envelope 1 with magnitude of 6 octaves at envelope peak. NRPN LSB 25 (Chorus Effects Send) Realtime : No Range : [0, 255] Chorus send, with 0 being the driest (no chorus effects processing), and 255 being the wettest (full chorus effect processing). NRPN LSB 26 (Reverb Effects Send) Realtime : No Range : [0, 255] Reverb send, with 0 being the driest (no reverb effects processing), and 255 being the wettest (full reverb effect processing). NRPN LSB 27 (Pan) Realtime : No Range : [0, 127] 0 = full left and 127 = full right. To pan via MIDI controllers, use MIDI controller 10 instead of NRPNs. Note that NRPN LSB 27 is only supported with EMU8000 based MIDI hardware, and not with EMU10K1/EMU10K2 based MIDI hardware. Source Code ----------- Note that the original QuickBasic v4.50 source code for the utility (NRPNCalc.bas) is also included in this archive, allowing anyone to modify the utility if they wish (or simply for the curious wishing to view my messy coding skills, or lack thereof ). Copyrights and Legalities ------------------------- NRPN Calculator v1.0 - (C)Copyright 2000, Rich ¯Weeds¯ Nagel - All rights reserved. The NRPN Calculator v1.0 (NRPNCalc.zip) and it's source code (NRPNCalc.bas) may be freely distributed in it's whole and unmodified form for any non-commercial usage, contained in it's original unmodified and unedited ZIP format archive, including all documents, text, and support files. Use the NRPN Calculator v1.0 at your own risk... I will not be held responsible for absolutely anything , and the like. Void where prohibited; not available in all states; removing factory seal will void your warranty; removing information tag from pillow is a violation of federal law; does not include tax, tag, and title; your results may vary; results not typical; supplies are limited; I'm not a real doctor, but I portray one on TV; etc... etc... . Version History --------------- v1.0 - First Release. (March 26, 2009) ENJOY! ------ Rich ¯Weeds¯ Nagel richnagel@earthlink.net http://www.richnagel.net