User:Eufalesio/How to build edos in DAWs: Difference between revisions

Eufalesio (talk | contribs)
No edit summary
Eufalesio (talk | contribs)
 
(2 intermediate revisions by the same user not shown)
Line 23: Line 23:
* Disadvantages: Only possible with 12n edos. Edos above 72 or 84 may become unwieldy or RAM-intensive, due to the abundance of many instrument instances.  
* Disadvantages: Only possible with 12n edos. Edos above 72 or 84 may become unwieldy or RAM-intensive, due to the abundance of many instrument instances.  


Good edos: [[24edo|24]], [[72edo|72]], [[84edo|84]] - Reasoning: Efficient approximations of JI / 24edo is an entry-level microtonal edo, great [[2.3.11 subgroup|2.3.11]] tuning.
Good edos: [[24edo|24]], [[72edo|72]], [[84edo|84]] - Reasoning: Efficient approximations of JI / 24edo is an entry-level microtonal edo, great [[2.3.11 subgroup|ila]] tuning.


== Edos >12 ==
== Edos >12 ==
Line 43: Line 43:


* Advantages: Allows use of very fine-grained edos, 10.<u>3</u> octave range, practical to compose in.
* Advantages: Allows use of very fine-grained edos, 10.<u>3</u> octave range, practical to compose in.
* Disadvantages: Harder to set up, less transposing-friendly because of wolf intervals.
* Disadvantages: Harder to set up, less transposing-friendly because of wolf intervals. Not usable live.


Good edos: [[41edo|41]], [[53edo|53]], [[94edo|94]], [[130edo|130]], [[159edo|159]] - Reasoning: Astounding fifths and/or Great 13-limit approximations.  
Good edos: [[41edo|41]], [[53edo|53]], [[94edo|94]], [[130edo|130]], [[159edo|159]] - Reasoning: Astounding fifths and/or Great 13-limit approximations.  


94edo is my favorite here, because it combines two top-tier edos into one great jack-of-all trades 23-odd-limit tuning. 159edo, [[Dawson Berry|Aura]]'s favorite, is also a top-tier edo, making an ''astonishingly good'' 2.3.11 tuning, and/or an overall a very good jack-of-all trades tuning, both of them with a graspable gamut.
94edo is my favorite here, because it combines two top-tier edos into one great jack-of-all trades 23-odd-limit tuning. 159edo, [[Dawson Berry|Aura]]'s favorite, is also a top-tier edo, making an ''astonishingly good'' ila tuning, and/or an overall a very good jack-of-all trades tuning, both of them with a graspable gamut.


=== Preset-scale deviations - MIDI and articulations ===
=== Preset-scale deviations - MIDI and articulations ===
Line 55: Line 55:


* Advantages: Near total freedom of pitch and tuning options, allows use of extremely fine edos, 10.<u>3</u> octave range, practical to compose in.
* Advantages: Near total freedom of pitch and tuning options, allows use of extremely fine edos, 10.<u>3</u> octave range, practical to compose in.
* Disadvantages: (Probably) Non-transposing friendly. Requires MPE or else instrument must be monophonic. Hard to setup, very technical, prone to error.
* Disadvantages: Non-transposing friendly. Requires MPE or else instrument must be monophonic. Hard to setup, very technical, prone to error, number of articulations x deviations must not exceed 255.


Good edos: [[217edo|217]], [[270edo|270]], [[311edo|311]], [[612edo|612]], [[1600edo|1600]], [[2460edo|2460]] - Reasoning: Very high [[consistency limit]] / ''Astonishing'' 2.3.5.7.11.13.19 approximations.   
Good edos: [[217edo|217]], [[270edo|270]], [[311edo|311]] - Reasoning: High-prime-limit support / Unbeatably accurate yazalathana.
 
Excessive edos: Anything beyond 311. Highly recommend you use superfine 12n edos for these ones. I don't go here.   


==== About edo usage and JI approximations (my experience) ====
==== About edo usage and JI approximations (my experience) ====
When you use edos beyond 159 or 217edo, the increasingly bigger gamut of pitches makes it harder to use finer and finer edos compared to the increase in precision, and consistency compared to '''distinct''' consistency becomes a better metric for what makes a fine-grained edo great; put another way: how many intervals are '''''wheat''''', and how many are '''''chaff'''''. I'll call this the '''wheat:chaff metric'''. After all, one reason to use edos instead of JI is having a quantized palette of pitches, instead of an unfathomable continuum.   
[[Septischismic]] is my temperament of temperaments, which supports {{Edos|12e, 41, 53, 94, 217, 270, 311}}, and of those my best choices are undoubtedly 94edo and 270edo. They have respectively, very good and extremely good 13-limit, and are even, so I can split the [[Pythagorean comma|poma]] in halves for easier navigation if I want to. 
 
I aim for 13-limit JI, and if you also aim for that, then these tunings are the best for you. Check the [[User:Eufalesio/Ultimate|Ultimate]] article for more info. Note, I don't care about essential tempering, VAOs, MOSes beyond the theoretical, or structural exploiting. I just don't want pain. 
 
If you still want to go even finer than that... then try 612edo and 2460; S-tier 12n edos, so you get transposing-friendly hyperfine microtonality. But, since their step sizes are smaller than the melodic JND, you can't tell notes edosteps apart. You are likely wasting your time here, however.
 
If you STILL want to go finer... you are surely wasting your time. Just use [[JI]] scales and forget about edos and temperaments altogether. Remember when I said you could ''theoretically'' compose in these insane edos? That's because PB resolution is going to be your main bottleneck. The other one is your paranoia. 
 
===== Vibe-coded Javascript script (V8) =====
I highly suggest you read the code. Claude does a wayyy better job at explaining things than I do.<syntaxhighlight lang="javascript" line="1">// ===========================================================================
//  EDO RETUNER V8 — generalized EDO retuner with polyphonic micro-deviation
// ===========================================================================
//
//  WHAT IT DOES
//  ------------
//  Maps the 12 keyboard degrees to their nearest approximations in any EDO
//  (circle-of-fifths "scale bend"), then adds two independent deviations:
//
//    1. MIDI-channel deviation : input channel N  -> (N - zeroCh) increments
//    2. Articulation deviation : Articulation CC#  -> (value - 64) increments
//
//  Each increment is worth either:
//    - a number of EDO steps ........ "MIDIchDev" / "ArtiDev" boxes, or
//    - an exact cent value .......... "...cents" boxes (float, 4 decimals).
//      If a cents box is 0 the EDO-step box is used; if non-zero, the cents
//      value wins (independent per deviation type).
//
//  FIFTH SIZE: the 12-degree scale bend is generated by stacking fifths.
//  By default the fifth is the EDO's best approximation of 3/2. Override it
//  with either box (chain: cents box wins, then steps box, then auto):
//    - "Fifth (EDOsteps, 0=auto)" .... fifth as a number of EDO steps
//    - "Fifth cents (0=steps)" ....... fifth as an exact cent value, e.g.
//      696.5784 for 1/4-comma meantone (this frees the 12 base degrees from
//      the EDO grid entirely; step-based deviations still move in EDO steps).
//
//  Every distinct tuning gets its own output channel from the pool; the
//  pitch-bend is always sent BEFORE the note.
//
//  IMPORTANT: "PB range (± cents)" must match the synth's pitch-bend range
//  (200 = ±2 semitones standard, 4800 = ±48 for most MPE synths). A mismatch
//  is the #1 cause of "this plugin detunes wrong".
//
//
//  NOTE ON THE CENTS BOXES: the parameter value has 0.0001-cent resolution
//  (double-click the value and type it in). Logic's on-screen display may
//  round to fewer decimals, but the exact value is used internally and traced
// to the console (with 4 decimals) whenever you change it.
//
// ===========================================================================


It is desirable for the wheat:chaff to be maximized, thus edos with high consistency limits and smaller gamut alongside lower '''distinct''' consistency limits are the best. Of course, relative error weighted by smaller primes is still a great metric. It follows from this, that the best edos are: [[12edo|12]], [[19edo|19]], [[22edo|22]], [[31edo|31]], [[41edo|41]], [[46edo|46]], [[53edo|53]], [[58edo|58]], [[72edo|72]], [[80edo|80]], [[84edo|84]], [[94edo|94]], [[118edo|118]], [[130edo|130]], [[159edo|159]], [[217edo|217]], [[311edo|311]]. Of those, I composed things in 12, 19, 22, 31, 41, 53, 72, 94, 159, 217. 
var NeedsTimingInfo = true;


You won't need edos finer than 94edo or 159edo if you're using acoustic sounds, or sounds with some sort of natural error or detune. 217 and 311edo are logical stopping points, because they temper a lot of useful intervals into each other (reducing chaff), and because 217edo has an edostep above the melodic [[Just-noticeable difference]] (311's is barely above, or probably isn't...). 270 is special because it approximates the 2.3.5.7.11.13.19 astonishingly well for its size. 1600edo has absolute error comparable to 270, and almost 43-odd-limit consistency. 
// ---------------------------------------------------------------------------
// State
// ---------------------------------------------------------------------------


If you still want to go even finer than that... then try 612edo and 2460; S-tier 12n edos, so you get transposing-friendly hyperfine microtonality. But, since their step sizes are smaller than the melodic JND, you can't tell notes edosteps apart.
// Output pool
var memberStart = 1, memberEnd = 16;


If you STILL want to go finer... you're wasting your time. Just use [[JI]] scales and forget about edos and temperaments altogether.
// If your controller sends the articulation CC on member channels themselves,
// set this to false (V7 behaviour kept).
var mpeMasterCCFeedsMembers = true;


===== Vibe-coded Javascript script =====
// Tuning parameters
<syntaxhighlight lang="javascript" line="1">// Generalized EDO via MIDI Channel base steps + CC micro offsets + per-note channel allocator (MPE-style)
var EDO = 311;
// ─────────────────────────────────────────────────────────────────────────────────────────────────────
var STEP_CENTS = 1200.0 / 311;
// Base step: (incomingChannel - (n+1)) * MidiChDeviationSplit
var fifthStepsOvr = 0;        // fifth override in EDO steps (0 = auto best fifth)
// Micro step (only if Split > 1):
var fifthCentsOvr = 0;        // fifth override in cents (0 = use steps box / auto)
//  Split=2: CC values 63,64,65 → -1,0,+1
var rootKeyPC = 0;
//   Split=3: CC values 62..66    → -2,-1,0,+1,+2
var refMidiNote = 69;
// Final step = base + micro; cents = step * (1200/EDO)
var refHz = 440.0;
//
var ch1Mode = 0;              // 0 Normal, 1 ScaleBendOnly, 2 Bypass, 3 Nullify
// Each NoteOn gets a dedicated member channel (2..16 by default). We send PB there, then delay NoteOn
var zeroCh = 8;               // channel at which channel-deviation = 0
// slightly so the bend lands first. NoteOff releases the channel and re-centers PB when idle.
var pbRangeCents = 200;        // synth pitch-bend range in ± cents


// ===== Defaults / State =====
// Deviation settings
var n = 8;                       // zero step at channel (n+1); handled IN channels 2..(2n-2)
var midiChDevSteps = 2;       // EDO steps per input-channel increment
var maxDeviation = 200;           // synth PB ±range in cents (±100=±1 st, ±200=±2 st)
var midiChDevCents = 0;       // cents per input-channel increment (0 = use steps)
var ccNumber = 27;               // articulation CC number
var artiDevSteps = 1;         // EDO steps per articulation-CC unit (value-64)
var EDO = 311;                   // generalized EDO
var artiDevCents = 0;         // cents per articulation-CC unit (0 = use steps)
var MidiChDeviationSplit = 2;    // 1=+1/chan, 2=+2/chan, 3=+3/chan (others = base-only)


var noteDelayMs = 2;             // ensure PB lands before NoteOn
// Behaviour
var memberStart = 2, memberEnd = 16; // allocator pool for per-note channels
var artiCC = 27;               // articulation CC# (avoid 64 and the panic CC)
var offsetScopeGlobal = true;     // Global-Last vs Per-Channel CC latching
var releaseHoldMs = 300;
var swallowCC = true;             // keep articulation CC from reaching the synth
var panicCCNumber = 83;
var panicThreshold = 63;
var offsetScopeGlobal = false; // false = Per-Channel, true = Global-Last
var swallowCC = true;         // swallow the articulation CC
var pbInPass = false;          // pass incoming pitch-bend through (default: swallow)
var otherCCToAll = false;      // forward other CCs to all pool channels
var noteDelayMs = 2;
var debug = false;
var debug = false;


// Derived
// Scale-bend
var STEP_CENTS = 1200.0 / EDO;
var scaleBendEnabled = true;
var gSteps = 0;
var scaleBend = Array(12).fill(0.0);
var masterOffsetCents = 0.0;
var FIFTH_OFFSETS = [0, -5, 2, -3, 4, -1, 6, 1, -4, 3, -2, 5];


// Micro offset memory
// Articulation-CC capture (units = ccValue - 64)
var globalMicro = 0;
var globalMicro = 0;
var microByInCh = Array(17).fill(0);   // 1..16
var masterMicro = 0;                          // last CC received on ch 1
var microPerInCh = Array(17).fill(0);
var microTouched = Array(17).fill(false);
var sustainDown = false;
 
// Monotonic clock (ms). Advanced every process block; never freezes.
var nowMs = 0;


// Allocator state
// Per-output-channel state
var channelBusy = Array(17).fill(0);   // active note count per member channel
var chAssignedPk = Array(17).fill("");        // tuning key owning the channel
var centered = Array(17).fill(true);   // whether PB is centered on that channel
var chActive = Array(17).fill(0);     // held + sustained note count
var noteMap = {};                     // key(inCh,pitch,id) -> { ch, id }
var chReleaseUntil = Array(17).fill(0);      // tail-guard deadline (ms)
var uniq = 1;
var chLastPB = Array(17).fill(999999);
var chTune = Array(17).fill(null);     // {pitch, steps, extraCents}
var pkToCh = {};                             // tuning key -> channel
var rrNext = 1;
 
// Active notes: "inCh:pitch" -> stack of {outCh, inCh, pitch, sustained}
var noteStacks = {};
 
// ---------------------------------------------------------------------------
// UI
// ---------------------------------------------------------------------------


// ===== UI =====
var PluginParameters = [
var PluginParameters = [
   // EDO numeric entry, now capped at 65535
   /* 0*/ { name:"EDO", type:"lin", minValue:1, maxValue:65535, numberOfSteps:65534, defaultValue:311 },
   { name:"EDO", type:"lin", minValue:1, maxValue:65535, numberOfSteps:65534, defaultValue:311 },
  /* 1*/ { name:"Fifth (EDOsteps, 0=auto)", type:"lin", minValue:0, maxValue:65535, numberOfSteps:65535, defaultValue:0 },
  /* 2*/ { name:"Fifth cents (0=steps)", type:"lin", minValue:0, maxValue:1200, numberOfSteps:12000000, defaultValue:0 },
  /* 3*/ { name:"Root key (PC)", type:"menu", valueStrings:["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"], defaultValue:0 },
  /* 4*/ { name:"Reference MIDI note", type:"lin", minValue:0, maxValue:127, numberOfSteps:127, defaultValue:69 },
  /* 5*/ { name:"Reference Hz", type:"float", minValue:1, maxValue:20000, numberOfSteps:19999, defaultValue:440 },
  /* 6*/ { name:"Ch 1 treatment", type:"menu", valueStrings:["Normal","ScaleBendOnly","Bypass (12edo)","Nullify"], defaultValue:0 },
  /* 7*/ { name:"Channel at which step=0 (n)", type:"lin", minValue:1, maxValue:16, numberOfSteps:15, defaultValue:8 },
  /* 8*/ { name:"PB range (± cents)", type:"float", minValue:1, maxValue:4800, numberOfSteps:4799, defaultValue:200 },
  /* 9*/ { name:"Articulation CC#", type:"lin", minValue:0, maxValue:127, numberOfSteps:127, defaultValue:27 },
  /*10*/ { name:"MIDIchDev (EDOsteps per ch)", type:"lin", minValue:0, maxValue:63, numberOfSteps:63, defaultValue:2 },
  /*11*/ { name:"MIDIchDev cents (0=steps)", type:"lin", minValue:-100, maxValue:100, numberOfSteps:2000000, defaultValue:0 },
  /*12*/ { name:"ArtiDev (EDOsteps per CCstep)", type:"lin", minValue:0, maxValue:63, numberOfSteps:63, defaultValue:1 },
  /*13*/ { name:"ArtiDev cents (0=steps)", type:"lin", minValue:-100, maxValue:100, numberOfSteps:2000000, defaultValue:0 },
  /*14*/ { name:"Release Hold (ms)", type:"lin", minValue:0, maxValue:20000, numberOfSteps:20000, defaultValue:300 },
  /*15*/ { name:"Panic CC#", type:"lin", minValue:0, maxValue:127, numberOfSteps:127, defaultValue:83 },
  /*16*/ { name:"Panic thresh (>)", type:"lin", minValue:0, maxValue:127, numberOfSteps:127, defaultValue:63 },
  /*17*/ { name:"PANIC (kill all)", type:"menu", valueStrings:["Off","TRIGGER"], defaultValue:0 },
  /*18*/ { name:"Offset scope", type:"menu", valueStrings:["Per-Channel","Global-Last"], defaultValue:0 },
  /*19*/ { name:"Swallow Arti CC", type:"menu", valueStrings:["No","Yes"], defaultValue:1 },
  /*20*/ { name:"Incoming PitchBend", type:"menu", valueStrings:["Swallow","Pass"], defaultValue:0 },
  /*21*/ { name:"Other CCs", type:"menu", valueStrings:["Pass unchanged","To all out ch"], defaultValue:0 },
  /*22*/ { name:"NoteOn Delay (ms)", type:"lin", minValue:0, maxValue:10, numberOfSteps:10, defaultValue:2 },
  /*23*/ { name:"Debug Trace", type:"menu", valueStrings:["Off","On"], defaultValue:0 },
  /*24*/ { name:"Output ch start", type:"lin", minValue:1, maxValue:16, numberOfSteps:15, defaultValue:1 },
   /*25*/ { name:"Output ch end", type:"lin", minValue:1, maxValue:16, numberOfSteps:15, defaultValue:16 },
  /*26*/ { name:"Scale-bend or 12EDO", type:"menu", valueStrings:["On","Off"], defaultValue:0 }
];
 
// Snap to exactly 4 decimals; kill float fuzz around zero.
function snap4(v){
  v = Math.round(v * 1e4) / 1e4;
  return (v > -5e-5 && v < 5e-5) ? 0 : v;
}
 
function ParameterChanged(p, v){
  switch (p){
    case 0:  EDO = Math.max(1, Math.min(65535, Math.floor(v)));
            STEP_CENTS = 1200.0 / EDO; rebuildAndRetune(); break;
    case 1:  fifthStepsOvr = Math.max(0, Math.min(65535, Math.floor(v)));
            rebuildAndRetune(); break;
    case 2:  fifthCentsOvr = snap4(v);
            Trace("Fifth cents = " + fifthCentsOvr.toFixed(4) +
                  (fifthCentsOvr === 0 ? "  (using steps/auto)" : ""));
            rebuildAndRetune(); break;
    case 3:  rootKeyPC = (v|0) % 12; rebuildAndRetune(); break;
    case 4:  refMidiNote = Math.max(0, Math.min(127, v|0)); rebuildAndRetune(); break;
    case 5:  refHz = Math.max(1.0, v); rebuildAndRetune(); break;
    case 6:  ch1Mode = (v|0) & 3; break;
    case 7:  zeroCh = Math.max(1, Math.min(16, v|0)); break;
    case 8:  pbRangeCents = Math.max(1, v); rebuildAndRetune(); break;
    case 9:  artiCC = Math.floor(v); break;
    case 10: midiChDevSteps = Math.max(0, Math.min(63, Math.floor(v))); break;
    case 11: midiChDevCents = snap4(v);
            Trace("MIDIchDev cents = " + midiChDevCents.toFixed(4) +
                  (midiChDevCents === 0 ? "  (using EDO steps)" : "")); break;
    case 12: artiDevSteps = Math.max(0, Math.min(63, Math.floor(v))); break;
    case 13: artiDevCents = snap4(v);
            Trace("ArtiDev cents = " + artiDevCents.toFixed(4) +
                  (artiDevCents === 0 ? "  (using EDO steps)" : "")); break;
    case 14: releaseHoldMs = Math.max(0, Math.min(20000, Math.floor(v))); break;
    case 15: panicCCNumber = Math.max(0, Math.min(127, v|0)); break;
    case 16: panicThreshold = Math.max(0, Math.min(127, v|0)); break;
    case 17: if ((v|0) === 1){
              panicAll();
              if (typeof SetParameter === "function") SetParameter(17, 0);
            } break;
    case 18: offsetScopeGlobal = (v|0) === 1; break;
    case 19: swallowCC = (v|0) === 1; break;
    case 20: pbInPass = (v|0) === 1; break;
    case 21: otherCCToAll = (v|0) === 1; break;
    case 22: noteDelayMs = Math.max(0, Math.min(10, v|0)); break;
    case 23: debug = (v|0) === 1; break;
    case 24: setOutputPool(v|0, memberEnd); allocatorReset(); rebuildAndRetune(); break;
    case 25: setOutputPool(memberStart, v|0); allocatorReset(); rebuildAndRetune(); break;
    case 26: scaleBendEnabled = ((v|0) === 0); rebuildAndRetune(); break;
  }
}
 
// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------
 
function T(s){
  if (!debug) return;
  s = String(s);
  if (s.length > 120) s = s.slice(0, 120);
  Trace(s);
}
function safeCh(ch){ ch = (ch|0) || 1; return ch < 1 ? 1 : (ch > 16 ? 16 : ch); }
function mod(a, m){ var r = a % m; return r < 0 ? r + m : r; }
function log2(x){ return Math.log(x) / Math.log(2.0); }
function degreeForPitch(pitch){ return mod((pitch|0) - rootKeyPC, 12); }
 
function setOutputPool(a, b){
  a = safeCh(a); b = safeCh(b);
  if (a > b){ var t = a; a = b; b = t; }
  memberStart = a; memberEnd = b;
  if (rrNext < memberStart || rrNext > memberEnd) rrNext = memberStart;
  T("Pool " + memberStart + ".." + memberEnd);
}
function nextCh(ch){
  ch++; return (ch > memberEnd || ch < memberStart) ? memberStart : ch;
}
 
function centsToPB(c){
  var v = (c / pbRangeCents) * 8191.0;
  if (v > 8191) v = 8191; else if (v < -8192) v = -8192;
  return Math.round(v);
}
function sendPB(ch, value){
  var pb = new PitchBend();
  pb.channel = safeCh(ch); pb.value = value;
  pb.send();
  chLastPB[ch] = value;
}
function sendCC(ch, num, val){
  var cc = new ControlChange();
  cc.channel = safeCh(ch); cc.number = num|0; cc.value = val|0;
  cc.send();
}
// All forwarded notes share the same delay so on/off ordering is preserved.
function sendNote(ev){
  if (noteDelayMs > 0) ev.sendAfterMilliseconds(noteDelayMs); else ev.send();
}
function sendNoteOff(ch, pitch, vel){
  var off = new NoteOff();
  off.channel = safeCh(ch); off.pitch = pitch & 0x7F; off.velocity = (vel|0) || 64;
  sendNote(off);
}


  { name:"Channel at which step=0 (n)", type:"lin", minValue:3, maxValue:9, numberOfSteps:6, defaultValue:8 },
// ---------------------------------------------------------------------------
  { name:"PB range (± cents)", type:"float", minValue:1, maxValue:4800, numberOfSteps:4799, defaultValue:200 },
// Scale bend
  { name:"Articulation CC#", type:"lin", minValue:0, maxValue:127, numberOfSteps:127, defaultValue:27 },
// ---------------------------------------------------------------------------


   // MidiChDeviationSplit slider 0..63 (1/2/3 keep special CC semantics; others = base-only)
function rebuildScale(){
   { name:"MidiChDeviationSplit", type:"lin", minValue:0, maxValue:63, numberOfSteps:63, defaultValue:2 },
  STEP_CENTS = 1200.0 / EDO;
  gSteps = Math.round(EDO * (log2(3.0) - 1.0));  // best fifth in this EDO
   // Fifth resolution chain: cents box wins, then steps box, then auto.
  var fifthCents;
  if (fifthCentsOvr !== 0)      fifthCents = fifthCentsOvr;
  else if (fifthStepsOvr > 0)  fifthCents = fifthStepsOvr * STEP_CENTS;
  else                          fifthCents = gSteps * STEP_CENTS;
  var rawBend = Array(12);
  for (var i = 0; i < 12; i++){
    rawBend[i] = mod(FIFTH_OFFSETS[i] * fifthCents, 1200.0) - i * 100.0;
  }
  var stdHz = 440.0 * Math.pow(2.0, (refMidiNote - 69) / 12.0);
  masterOffsetCents = 1200.0 * log2(refHz / stdHz);
  var anchor = rawBend[mod((refMidiNote|0) - rootKeyPC, 12)];
  for (var k = 0; k < 12; k++) scaleBend[k] = rawBend[k] - anchor;
   T("Scale EDO=" + EDO + " fifth=" + fifthCents.toFixed(4) + "c");
}


  { name:"Offset scope", type:"menu", valueStrings:["Per-Channel","Global-Last"], defaultValue:1 },
function tuningCents(pitch, steps, extraCents){
   { name:"Swallow CC to synth", type:"menu", valueStrings:["No","Yes"], defaultValue:1 },
   var sb = scaleBendEnabled ? scaleBend[degreeForPitch(pitch)] : 0.0;
  { name:"Member Ch Start", type:"lin", minValue:2, maxValue:16, numberOfSteps:14, defaultValue:2 },
   return masterOffsetCents + sb + steps * STEP_CENTS + extraCents;
  { name:"Member Ch End", type:"lin", minValue:2, maxValue:16, numberOfSteps:14, defaultValue:16 },
}
  { name:"NoteOn Delay (ms)", type:"lin", minValue:0, maxValue:10, numberOfSteps:10, defaultValue:2 },
   { name:"Debug Trace", type:"menu", valueStrings:["Off","On"], defaultValue:0 }
];


function ParameterChanged(p,v){
// Retune channels that still own a tuning (held notes AND release tails).
   if (p===0){
function rebuildAndRetune(){
    // EDO clamp 1..65535; keep as integer
   rebuildScale();
    var EDO_MAX = 65535;
  for (var ch = memberStart; ch <= memberEnd; ch++){
     var iv = Math.floor(v);
     var tn = chTune[ch];
     if (iv < 1) iv = 1;
     if (chAssignedPk[ch] && tn){
    if (iv > EDO_MAX) iv = EDO_MAX;
      var pb = centsToPB(tuningCents(tn.pitch, tn.steps, tn.extraCents));
    EDO = iv;
      if (chLastPB[ch] !== pb) sendPB(ch, pb);
     STEP_CENTS = 1200.0 / EDO;
     }
   }
   }
   else if (p===1){ n = Math.floor(v); }
}
   else if (p===2){ maxDeviation = Math.max(1, v); }
 
   else if (p===3){ ccNumber = Math.floor(v); }
// ---------------------------------------------------------------------------
   else if (p===4){
// Allocator — always succeeds, never sends CC120
     // Split 0..63 integer; only 1/2/3 have micro-CC semantics; others = base-only (micro=0)
// ---------------------------------------------------------------------------
    var sv = Math.floor(v);
 
    if (sv < 0) sv = 0;
function claim(ch, pk){
     if (sv > 63) sv = 63;
  var old = chAssignedPk[ch];
    MidiChDeviationSplit = sv;
   if (old && old !== pk && pkToCh[old] === ch) delete pkToCh[old];
   chAssignedPk[ch] = pk;
  pkToCh[pk] = ch;
}
 
// Kick every note off a channel with targeted NoteOffs (last-resort steal).
function stealChannel(ch){
  var pedal = sustainDown;
   if (pedal) sendCC(ch, 64, 0);     // lift sustain so the NoteOffs bite
   for (var sk in noteStacks){
     var stack = noteStacks[sk];
    for (var i = stack.length - 1; i >= 0; i--){
      if (stack[i].outCh === ch){
        sendNoteOff(ch, stack[i].pitch, 64);
        stack.splice(i, 1);
      }
    }
     if (stack.length === 0) delete noteStacks[sk];
   }
   }
   else if (p===5){ offsetScopeGlobal = (v|0)===1; }
   if (pedal) sendCC(ch, 64, 127);
  else if (p===6){ swallowCC = (v|0)===1; }
   chActive[ch] = 0;
  else if (p===7){ memberStart = Math.max(2, Math.min(16, v|0)); }
   chReleaseUntil[ch] = nowMs;
   else if (p===8){ memberEnd  = Math.max(2, Math.min(16, v|0)); }
   T("STEAL ch" + ch);
  else if (p===9){ noteDelayMs = v|0; }
   else if (p===10){ debug = (v|0)===1; }
   if (memberEnd < memberStart) memberEnd = memberStart;
}
}


// ===== Helpers =====
function allocChannel(pk){
function safeCh(ch){ ch=(ch|0)||1; if (ch<1) ch=1; if (ch>16) ch=16; return ch; }
  var hit = pkToCh[pk];
  if (hit) return hit;                           // same tuning -> same channel
 
  var span = memberEnd - memberStart + 1, ch, i;


function baseStepFromInChannel(ch){
  // 1. idle channel past its release tail
   // Zero at (n+1); channels 2..(2n-2) are the intended control lanes
  ch = rrNext;
   return (ch - (n + 1)) * MidiChDeviationSplit;
  for (i = 0; i < span; i++){
    if (chActive[ch] === 0 && nowMs >= chReleaseUntil[ch]){
      claim(ch, pk); rrNext = nextCh(ch); return ch;
    }
    ch = nextCh(ch);
  }
   // 2. idle channel still in its tail — take the oldest (tail gets bent,
  //    which beats refusing to play or killing sound)
  var best = 0, bestT = Infinity;
  for (ch = memberStart; ch <= memberEnd; ch++){
    if (chActive[ch] === 0 && chReleaseUntil[ch] < bestT){
      bestT = chReleaseUntil[ch]; best = ch;
    }
  }
  if (best){ claim(best, pk); rrNext = nextCh(best); return best; }
 
  // 3. every channel is sounding: steal round-robin with clean NoteOffs
  ch = rrNext;
  stealChannel(ch);
   claim(ch, pk);
  rrNext = nextCh(ch);
  return ch;
}
}


// CC micro decoding per split setting (unchanged semantics)
// ---------------------------------------------------------------------------
function microFromCC(val){
// Reset / panic
  // Split==1: CC ignored (base-only), as designed
// ---------------------------------------------------------------------------
  if (MidiChDeviationSplit === 1) return 0;


   // General rule for all other Split values:
function clearTracking(){
   // interpret CC around 64 as a signed offset in EDO steps.
  pkToCh = {}; noteStacks = {}; rrNext = memberStart;
   // CC 0..127 → micro −64..+63 (clamped).
   for (var ch = 1; ch <= 16; ch++){
   var m = (val|0) - 64;
    chAssignedPk[ch] = ""; chActive[ch] = 0;
   if (m < -64) m = -64;
    chReleaseUntil[ch] = nowMs; chLastPB[ch] = 0; chTune[ch] = null;
   if (m >  63) m = 63;
   }
   return m;
}
function allocatorReset(){
   for (var ch = 1; ch <= 16; ch++){ sendCC(ch, 123, 0); sendPB(ch, 0); }
  clearTracking();
  T("ALLOC RESET");
}
function panicAll(){
   for (var ch = 1; ch <= 16; ch++){
    sendCC(ch, 120, 0); sendCC(ch, 123, 0); sendPB(ch, 0);
  }
   clearTracking();
  globalMicro = 0; masterMicro = 0; sustainDown = false;
   for (var i = 1; i <= 16; i++){ microPerInCh[i] = 0; microTouched[i] = false; }
   T("PANIC ALL");
}
}


function noteEnded(ch){
  chActive[ch] = Math.max(0, chActive[ch] - 1);
  if (chActive[ch] === 0) chReleaseUntil[ch] = nowMs + releaseHoldMs;
}


function centsToPB(c){
function flushSustained(){
   var v = (c / maxDeviation) * 8191.0;
   for (var sk in noteStacks){
  if (v > 8191) v = 8191;
    var stack = noteStacks[sk];
  if (v < -8192) v = -8192;
    for (var i = stack.length - 1; i >= 0; i--){
   return Math.round(v);
      if (stack[i].sustained){
        noteEnded(stack[i].outCh);
        stack.splice(i, 1);
      }
    }
    if (stack.length === 0) delete noteStacks[sk];
   }
  T("SustainUp: flushed");
}
}


function sendPB(ch, value){
// ---------------------------------------------------------------------------
   var pb = new PitchBend;
// Clock + idle housekeeping (runs every process block, even when stopped)
   pb.channel = safeCh(ch);
// ---------------------------------------------------------------------------
   pb.value = value;
 
   pb.send();
function ProcessMIDI(){
  centered[ch] = (value === 0);
   var t = (typeof GetTimingInfo === "function") ? GetTimingInfo() : null;
  var adv = 0;
   if (t && t.tempo > 0 && t.blockEndBeat > t.blockStartBeat)
    adv = (t.blockEndBeat - t.blockStartBeat) * 60000.0 / t.tempo;
   if (!(adv > 0) || adv > 1000) adv = 5.8;  // stopped/cycle-jump fallback (~256 frames @ 44.1k)
  nowMs += adv;
 
   // Re-center idle channels whose tail has died, and release their tuning.
  for (var ch = memberStart; ch <= memberEnd; ch++){
    if (chActive[ch] === 0 && nowMs >= chReleaseUntil[ch]){
      if (chAssignedPk[ch]){
        if (pkToCh[chAssignedPk[ch]] === ch) delete pkToCh[chAssignedPk[ch]];
        chAssignedPk[ch] = ""; chTune[ch] = null;
      }
      if (chLastPB[ch] !== 0) sendPB(ch, 0);
    }
  }
}
}


function key(inCh, pitch, id){ return ((safeCh(inCh)&0xFF)<<16) | ((pitch&0x7F)<<8) | (id&0xFF); }
// ---------------------------------------------------------------------------
// Note handling
// ---------------------------------------------------------------------------


function allocChannel(){
function handleNoteOn(e){
   for (var ch=memberStart; ch<=memberEnd; ch++){
   var inCh = safeCh(e.channel);
     if (channelBusy[ch]===0) return ch;
  if (inCh === 1){
     if (ch1Mode === 3) return;                // Nullify
    if (ch1Mode === 2){ e.send(); return; }    // Bypass (12edo)
   }
   }
   var best = memberStart, min = channelBusy[memberStart];
   var pitch = e.pitch | 0;
  for (var c=memberStart+1; c<=memberEnd; c++){
 
     if (channelBusy[c] < min){ min = channelBusy[c]; best = c; }
  // Micro units captured at the exact moment the note arrives
  var micro;
  if (offsetScopeGlobal){
    micro = globalMicro;
  } else {
    micro = microPerInCh[inCh] || 0;
    if (inCh !== 1 && mpeMasterCCFeedsMembers && !microTouched[inCh])
      micro = masterMicro;                     // MPE master-channel fallback
  }
 
  var steps = 0, extraCents = 0;
  if (!(inCh === 1 && ch1Mode === 1)){        // ScaleBendOnly zeroes offsets
    if (midiChDevCents !== 0) extraCents += (inCh - zeroCh) * midiChDevCents;
    else                      steps      += (inCh - zeroCh) * midiChDevSteps;
     if (artiDevCents !== 0)   extraCents += micro * artiDevCents;
    else                      steps      += micro * artiDevSteps;
   }
   }
   return best;
 
   var pk  = inCh + ":" + pitch + ":" + steps + ":" + extraCents.toFixed(4);
  var tgt = allocChannel(pk);
 
  var cents = tuningCents(pitch, steps, extraCents);
  var pb = centsToPB(cents);
  chTune[tgt] = { pitch: pitch, steps: steps, extraCents: extraCents };
 
  T("NOTE in=" + inCh + " out=" + tgt + " p=" + pitch + " micro=" + micro +
    " cents=" + cents.toFixed(3) + " pb=" + pb);
 
  sendPB(tgt, pb);                            // always — never trust caches
  var on = new NoteOn(e);
  on.channel = tgt;
  sendNote(on);
 
  chActive[tgt]++;
  var sk = inCh + ":" + pitch;
  if (!noteStacks[sk]) noteStacks[sk] = [];
  noteStacks[sk].push({ outCh: tgt, inCh: inCh, pitch: pitch, sustained: false });
}
}


// ===== Main =====
function handleNoteOff(e){
function HandleMIDI(e){
  var inCh = safeCh(e.channel), pitch = e.pitch | 0;
  var sk = inCh + ":" + pitch;
  var stack = noteStacks[sk];


   if (e instanceof ControlChange && e.number === ccNumber){
   if (stack && stack.length){
    var ch = safeCh(e.channel);
    // most recent entry that hasn't been released yet
     var micro = microFromCC(e.value|0);
    var idx = -1;
     microByInCh[ch] = micro;
    for (var i = stack.length - 1; i >= 0; i--){
     if (offsetScopeGlobal) globalMicro = micro;
      if (!stack[i].sustained){ idx = i; break; }
     if (debug) Trace("CC"+ccNumber+" ch "+ch+" val="+e.value+" → micro "+micro+(offsetScopeGlobal?" (GLOBAL)":""));
     }
     if (swallowCC) return;
    if (idx < 0){                              // duplicate release while pedal down
     e.send();
      sendNoteOff(stack[stack.length - 1].outCh, pitch, e.velocity);
      return;
     }
    var ent = stack[idx];
     sendNoteOff(ent.outCh, pitch, e.velocity);
     if (sustainDown){
      ent.sustained = true;                    // synth holds it via its own CC64
      return;
    }
    stack.splice(idx, 1);
     if (stack.length === 0) delete noteStacks[sk];
     noteEnded(ent.outCh);
     return;
     return;
   }
   }


   if (e instanceof NoteOn){
   if (inCh === 1){
     var inCh = safeCh(e.channel);
     if (ch1Mode === 3) return;
    var base = baseStepFromInChannel(inCh);
    if (ch1Mode === 2){ e.send(); return; }
     var micro = offsetScopeGlobal ? globalMicro : (microByInCh[inCh] || 0);
  }
     var step = base + micro;
  e.send();
     var cents = step * STEP_CENTS;
}
    var pb = centsToPB(cents);
 
// ---------------------------------------------------------------------------
// Main event entry
// ---------------------------------------------------------------------------
 
function HandleMIDI(e){
  if (e instanceof ControlChange){
     var num = e.number | 0, val = e.value | 0;
 
     // Panic CC has priority over everything (incl. an artiCC set to the same #)
     if (num === panicCCNumber){
      if (val > panicThreshold){ allocatorReset(); return; }
      e.send(); return;
    }


     var tgt = allocChannel();
     if (num === 64){                            // sustain -> every pool channel
      var was = sustainDown;
      sustainDown = (val >= 64);
      for (var ch = memberStart; ch <= memberEnd; ch++) sendCC(ch, 64, val);
      if (was && !sustainDown) flushSustained();
      return;
    }


     if (debug){
     if (num === artiCC){                       // capture only, no live retune
       Trace("Note "+e.pitch+" inCh "+inCh+" base="+base+" micro="+micro+" step="+step+
       var inCh = safeCh(e.channel);
            " → "+cents.toExponential(5)+"¢  allocCh="+tgt+" PB="+pb);
      var micro = val - 64;                    // -64 .. +63 units
      microPerInCh[inCh] = micro;
      microTouched[inCh] = true;
      if (inCh === 1) masterMicro = micro;
      if (offsetScopeGlobal) globalMicro = micro;
      T("CC" + artiCC + " ch" + inCh + " m=" + micro);
      if (!swallowCC) e.send();
      return;
     }
     }


     sendPB(tgt, pb);
     if (otherCCToAll){
      for (var c2 = memberStart; c2 <= memberEnd; c2++){
        var cp = new ControlChange(e); cp.channel = c2; cp.send();
      }
      return;
    }
    e.send(); return;
  }


     var on = new NoteOn(e);
  if (e instanceof NoteOn){
     on.channel = tgt;
     if ((e.velocity | 0) === 0){ handleNoteOff(new NoteOff(e)); return; }
    if (noteDelayMs>0) on.sendAfterMilliseconds(noteDelayMs);
     handleNoteOn(e); return;
    else on.send();
  }
  if (e instanceof NoteOff){ handleNoteOff(e); return; }


    channelBusy[tgt]++;
  // Incoming pitch-bend would fight the per-channel tuning: swallow by default.
    var id = (uniq = (uniq+1)&0xFF) || 1;
  if (e instanceof PitchBend){
     noteMap[key(inCh, e.pitch, id)] = { ch:tgt, id:id };
     if (pbInPass) e.send();
     return;
     return;
   }
   }


   if (e instanceof NoteOff){
  // Route pressure to the channel(s) actually playing that input's notes.
     var inCh = safeCh(e.channel);
   if (e instanceof ChannelPressure){
    var foundKey = null, info = null, bestId = -1;
     var src = safeCh(e.channel), sent = {};
     for (var k in noteMap){
     for (var sk in noteStacks){
       var packed = k|0, kCh = (packed>>16)&0xFF, kPitch = (packed>>8)&0x7F, val = noteMap[k];
       var st = noteStacks[sk];
       if (kCh===inCh && kPitch===(e.pitch|0) && val.id>bestId){ bestId = val.id; foundKey=k; info=val; }
       for (var j = 0; j < st.length; j++){
        if (st[j].inCh === src && !sent[st[j].outCh]){
          sent[st[j].outCh] = 1;
          var cpr = new ChannelPressure(e); cpr.channel = st[j].outCh; cpr.send();
        }
      }
     }
     }
 
    return;
     var off = new NoteOff(e);
  }
     if (info){
  if (e instanceof PolyPressure){
       off.channel = info.ch;
     var ps = noteStacks[safeCh(e.channel) + ":" + (e.pitch | 0)];
      off.send();
     if (ps && ps.length){
      channelBusy[info.ch] = Math.max(0, channelBusy[info.ch]-1);
       var pp = new PolyPressure(e); pp.channel = ps[ps.length - 1].outCh; pp.send();
      if (channelBusy[info.ch]===0 && !centered[info.ch]) sendPB(info.ch, 0);
      delete noteMap[foundKey];
    } else {
      off.channel = inCh;
      off.send();
     }
     }
     return;
     return;
Line 275: Line 657:
}
}


// Called by Logic on bypass toggle / transport changes.
function Reset(){
function Reset(){
   for (var ch=1; ch<=16; ch++){
   panicAll();
    channelBusy[ch]=0; centered[ch]=false; sendPB(ch,0);
   rebuildAndRetune();
    microByInCh[ch]=0;
}
   }
  globalMicro=0; noteMap={}; uniq=1;
  Trace("Reset: allocator "+memberStart+".."+memberEnd+" cleared; PB centered.");
}</syntaxhighlight>'''NOTE''': You need to tune your 12 notes to a scale supported by your edo. I recommend 12edo or Pyth-like 5L 7s 6|5 if you're not using a 12n edo. I use MTS-ESP to do this globally, but you could do it inside the plugin itself.


Parameters:
// init
rebuildScale();
allocatorReset();
</syntaxhighlight>


==== Parameters: ====
* EDO: Obviously, the edo you'll be working with.
* EDO: Obviously, the edo you'll be working with.
* Fifth (EDOsteps, 0=auto): If you want to use non-patent val fifths, or your custom fifths. 0 is for patent val fifth.
* Fifth cents (0=steps): Any value that is not 0 will force this number of cents to be your fifth.
* Root key: modes of 5L 7s 6|5 (built from the best fifth), transposing from C
* Reference MIDI note, reference Hz: Reference pitch at NOTE = FREQUENCY. Default 69 = 440, but you can make it anything.
* Channel 1 treatment:
** Normal: CH1 acts normally as one midiCH deviation step.
** ScaleBendOnly: CH1 Matches the 5L 7s of the tuning, but ignores midiCH and microdeviations.
** Bypass (12edo): CH1 notes ignore the script completely.
** Nullify: CH1 notes are killed.
* Channel at which step=0 (n): from 3 to 9. The midpoint of your edostep deviations. Channel 1 is not used here. If you choose 5, then your edosteps will be 2:-3, 3:-2, 4:-1, 5:0, 6:+1, 7:+2, 8:+3, so the amount of deviations you have at your disposal is 2n+1. Note that no matter the input channel (the one in your piano roll), it will be sent as Channel 1, or allocated to another channel for MPE.
* Channel at which step=0 (n): from 3 to 9. The midpoint of your edostep deviations. Channel 1 is not used here. If you choose 5, then your edosteps will be 2:-3, 3:-2, 4:-1, 5:0, 6:+1, 7:+2, 8:+3, so the amount of deviations you have at your disposal is 2n+1. Note that no matter the input channel (the one in your piano roll), it will be sent as Channel 1, or allocated to another channel for MPE.
* PB range (± cents): The range of your plugin's PB. Recommend values like 200 or 1200. For MPE, it is often 4800, but if you're using very fine grained edos, you might want to bring this down to get more resolution.
* PB range (± cents): The range of your plugin's PB. Recommend values like 200 or 1200. For MPE, it is often 4800, but if you're using very fine grained edos, you might want to bring this down to get more resolution.
* Articulation CC#: The CC at which articulations will be sent, you can change it if it causes conflicts with your plugin, but then you need to change all the articulation set's CC. Default 27, Not recommended to change it.
* Articulation CC#: The CC at which articulations will be sent, you can change it if it causes conflicts with your plugin, but then you need to change all the articulation set's CC. Default 27, Not recommended to change it.
* MidiChDeviationSplit: Multiplies the edosteps deviations of the MIDI channels by this number. at n=9, and this=16, then 10:+16, 8:-16, 11:+32, 7:-32... etc. If you are using HUGE edos (or edos with sharpness higher than 15), you will need to set this to a value bigger than 1. If you set this to 1, you can use it for smaller edos without duplicating instances '''(Preset-scale deviations - MIDI channels only, 12n)'''
* MidiChDev: The number of edosteps added for each going up one MidiCh.
* Offset scope: I don't know what this is. I set it to Global-Last, and I assume it has something to do with the MPE. But it works.
* MidiChDev cents (0=steps): Any value that is not 0 will force this number of cents to be your MidiChDev alteration.
* Swallow CC to synth: I suppose this makes the synth recieve CC27...?
* ArtiDev (EDOsteps per CCstep): Number of edosteps that each artidev adds (see below)
* Member Ch Start: The lowest working channel for MPE.
* ArtiDev cents (0=steps): Any value that is not 0 will force this number of cents to be your ArtiDev alteration.
* Member Ch End: The highest working channel for MPE.
* Release Hold (ms): The duration that the MPE allocator holds each output channel's pitch after NoteOff messages. Recommended it be long for sounds with a long tail.
* Panic CC#: Default 83. Exceeding {Panic Threshold} in this will kill all MIDI events, you can use this if the script behaves erratically.
* Panic thresh (>): CC# above higher than 63 will kill all notes once. Button-style, holding at 127 doesn't kill continuously.
* PANIC (kill all): Kill all notes yourself, now.
* Offset scope: I don't know exactly what this does.
* Swallow Arti CC: Ignore CC27 (Y/N)
* Incoming pitch bend: Ignore PB (Y/N)
* NoteOn Delay (ms): Set higher than 0 if the notes aren't being detuned correctly. Obviously, don't set it too high. Default 2.
* NoteOn Delay (ms): Set higher than 0 if the notes aren't being detuned correctly. Obviously, don't set it too high. Default 2.
* Debug Trace: If something is not working, check this box to see debugging output in the Scripter.
* Debug Trace: If something is not working, check this box to see debugging output in the Scripter.
* Output Ch start: For the Midi allocator to send MPE.
* Output Ch end: The difference between this and the above is your pitch-class polyphony.
* Scale-bend or 12edo: Keep this on. I forgot to delete this.


===== .plist Articulation set =====
===== .plist Articulation set (alternate) =====
<syntaxhighlight lang="xml" line="1">
<syntaxhighlight lang="xml" line="1">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
Line 306: Line 707:
<key>Articulations</key>
<key>Articulations</key>
<array>
<array>
<dict><key>ArticulationID</key><integer>1</integer><key>ID</key><integer>1001</integer><key>Name</key><string>-64</string><key>Output</key><array><dict><key>MB1</key><integer>27</integer><key>Status</key><string>Controller</string><key>ValueLow</key><integer>0</integer></dict></array></dict>
<dict>
 
<key>ArticulationID</key>
<integer>1</integer>
<key>ID</key>
<integer>1001</integer>
<key>Name</key>
<string>0</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>64</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>2</integer>
<key>ID</key>
<integer>1002</integer>
<key>Name</key>
<string>+1</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>65</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>3</integer>
<key>ID</key>
<integer>1003</integer>
<key>Name</key>
<string>-1</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>63</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>4</integer>
<key>ID</key>
<integer>1004</integer>
<key>Name</key>
<string>+2</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>66</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>5</integer>
<key>ID</key>
<integer>1005</integer>
<key>Name</key>
<string>-2</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>62</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>6</integer>
<key>ID</key>
<integer>1006</integer>
<key>Name</key>
<string>+3</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>67</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>7</integer>
<key>ID</key>
<integer>1007</integer>
<key>Name</key>
<string>-3</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>61</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>8</integer>
<key>ID</key>
<integer>1008</integer>
<key>Name</key>
<string>+4</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>68</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>9</integer>
<key>ID</key>
<integer>1009</integer>
<key>Name</key>
<string>-4</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>60</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>10</integer>
<key>ID</key>
<integer>1010</integer>
<key>Name</key>
<string>+5</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>69</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>11</integer>
<key>ID</key>
<integer>1011</integer>
<key>Name</key>
<string>-5</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>59</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>12</integer>
<key>ID</key>
<integer>1012</integer>
<key>Name</key>
<string>+6</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>70</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>13</integer>
<key>ID</key>
<integer>1013</integer>
<key>Name</key>
<string>-6</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>58</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>14</integer>
<key>ID</key>
<integer>1014</integer>
<key>Name</key>
<string>+7</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
<integer>71</integer>
</dict>
</array>
</dict>
<dict>
<key>ArticulationID</key>
<integer>15</integer>
<key>ID</key>
<integer>1015</integer>
<key>Name</key>
<string>-7</string>
<key>Output</key>
<array>
<dict>
<key>MB1</key>
<integer>27</integer>
<key>Status</key>
<string>Controller</string>
<key>ValueLow</key>
</array>
</array>
<key>Name</key>
<key>Name</key>
Line 441: Line 3,146:
</dict>
</dict>
</plist>
</plist>
</syntaxhighlight>
</syntaxhighlight>