Skip to content

Commit

Permalink
ui
Browse files Browse the repository at this point in the history
  • Loading branch information
RickTaylor79 committed Apr 3, 2023
1 parent 032078b commit 83802d8
Show file tree
Hide file tree
Showing 6 changed files with 321 additions and 202 deletions.
Binary file modified Presets/Autosave_1.hip
Binary file not shown.
Binary file modified Presets/Autosave_2.hip
Binary file not shown.
Binary file modified Presets/Xolotl.hip
Binary file not shown.
159 changes: 98 additions & 61 deletions Scripts/ScriptProcessors/Xolotl/Interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,109 @@ include("factory_waves.js");
include("UISTUFF.js");
include("ExpansionWaves.js");

const var AudioWaveform2 = Content.getComponent("AudioWaveform2");

const var AudioWaveform3 = Content.getComponent("AudioWaveform3");


var Maps = [];
//Maps.push(BasicWaveforms);
//Maps.push(GM);
//Maps.push(Hybrids);
//Maps.push(Kits);
//Maps.push(cs30);
//Maps.push(em25);
//Maps.push(sys101);
//Maps.push(jx3p);
//Maps.push(kraftzwerg);
//Maps.push(XPFM);
//Maps.push(XPMisc);
//Maps.push(XPPWM);
//Maps.push(XPSaws);
//Maps.push(XPSquares);
//Maps.push(XPtriangles);
Maps.push(BasicWaveforms);
Maps.push(GM);
Maps.push(Hybrids);
Maps.push(Kits);
Maps.push(cs30);
Maps.push(em25);
Maps.push(sys101);
Maps.push(jx3p);
Maps.push(kraftzwerg);
Maps.push(XPFM);
Maps.push(XPMisc);
Maps.push(XPPWM);
Maps.push(XPSaws);
Maps.push(XPSquares);
Maps.push(Monopoly);

var SMAPS = ["Monopoly"];
var USERMaps = [];

var USMAPS = ["USER"];

//var SMAPS = ["BasicWaveforms", "GM", "Hybrids", "Kits", "cs30", "em25", "sys101","jx3p", "kraftzwerg", "XPFM", "XPMisc","XPPWM", "XPSaws", "XPSquares", "Monopoly"];
var SMAPS = ["BasicWaveforms", "GM", "Hybrids", "Kits", "cs30", "em25", "sys101","jx3p", "kraftzwerg", "XPFM", "XPMisc","XPPWM", "XPSaws", "XPSquares", "Monopoly"];

//var SMAPS = ["BasicWaveforms", "GM", "Hybrids", "Kits"];

var Cats = [];

Cats.push(SMAPS);
const var Mode = Content.getComponent("Mode");
const var A = Content.getComponent("A");
const var B = Content.getComponent("B");
const var mode1 = Content.getComponent("mode1");
const var A2 = Content.getComponent("A2");
const var B1 = Content.getComponent("B1");


inline function onModeControl(component, value)
{
B.showControl(value);
A.showControl(1-value);

HARMONIC.setAttribute(HARMONIC.userwav1, value);
};

Content.getComponent("Mode").setControlCallback(onModeControl);



inline function onmode1Control(component, value)
{
B1.showControl(value);
A2.showControl(1-value);

HARMONIC.setAttribute(HARMONIC.userwav2, value);
};

Content.getComponent("mode1").setControlCallback(onmode1Control);



inline function onLoadSFZ1Control(component, value)
{


if (value)
{
FileSystem.browse (FileSystem.Desktop, false, "*.sfz", function (f)
{


slot2.loadFile("{XYZ::SFZ}" + (f.toString(File.FullPath)));
WAVELABEL1.set("text", "USER");

});

}

};

Content.getComponent("LoadSFZ1").setControlCallback(onLoadSFZ1Control);


inline function onLoadSFZ2Control(component, value)
{
if (value)
{
FileSystem.browse (FileSystem.Desktop, false, "*.sfz", function (f)
{


slot3.loadFile("{XYZ::SFZ}" + (f.toString(File.FullPath)));
WAVELABEL2.set("text", "USER");
});

}

};

Content.getComponent("LoadSFZ2").setControlCallback(onLoadSFZ2Control);



Settings.setVoiceMultiplier(8);
Expand All @@ -46,6 +121,8 @@ const var harm = Synth.getAudioSampleProcessor("HARMONIC");

const slot = harm.getAudioFile(0);
const slot1 = harm.getAudioFile(1);
const slot2 = harm.getAudioFile(2);
const slot3 = harm.getAudioFile(3);


const var HARMONIC = Synth.getChildSynth("HARMONIC")
Expand All @@ -69,15 +146,15 @@ Content.getComponent("BankA").setControlCallback(onBankAControl);

const var Categories = Content.getComponent("Categories");

Categories.set("items", SMAPS.join("\n"));


inline function onCategoriesControl(component, value)
{

BankA.set("items", [].join("\n"));
BankA.set("items", Maps[value-1].join("\n"));
BankA.setValue(1);

Categories.set("items", SMAPS.join("\n"));

};

Expand Down Expand Up @@ -113,46 +190,6 @@ inline function onCategories1Control(component, value)

Content.getComponent("Categories1").setControlCallback(onCategories1Control);

Content.getComponent("LoadSFZ1").setControlCallback(onLoadSFZ1Control);


inline function onLoadSFZ1Control(component, value)
{
if (value)
{
FileSystem.browse (FileSystem.Desktop, false, "*.sfz", function (f)
{


slot.loadFile("{XYZ::SFZ}" + (f.toString(File.FullPath)));
WAVELABEL1.set("text", "USER");
});

}

};

Content.getComponent("LoadSFZ1").setControlCallback(onLoadSFZ1Control);


inline function onLoadSFZ2Control(component, value)
{
if (value)
{
FileSystem.browse (FileSystem.Desktop, false, "*.sfz", function (f)
{


slot1.loadFile("{XYZ::SFZ}" + (f.toString(File.FullPath)));
WAVELABEL2.set("text", "USER");
});

}

};

Content.getComponent("LoadSFZ2").setControlCallback(onLoadSFZ2Control);

function onNoteOn()
{

Expand Down
Loading

0 comments on commit 83802d8

Please sign in to comment.