From 776f7945e9c0e1e2db37d93ead739ae075a98bee Mon Sep 17 00:00:00 2001
From: Sotakebk <81926249+Sotakebk@users.noreply.github.com>
Date: Fri, 23 Jun 2023 20:08:17 +0200
Subject: [PATCH 01/27] raise target to .net standard 2.1, nullable references,
remove abstractions, general improvements, autoformatting
---
CodeGeneration/Generators/BaseGenerator.cs | 1 +
.../Generators/FMXAdditionalCodeGenerator.cs | 21 +-
.../MetaModuleAdditionalCodeGenerator.cs | 4 +-
.../SamplerAdditionalCodeGenerator.cs | 6 +-
.../ModuleData_Generator.cs | 12 +-
.../ModuleType_Generator.cs | 3 +-
.../ProxyClass_Generator.cs | 41 +-
.../SpecificModules_Generator.cs | 45 +-
.../VorbisPlayerAdditionalGenerator.cs | 4 +-
CodeGeneration/ModuleDataParser.cs | 44 +-
CodeGeneration/ModuleTypes.cs | 87 +-
CodeGeneration/Program.cs | 7 +-
CodeGeneration/ReparsedData/Classes.cs | 9 +-
Examples/AbstractionHorizontalJumps.cs | 97 -
.../ObjectWrapperListModulesAndPatterns.cs | 1 +
Examples/ObjectWrapperManagePatterns.cs | 7 +-
Examples/ObjectWrapperPlaySong.cs | 2 +
Examples/ObjectWrapperSendEvents.cs | 15 +-
Examples/ObjectWrapperUseModules.cs | 9 +-
Examples/Program.cs | 3 +-
Examples/ThinWrapperListModulesAndPatterns.cs | 4 +-
Examples/ThinWrapperPlaySong.cs | 4 +-
Examples/ThinWrapperSendEvents.cs | 15 +-
Examples/ThinWrapperUserAudioCallback.cs | 8 +-
SunSharp.Redistribution/Redistribution.cs | 53 +-
.../SunSharp.Redistribution.csproj | 15 +-
.../AbstractionBuildingException.cs | 13 -
.../Abstractions/Horizontal/Jumping/Graph.cs | 102 -
.../Horizontal/Jumping/GraphBuilder.cs | 512 ----
.../Horizontal/Jumping/GraphData.cs | 89 -
.../Horizontal/Jumping/IGraphDescription.cs | 27 -
.../Horizontal/Jumping/JumpGraphController.cs | 168 --
.../Jumping/SimpleGraphDescription.cs | 90 -
.../Horizontal/Jumping/TargetType.cs | 10 -
SunSharp/Abstractions/MessageType.cs | 9 -
SunSharp/Constants.cs | 6 +-
SunSharp/DerivedData/ControllerData.cs | 22 +
SunSharp/DerivedData/DerivedDataFactory.cs | 170 ++
SunSharp/DerivedData/IDeepCopyable.cs | 7 +
SunSharp/DerivedData/ModuleData.cs | 107 +-
SunSharp/DerivedData/PatternData.cs | 98 +-
.../DerivedData/ReadOnlyCollectionWrapper.cs | 31 -
SunSharp/DerivedData/SongData.cs | 132 +-
SunSharp/Effects.cs | 16 +-
SunSharp/FineTunePair.cs | 50 +
SunSharp/ISunVoxLib.cs | 6 +-
.../LibraryLoading/ProxyClass.Generated.cs | 74 +-
SunSharp/Note.cs | 3 +-
SunSharp/ObjectWrapper/Enums.cs | 3 +-
SunSharp/ObjectWrapper/ModuleHandle.cs | 113 +-
.../Modules/IModuleHandleWrapper.cs | 83 +-
.../Modules/SpecificModules.Generated.cs | 2236 ++++++++---------
SunSharp/ObjectWrapper/PatternHandle.cs | 76 +-
SunSharp/ObjectWrapper/Slot.cs | 106 +-
SunSharp/ObjectWrapper/Slots.cs | 14 +-
SunSharp/ObjectWrapper/SunVox.cs | 83 +-
SunSharp/ObjectWrapper/Synthesizer.cs | 25 +-
SunSharp/ObjectWrapper/Timeline.cs | 11 +-
SunSharp/ObjectWrapper/VirtualPattern.cs | 18 +-
SunSharp/PatternEvent.cs | 167 +-
SunSharp/SunSharp.csproj | 11 +-
SunSharp/ThinWrapper/SunVoxException.cs | 6 +-
SunSharp/ThinWrapper/SunVoxLibExtensions.cs | 252 +-
SunSharp/ThinWrapper/ThinWrapperEnums.cs | 3 +-
SunSharp/Version.cs | 22 +-
65 files changed, 2191 insertions(+), 3297 deletions(-)
delete mode 100644 Examples/AbstractionHorizontalJumps.cs
delete mode 100644 SunSharp/Abstractions/AbstractionBuildingException.cs
delete mode 100644 SunSharp/Abstractions/Horizontal/Jumping/Graph.cs
delete mode 100644 SunSharp/Abstractions/Horizontal/Jumping/GraphBuilder.cs
delete mode 100644 SunSharp/Abstractions/Horizontal/Jumping/GraphData.cs
delete mode 100644 SunSharp/Abstractions/Horizontal/Jumping/IGraphDescription.cs
delete mode 100644 SunSharp/Abstractions/Horizontal/Jumping/JumpGraphController.cs
delete mode 100644 SunSharp/Abstractions/Horizontal/Jumping/SimpleGraphDescription.cs
delete mode 100644 SunSharp/Abstractions/Horizontal/Jumping/TargetType.cs
delete mode 100644 SunSharp/Abstractions/MessageType.cs
create mode 100644 SunSharp/DerivedData/ControllerData.cs
create mode 100644 SunSharp/DerivedData/DerivedDataFactory.cs
create mode 100644 SunSharp/DerivedData/IDeepCopyable.cs
delete mode 100644 SunSharp/DerivedData/ReadOnlyCollectionWrapper.cs
create mode 100644 SunSharp/FineTunePair.cs
diff --git a/CodeGeneration/Generators/BaseGenerator.cs b/CodeGeneration/Generators/BaseGenerator.cs
index 962dbcc..d802267 100644
--- a/CodeGeneration/Generators/BaseGenerator.cs
+++ b/CodeGeneration/Generators/BaseGenerator.cs
@@ -28,6 +28,7 @@ internal bool Generate(string filePath)
file.Flush();
file.Close();
}
+
return true;
}
diff --git a/CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs b/CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs
index bfd06cf..58ec493 100644
--- a/CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs
+++ b/CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs
@@ -39,7 +39,8 @@ public override void AppendCode()
{
var module = Data.Modules.First(m => m.FriendlyName == "FMX");
var originalController = module.Controllers.First(c => c.FriendlyName.StartsWith(method)
- && c.FriendlyName.EndsWith($"{SubGeneratorStart}"));
+ && c.FriendlyName.EndsWith(
+ $"{SubGeneratorStart}"));
AppendGroupMethod(method, originalController);
}
}
@@ -53,7 +54,8 @@ private void AppendGroupMethod(string name, CtlDesc c)
AppendLine("/// ");
AppendLine($"/// index range: {SubGeneratorStart} to {SubGeneratorEnd} ");
- AppendLine($"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
+ AppendLine(
+ $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
AppendLine("/// ");
AppendLine($"public {@enum.Name} Get{name}(int index)");
@@ -63,14 +65,16 @@ private void AppendGroupMethod(string name, CtlDesc c)
AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
AppendLine();
- AppendLine($"return ({@enum.Name})Module.GetControllerValue({c.Id} + index - 1, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"return ({@enum.Name})ModuleHandle.GetControllerValue({c.Id} + index - 1, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
});
AppendLine("}");
AppendLine();
AppendLine("/// ");
AppendLine($"/// index range: {SubGeneratorStart} to {SubGeneratorEnd} ");
- AppendLine($"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
+ AppendLine(
+ $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
AppendLine("/// ");
AppendLine($"public void Set{name}(int index, {@enum.Name} value)");
@@ -80,7 +84,8 @@ private void AppendGroupMethod(string name, CtlDesc c)
AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
AppendLine();
- AppendLine($"Module.SetControllerValue({c.Id} + index - 1, (int)value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"ModuleHandle.SetControllerValue({c.Id} + index - 1, (int)value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
});
AppendLine("}");
AppendLine();
@@ -100,7 +105,8 @@ private void AppendGroupMethod(string name, CtlDesc c)
AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
AppendLine();
- AppendLine($"return Module.GetControllerValue({c.Id} + index - 1, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"return ModuleHandle.GetControllerValue({c.Id} + index - 1, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
});
AppendLine("}");
AppendLine();
@@ -117,7 +123,8 @@ private void AppendGroupMethod(string name, CtlDesc c)
AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
AppendLine();
- AppendLine($"Module.SetControllerValue({c.Id} + index - 1, value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"ModuleHandle.SetControllerValue({c.Id} + index - 1, value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
});
AppendLine("}");
AppendLine();
diff --git a/CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs b/CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs
index 3475840..168e74a 100644
--- a/CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs
+++ b/CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs
@@ -5,10 +5,10 @@ internal class MetaModuleAdditionalCodeGenerator : AdditionalGenerator
public override void AppendCode()
{
AppendLine("/// ");
- AppendLine("public void LoadFile(string path) => Module.LoadIntoMetaModule(path);");
+ AppendLine("public void LoadFile(string path) => ModuleHandle.LoadIntoMetaModule(path);");
AppendLine();
AppendLine("/// ");
- AppendLine("public void LoadFile(byte[] data) => Module.LoadIntoMetaModule(data);");
+ AppendLine("public void LoadFile(byte[] data) => ModuleHandle.LoadIntoMetaModule(data);");
}
}
}
diff --git a/CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs b/CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs
index b9b7489..6eb7c6a 100644
--- a/CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs
+++ b/CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs
@@ -5,10 +5,12 @@ internal class SamplerAdditionalCodeGenerator : AdditionalGenerator
public override void AppendCode()
{
AppendLine("/// ");
- AppendLine("public void LoadSample(byte[] data, int sampleSlot = -1) => Module.LoadSamplerSample(data, sampleSlot);");
+ AppendLine(
+ "public void LoadSample(byte[] data, int sampleSlot = -1) => ModuleHandle.LoadSamplerSample(data, sampleSlot);");
AppendLine();
AppendLine("/// ");
- AppendLine("public void LoadSample(string path, int sampleSlot = -1) => Module.LoadSamplerSample(path, sampleSlot);");
+ AppendLine(
+ "public void LoadSample(string path, int sampleSlot = -1) => ModuleHandle.LoadSamplerSample(path, sampleSlot);");
}
}
}
diff --git a/CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs
index 80df8b8..3c1d615 100644
--- a/CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs
+++ b/CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs
@@ -106,7 +106,8 @@ protected void AddModules()
{
foreach (var cd in md.Curves.OrderBy(c => c.Id))
{
- AppendLine($"new {nameof(CurveDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, {cd.Size}),");
+ AppendLine(
+ $"new {nameof(CurveDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, {cd.Size}),");
}
});
AppendLine("},");
@@ -128,15 +129,18 @@ private void AddController(CtlDesc cd)
{
if (cd.IgnoreInternalEnum)
{
- AppendLine($"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, ignoreInternalEnum: true),");
+ AppendLine(
+ $"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, ignoreInternalEnum: true),");
}
else if (!string.IsNullOrWhiteSpace(cd.EnumTypeName))
{
- AppendLine($"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, enumTypeName: \"{cd.EnumTypeName}\"),");
+ AppendLine(
+ $"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, enumTypeName: \"{cd.EnumTypeName}\"),");
}
else
{
- AppendLine($"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}),");
+ AppendLine(
+ $"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}),");
}
}
}
diff --git a/CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs
index c568623..73f3d99 100644
--- a/CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs
+++ b/CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs
@@ -8,7 +8,8 @@ protected override void GenerateBody()
{
AppendLine("/*");
AppendLine(" * IMPORTANT!");
- AppendLine(" * Do not modify this file manually. It was generated automatically by the CodeGeneration project.");
+ AppendLine(
+ " * Do not modify this file manually. It was generated automatically by the CodeGeneration project.");
AppendLine("*/");
AppendLine();
AppendLine("namespace SunSharp.ObjectWrapper");
diff --git a/CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs
index a1b4b4b..e16826c 100644
--- a/CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs
+++ b/CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs
@@ -1,5 +1,5 @@
-using SunSharp;
-using System.Reflection;
+using System.Reflection;
+using SunSharp;
namespace CodeGeneration.Generators.SpecificGenerators
{
@@ -7,15 +7,15 @@ internal class ProxyClass_Generator : BaseGenerator
{
private static Dictionary StrictTypeToType = new Dictionary()
{
- {"Int32", "int"},
- {"UInt32", "uint"},
- {"Void", "void"}
+ { "Int32", "int" },
+ { "UInt32", "uint" },
+ { "Void", "void" }
};
private static Dictionary StrictTypeToName = new Dictionary()
{
- {"Int32", "Int"},
- {"UInt32", "Uint"}
+ { "Int32", "Int" },
+ { "UInt32", "Uint" }
};
private static string Translate(object o, Dictionary d)
@@ -60,6 +60,7 @@ protected override void GenerateBody()
AppendLine(d);
AppendLine();
}
+
AppendLine("#endregion delegate definitions");
AppendLine();
AppendLine("#region delegates");
@@ -71,6 +72,7 @@ protected override void GenerateBody()
AppendLine(d);
AppendLine();
}
+
AppendLineNoTab("#pragma warning restore CS0649");
AppendLine();
AppendLine("#endregion delegates");
@@ -82,6 +84,7 @@ protected override void GenerateBody()
AppendLine(d);
AppendLine();
}
+
AppendLine($"#endregion interface");
});
AppendLine("}");
@@ -107,10 +110,7 @@ private void AddConstructor()
{
AppendLine("if (typeof(Delegate).IsAssignableFrom(field.FieldType))");
AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("field.SetValue(this, GetDelegate(field.Name, field.FieldType));");
- });
+ AddIndent(() => { AppendLine("field.SetValue(this, GetDelegate(field.Name, field.FieldType));"); });
AppendLine("}");
});
AppendLine("}");
@@ -118,7 +118,8 @@ private void AddConstructor()
AppendLine("}");
}
- private static (ICollection delegateDefinitions, ICollection delegates, ICollection delegateCalls) ReadData(Type t)
+ private static (ICollection delegateDefinitions, ICollection delegates, ICollection
+ delegateCalls) ReadData(Type t)
{
HashSet delegateDefinitions = new();
HashSet delegates = new();
@@ -131,7 +132,8 @@ private static (ICollection delegateDefinitions, ICollection del
delegateCalls.Add(delegateCall);
}
- return (delegateDefinitions.OrderBy(s => s).ToList(), delegates.OrderBy(s => s).ToList(), delegateCalls.OrderBy(s => s).ToList());
+ return (delegateDefinitions.OrderBy(s => s).ToList(), delegates.OrderBy(s => s).ToList(),
+ delegateCalls.OrderBy(s => s).ToList());
}
private static (string delegateDefinition, string @delegate, string delegateCall) ParseMethod(MethodInfo info)
@@ -154,10 +156,13 @@ private static (string delegateDefinition, string @delegate, string delegateCall
foreach (var parameter in info.GetParameters())
{
int count = namedPars.Count(p => p.Item1 == parameter.ParameterType);
- var parameterName = $"_{TranslateToType(parameter.ParameterType.Name)}{(count != 0 ? count : "")}"; // int, int2, int3...
+ var parameterName =
+ $"_{TranslateToType(parameter.ParameterType.Name)}{(count != 0 ? count : "")}"; // int, int2, int3...
namedPars.Add((parameter.ParameterType, parameterName));
}
- delegateTypeArgs = string.Join(", ", namedPars.Select(p => $"{TranslateToType(p.Item1.Name)} {p.Item2}"));
+
+ delegateTypeArgs =
+ string.Join(", ", namedPars.Select(p => $"{TranslateToType(p.Item1.Name)} {p.Item2}"));
}
string delegateInstanceName = $"{info.Name}";
@@ -167,9 +172,11 @@ private static (string delegateDefinition, string @delegate, string delegateCall
string delegateCall;
// call
{
- var pars = string.Join(", ", info.GetParameters().Select(p => $"{TranslateToType(p.ParameterType.Name)} {p.Name}"));
+ var pars = string.Join(", ",
+ info.GetParameters().Select(p => $"{TranslateToType(p.ParameterType.Name)} {p.Name}"));
var forwardedPars = string.Join(", ", info.GetParameters().Select(p => p.Name));
- delegateCall = $"{returnsTypeName} {info.DeclaringType?.Name}.{info.Name}({pars}) => {delegateInstanceName}({forwardedPars});";
+ delegateCall =
+ $"{returnsTypeName} {info.DeclaringType?.Name}.{info.Name}({pars}) => {delegateInstanceName}({forwardedPars});";
}
return (delegateDefinition, @delegate, delegateCall);
diff --git a/CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs
index 391f56b..4abc7df 100644
--- a/CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs
+++ b/CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs
@@ -17,7 +17,8 @@ protected override void GenerateBody()
{
AppendLine("/*");
AppendLine(" * IMPORTANT!");
- AppendLine(" * Do not modify this file manually. It was generated automatically by the CodeGeneration project.");
+ AppendLine(
+ " * Do not modify this file manually. It was generated automatically by the CodeGeneration project.");
AppendLine("*/");
AppendLine();
AppendLine("namespace SunSharp.ObjectWrapper.Modules");
@@ -53,6 +54,7 @@ private void GenerateEnums()
});
AppendLine("}");
}
+
AppendLine();
AppendLine("#endregion enums");
}
@@ -67,7 +69,8 @@ private void GenerateExtensions()
for (int i = 0; i < modules.Length; i++)
{
var module = modules[i];
- AppendLine($"public static {module.FriendlyName}ModuleHandle As{module.FriendlyName}(this ModuleHandle module) => new {module.FriendlyName}ModuleHandle(module);");
+ AppendLine(
+ $"public static {module.FriendlyName}ModuleHandle As{module.FriendlyName}(this ModuleHandle module) => new {module.FriendlyName}ModuleHandle(module);");
if (i != modules.Length - 1)
AppendLine();
@@ -87,14 +90,11 @@ private void GenerateStructs()
AppendLine("{");
AddIndent(() =>
{
- AppendLine("public ModuleHandle Module { get; private set; }");
+ AppendLine("public ModuleHandle ModuleHandle { get; private set; }");
AppendLine();
AppendLine($"public {m.FriendlyName}ModuleHandle(ModuleHandle module)");
AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("Module = module;");
- });
+ AddIndent(() => { AppendLine("ModuleHandle = module;"); });
AppendLine("}");
AppendLine();
@@ -121,6 +121,7 @@ private void GenerateStructs()
GenerateCurves(m);
AppendLine("#endregion curves");
}
+
if (m.Curves.Any() && m.AdditionalCodeDescription != null)
{
AppendLine();
@@ -156,19 +157,23 @@ private void GenerateControllers(ModuleDesc module)
var @enum = _data.Enums.First(e => e.Name == c.EnumTypeName);
AppendLine("/// ");
AppendLine($"/// Original name: {c.InternalName}");
- AppendLine($"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
+ AppendLine(
+ $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
if (!string.IsNullOrWhiteSpace(c.Description))
AppendLine($"/// {c.Description} ");
AppendLine("/// ");
- AppendLine($"public {@enum.Name} Get{c.FriendlyName}() => ({@enum.Name})Module.GetControllerValue({c.Id}, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"public {@enum.Name} Get{c.FriendlyName}() => ({@enum.Name})ModuleHandle.GetControllerValue({c.Id}, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
AppendLine();
AppendLine("/// ");
AppendLine($"/// Original name: {c.InternalName}");
- AppendLine($"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
+ AppendLine(
+ $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
if (!string.IsNullOrWhiteSpace(c.Description))
AppendLine($"/// {c.Description} ");
AppendLine("/// ");
- AppendLine($"public void Set{c.FriendlyName}({@enum.Name} value) => Module.SetControllerValue({c.Id}, (int)value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"public void Set{c.FriendlyName}({@enum.Name} value) => ModuleHandle.SetControllerValue({c.Id}, (int)value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
AppendLine();
}
else
@@ -180,7 +185,8 @@ private void GenerateControllers(ModuleDesc module)
if (!string.IsNullOrWhiteSpace(c.Description))
AppendLine($"/// {c.Description} ");
AppendLine("/// ");
- AppendLine($"public int Get{c.FriendlyName}() => Module.GetControllerValue({c.Id}, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"public int Get{c.FriendlyName}() => ModuleHandle.GetControllerValue({c.Id}, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
AppendLine();
AppendLine("/// ");
AppendLine($"/// Original name: {c.InternalName}");
@@ -188,7 +194,8 @@ private void GenerateControllers(ModuleDesc module)
if (!string.IsNullOrWhiteSpace(c.Description))
AppendLine($"/// {c.Description} ");
AppendLine("/// ");
- AppendLine($"public void Set{c.FriendlyName}(int value) => Module.SetControllerValue({c.Id}, value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
+ AppendLine(
+ $"public void Set{c.FriendlyName}(int value) => ModuleHandle.SetControllerValue({c.Id}, value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
AppendLine();
}
}
@@ -209,9 +216,11 @@ private void GenerateCurves(ModuleDesc module)
AddIndent(() =>
{
AppendLine($"if (buffer.Length < {curve.Size})");
- AddIndent(() => AppendLine($"throw new System.ArgumentException(\"Buffer must be at least of size {curve.Size}\");"));
+ AddIndent(() =>
+ AppendLine(
+ $"throw new System.ArgumentException(\"Buffer must be at least of size {curve.Size}\");"));
AppendLine();
- AppendLine($"Module.ReadCurve({curve.Id}, buffer);");
+ AppendLine($"ModuleHandle.ReadCurve({curve.Id}, buffer);");
});
AppendLine("}");
AppendLine();
@@ -226,9 +235,11 @@ private void GenerateCurves(ModuleDesc module)
AddIndent(() =>
{
AppendLine($"if (buffer.Length < {curve.Size})");
- AddIndent(() => AppendLine($"throw new System.ArgumentException(\"Buffer must be at least of size {curve.Size}\");"));
+ AddIndent(() =>
+ AppendLine(
+ $"throw new System.ArgumentException(\"Buffer must be at least of size {curve.Size}\");"));
AppendLine();
- AppendLine($"Module.WriteCurve({curve.Id}, buffer);");
+ AppendLine($"ModuleHandle.WriteCurve({curve.Id}, buffer);");
});
AppendLine("}");
AppendLine();
diff --git a/CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs b/CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs
index a15d04a..f02fad7 100644
--- a/CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs
+++ b/CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs
@@ -5,10 +5,10 @@ internal class VorbisPlayerAdditionalGenerator : AdditionalGenerator
public override void AppendCode()
{
AppendLine("/// ");
- AppendLine("public void LoadVorbis(string path) => Module.LoadIntoVorbisPLayer(path);");
+ AppendLine("public void LoadVorbis(string path) => ModuleHandle.LoadIntoVorbisPLayer(path);");
AppendLine();
AppendLine("/// ");
- AppendLine("public void LoadIntoVorbisPLayer(byte[] data) => Module.LoadIntoVorbisPLayer(data);");
+ AppendLine("public void LoadIntoVorbisPLayer(byte[] data) => ModuleHandle.LoadIntoVorbisPLayer(data);");
}
}
}
diff --git a/CodeGeneration/ModuleDataParser.cs b/CodeGeneration/ModuleDataParser.cs
index e77ce84..a1c2180 100644
--- a/CodeGeneration/ModuleDataParser.cs
+++ b/CodeGeneration/ModuleDataParser.cs
@@ -1,8 +1,8 @@
-using CodeGeneration.ReparsedData;
+using System.Text.RegularExpressions;
+using CodeGeneration.ReparsedData;
using SunSharp;
using SunSharp.ObjectWrapper;
using SunSharp.ThinWrapper;
-using System.Text.RegularExpressions;
namespace CodeGeneration
{
@@ -32,7 +32,8 @@ internal static void RecreateModuleDescriptions(Data oldData, Data newData, Slot
}
}
- internal static ModuleDesc CreateModuleDescription(Data newData, ModuleDesc original, SunSharp.ObjectWrapper.ModuleHandle module)
+ internal static ModuleDesc CreateModuleDescription(Data newData, ModuleDesc original,
+ SunSharp.ObjectWrapper.ModuleHandle module)
{
var internalName = module.Slot.Library.GetModuleName(module.Slot.Id, module.Id);
var friendlyName = ModuleTypes.GetFriendlyName(internalName);
@@ -43,14 +44,17 @@ internal static ModuleDesc CreateModuleDescription(Data newData, ModuleDesc orig
for (int i = 0; i < module.GetControllerCount(); i++)
{
var originalControllerDescription = original?.Controllers?.FirstOrDefault(c => c.Id == i);
- var controllerDescription = CreateControllerDescription(newData, originalControllerDescription, module, i);
+ var controllerDescription =
+ CreateControllerDescription(newData, originalControllerDescription, module, i);
controllerDescriptions.Add(controllerDescription);
}
- return new ModuleDesc(friendlyName, internalName, description, controllerDescriptions, curveDescriptions, original?.AdditionalCodeDescription);
+ return new ModuleDesc(friendlyName, internalName, description, controllerDescriptions, curveDescriptions,
+ original?.AdditionalCodeDescription);
}
- internal static CtlDesc CreateControllerDescription(Data newData, CtlDesc original, SunSharp.ObjectWrapper.ModuleHandle module, int i)
+ internal static CtlDesc CreateControllerDescription(Data newData, CtlDesc original,
+ SunSharp.ObjectWrapper.ModuleHandle module, int i)
{
var originalName = module.GetControllerName(i);
var friendlyName = original?.FriendlyName ?? SanitizeControllerName(originalName);
@@ -62,11 +66,14 @@ internal static CtlDesc CreateControllerDescription(Data newData, CtlDesc origin
if (original != null)
{
if (original.MinValue != minValue)
- Console.WriteLine($"MinValue changed on {i}.{friendlyName}@{module.GetName()} (was: {original.MinValue}, is: {minValue})");
+ Console.WriteLine(
+ $"MinValue changed on {i}.{friendlyName}@{module.GetName()} (was: {original.MinValue}, is: {minValue})");
if (original.MaxValue != maxValue)
- Console.WriteLine($"MaxValue changed on {i}.{friendlyName}@{module.GetName()} (was: {original.MaxValue}, is: {maxValue})");
+ Console.WriteLine(
+ $"MaxValue changed on {i}.{friendlyName}@{module.GetName()} (was: {original.MaxValue}, is: {maxValue})");
if (original.InternalName != originalName)
- Console.WriteLine($"InternalName changed on {i}.{friendlyName}@{module.GetName()} (was: {original.FriendlyName}, is: {friendlyName})");
+ Console.WriteLine(
+ $"InternalName changed on {i}.{friendlyName}@{module.GetName()} (was: {original.FriendlyName}, is: {friendlyName})");
}
var originalIsEnum = module.GetControllerType(i);
@@ -81,7 +88,8 @@ internal static CtlDesc CreateControllerDescription(Data newData, CtlDesc origin
var @enum = newData.Enums.FirstOrDefault(e => e.Name == original.EnumTypeName);
if (@enum == null)
{
- Console.WriteLine($"Enum {original.EnumTypeName} of controller {i}.{friendlyName}@{module.GetName()} was not found!");
+ Console.WriteLine(
+ $"Enum {original.EnumTypeName} of controller {i}.{friendlyName}@{module.GetName()} was not found!");
}
else
{
@@ -89,13 +97,15 @@ internal static CtlDesc CreateControllerDescription(Data newData, CtlDesc origin
var max = @enum.Values.Max(v => v.value);
if (min != original.MinValue || max != original.MaxValue)
{
- Console.WriteLine($"Enum {@enum.Name} doesn't fit value range of controller {i}.{friendlyName}@{module.GetName()} (is: {min} to {max}, but expected ({minValue} to {maxValue})");
+ Console.WriteLine(
+ $"Enum {@enum.Name} doesn't fit value range of controller {i}.{friendlyName}@{module.GetName()} (is: {min} to {max}, but expected ({minValue} to {maxValue})");
}
}
}
else if (original.IgnoreInternalEnum == false)
{
- Console.WriteLine($"Missing enum type or ignore on controller {i}.{friendlyName}@{module.GetName()}");
+ Console.WriteLine(
+ $"Missing enum type or ignore on controller {i}.{friendlyName}@{module.GetName()}");
}
}
else
@@ -104,16 +114,20 @@ internal static CtlDesc CreateControllerDescription(Data newData, CtlDesc origin
{
if (!string.IsNullOrWhiteSpace(original.EnumTypeName))
{
- Console.WriteLine($"Controller {i}.{friendlyName}@{module.GetName()} is of type Real, but enum name is assigned");
+ Console.WriteLine(
+ $"Controller {i}.{friendlyName}@{module.GetName()} is of type Real, but enum name is assigned");
}
+
if (original.IgnoreInternalEnum)
{
- Console.WriteLine($"Controller {i}.{friendlyName}@{module.GetName()} has unnecessary ignore of missing Enum, since controller is of type Real");
+ Console.WriteLine(
+ $"Controller {i}.{friendlyName}@{module.GetName()} has unnecessary ignore of missing Enum, since controller is of type Real");
}
}
}
- return new CtlDesc(i, friendlyName, originalName, description, minValue, maxValue, original?.IgnoreInternalEnum ?? false, original?.EnumTypeName);
+ return new CtlDesc(i, friendlyName, originalName, description, minValue, maxValue,
+ original?.IgnoreInternalEnum ?? false, original?.EnumTypeName);
}
internal static string SanitizeControllerName(string name)
diff --git a/CodeGeneration/ModuleTypes.cs b/CodeGeneration/ModuleTypes.cs
index cf82dfc..b083a45 100644
--- a/CodeGeneration/ModuleTypes.cs
+++ b/CodeGeneration/ModuleTypes.cs
@@ -5,53 +5,54 @@ public partial class ModuleTypes
public static ICollection<(int value, string friendlyName, string internalName)> GetModuleTypes() =>
new (int, string, string)[]
{
- (1,"AnalogGenerator", "Analog generator"),
- (2,"DrumSynth", "DrumSynth"),
- (3, "FM", "FM"),
- (4, "FMX", "FMX"),
- (5, "Generator", "Generator"),
- (6, "Input", "Input"),
- (7, "Kicker", "Kicker"),
- (8, "VorbisPlayer", "Vorbis player"),
- (9, "Sampler", "Sampler"),
- (10, "SpectraVoice", "SpectraVoice"),
+ (1, "AnalogGenerator", "Analog generator"),
+ (2, "DrumSynth", "DrumSynth"),
+ (3, "FM", "FM"),
+ (4, "FMX", "FMX"),
+ (5, "Generator", "Generator"),
+ (6, "Input", "Input"),
+ (7, "Kicker", "Kicker"),
+ (8, "VorbisPlayer", "Vorbis player"),
+ (9, "Sampler", "Sampler"),
+ (10, "SpectraVoice", "SpectraVoice"),
- (64, "Amplifier", "Amplifier"),
- (65, "Compressor", "Compressor"),
- (66, "DcBlocker", "DC Blocker"),
- (67, "Delay", "Delay"),
- (68, "Distortion", "Distortion"),
- (69, "Echo", "Echo"),
- (70, "EQ", "EQ"),
- (71, "FFT", "FFT"),
- (72, "Filter", "Filter"),
- (73, "FilterPro", "Filter Pro"),
- (74, "Flanger", "Flanger"),
- (75, "LFO", "LFO"),
- (76, "Loop", "Loop"),
- (77, "Modulator", "Modulator"),
- (78, "PitchShifter", "Pitch shifter"),
- (79, "Reverb", "Reverb"),
- (80, "VocalFilter", "Vocal filter"),
- (81, "Vibrato", "Vibrato"),
- (82, "WaveShaper", "WaveShaper"),
- (128, "ADSR", "ADSR"),
- (129, "ControlToNote", "Ctl2Note"),
- (130, "Feedback", "Feedback"),
- (131, "Glide", "Glide"),
- (132, "GPIO", "GPIO"),
- (133, "MetaModule", "MetaModule"),
- (134, "MultiControl", "MultiCtl"),
- (135, "MultiSynth", "MultiSynth"),
- (136, "PitchToControl", "Pitch2Ctl"),
- (137, "PitchDetector", "Pitch Detector"),
- (138, "SoundToControl", "Sound2Ctl"),
- (139, "VelocityToControl", "Velocity2Ctl"),
+ (64, "Amplifier", "Amplifier"),
+ (65, "Compressor", "Compressor"),
+ (66, "DcBlocker", "DC Blocker"),
+ (67, "Delay", "Delay"),
+ (68, "Distortion", "Distortion"),
+ (69, "Echo", "Echo"),
+ (70, "EQ", "EQ"),
+ (71, "FFT", "FFT"),
+ (72, "Filter", "Filter"),
+ (73, "FilterPro", "Filter Pro"),
+ (74, "Flanger", "Flanger"),
+ (75, "LFO", "LFO"),
+ (76, "Loop", "Loop"),
+ (77, "Modulator", "Modulator"),
+ (78, "PitchShifter", "Pitch shifter"),
+ (79, "Reverb", "Reverb"),
+ (80, "VocalFilter", "Vocal filter"),
+ (81, "Vibrato", "Vibrato"),
+ (82, "WaveShaper", "WaveShaper"),
+ (128, "ADSR", "ADSR"),
+ (129, "ControlToNote", "Ctl2Note"),
+ (130, "Feedback", "Feedback"),
+ (131, "Glide", "Glide"),
+ (132, "GPIO", "GPIO"),
+ (133, "MetaModule", "MetaModule"),
+ (134, "MultiControl", "MultiCtl"),
+ (135, "MultiSynth", "MultiSynth"),
+ (136, "PitchToControl", "Pitch2Ctl"),
+ (137, "PitchDetector", "Pitch Detector"),
+ (138, "SoundToControl", "Sound2Ctl"),
+ (139, "VelocityToControl", "Velocity2Ctl"),
- (-1, "Output", "Output"),
+ (-1, "Output", "Output"),
};
- private static ICollection<(int value, string friendlyName, string internalName)> _privateCollection = GetModuleTypes();
+ private static ICollection<(int value, string friendlyName, string internalName)> _privateCollection =
+ GetModuleTypes();
public static string GetFriendlyName(string internalName)
{
diff --git a/CodeGeneration/Program.cs b/CodeGeneration/Program.cs
index 04e1f8d..0fbfcb4 100644
--- a/CodeGeneration/Program.cs
+++ b/CodeGeneration/Program.cs
@@ -1,7 +1,7 @@
-using CodeGeneration.Generators.SpecificGenerators;
+using System.Runtime.CompilerServices;
+using CodeGeneration.Generators.SpecificGenerators;
using CodeGeneration.ReparsedData;
using SunSharp.ObjectWrapper;
-using System.Runtime.CompilerServices;
namespace CodeGeneration
{
@@ -9,7 +9,8 @@ internal static class Program
{
internal static SunVox _sunVox;
- internal static string GetSourceFilePathName([CallerFilePath] string callerFilePath = null) => Path.GetDirectoryName(callerFilePath) ?? "";
+ internal static string GetSourceFilePathName([CallerFilePath] string callerFilePath = null) =>
+ Path.GetDirectoryName(callerFilePath) ?? "";
private static float[] buffer = new float[32];
diff --git a/CodeGeneration/ReparsedData/Classes.cs b/CodeGeneration/ReparsedData/Classes.cs
index ebe75a3..35f0ae9 100644
--- a/CodeGeneration/ReparsedData/Classes.cs
+++ b/CodeGeneration/ReparsedData/Classes.cs
@@ -11,7 +11,8 @@ public class ModuleDesc
public ICollection Curves { get; set; }
public AddCodeDesc AdditionalCodeDescription { get; set; }
- public ModuleDesc(string friendlyName, string internalName, string description, ICollection controllers, ICollection curves, AddCodeDesc aditionalCodeDescription)
+ public ModuleDesc(string friendlyName, string internalName, string description,
+ ICollection controllers, ICollection curves, AddCodeDesc aditionalCodeDescription)
{
FriendlyName = friendlyName;
InternalName = internalName;
@@ -45,7 +46,8 @@ public class CtlDesc
public bool IgnoreInternalEnum { get; set; }
public string EnumTypeName { get; set; }
- public CtlDesc(int id, string friendlyName, string internalName, string description, int min, int max, bool ignoreInternalEnum = false, string enumTypeName = null)
+ public CtlDesc(int id, string friendlyName, string internalName, string description, int min, int max,
+ bool ignoreInternalEnum = false, string enumTypeName = null)
{
Id = id;
FriendlyName = friendlyName;
@@ -57,7 +59,8 @@ public CtlDesc(int id, string friendlyName, string internalName, string descript
IgnoreInternalEnum = ignoreInternalEnum;
}
- public CtlDesc(int id, string friendlyName, string internalname, string description, int min, int max, string enumTypeName)
+ public CtlDesc(int id, string friendlyName, string internalname, string description, int min, int max,
+ string enumTypeName)
{
Id = id;
FriendlyName = friendlyName;
diff --git a/Examples/AbstractionHorizontalJumps.cs b/Examples/AbstractionHorizontalJumps.cs
deleted file mode 100644
index 27c2340..0000000
--- a/Examples/AbstractionHorizontalJumps.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using SunSharp;
-using SunSharp.Abstractions.Horizontal.Jumping;
-using SunSharp.DerivedData;
-using SunSharp.ObjectWrapper;
-
-namespace Examples;
-
-internal class AbstractionHorizontalJumps : BaseExample
-{
- protected void Feedback(SunSharp.Abstractions.MessageType type, string message)
- {
- WriteLine($"[{type}]{message}");
- }
-
- protected override void RunTest(ISunVoxLib lib)
- {
- WriteLine("Initializing");
- using (var sv = new SunVox(lib))
- {
- WriteLine("Loading the song");
- var slot = sv.Slots[0];
- slot.Open();
- slot.Load(Path.Join("jump_demo.sunvox"));
- WriteLine($"Loaded song: {slot.GetSongName()}");
-
- var description = BuildDescription();
- var songData = SongData.ReadSongData(slot);
- var graph = GraphBuilder.BuildJumpGraph(songData, description, Feedback);
- var controller = new GraphController(slot, graph);
- WriteLine("Description and graph built.");
-
- WriteLine("Enumerating states.");
- foreach (var state in graph.States)
- WriteLine($"{state.Id}. {state.Name}");
-
- WriteLine("Enumerating transitions.");
- foreach (var transition in graph.Transitions)
- WriteLine($"{transition.Id}. {transition.Name} (from: \"{transition.FromStateId}\" to: \"{transition.ToStateId}\")");
-
- var allowedNames = graph.States.Select(s => s.Name);
- controller.Start(controller.GetState("I"));
- var input = string.Empty;
- do
- {
- WriteLine("Select a target state or type \"exit\" to stop");
- WriteLine($"Available states: {string.Join(", ", allowedNames)}");
-
- input = ReadLine();
- input = input?.Trim() ?? string.Empty;
- if (allowedNames.Contains(input))
- {
- var targetState = controller.GetState(input);
- controller.DirectGraphToState(targetState);
- }
- } while (string.Compare(input, "exit", true) != 0);
-
- slot.Close();
- }
- }
-
- private static IGraphDescription BuildDescription()
- {
- var description = new SimpleGraphDescription();
- description.Name = "Example";
- var I = description.AddState("I", "State1", hasLoop: true);
- var ii = description.AddState("ii", "State2", hasLoop: true);
- var iii = description.AddState("iii", "State3", hasLoop: true);
- var IV = description.AddState("IV", "State4", hasLoop: true);
- var V = description.AddState("V", "State5", hasLoop: true);
- var vi = description.AddState("vi", "State6", hasLoop: true);
- var viio = description.AddState("viio", "State7", hasLoop: true);
- description.AddTransition("I-ii", I, ii);
- description.AddTransition("I-iii", I, iii);
- description.AddTransition("I-IV", I, IV);
- description.AddTransition("I-V", I, V);
- description.AddTransition("I-vi", I, vi);
- description.AddTransition("I-viio", I, viio);
-
- description.AddTransition("ii-V", ii, V);
-
- description.AddTransition("iii-vi", iii, vi);
- description.AddTransition("iii-IV", iii, IV);
-
- description.AddTransition("IV-ii", IV, ii);
- description.AddTransition("IV-V", IV, V);
-
- description.AddTransition("V-I", V, I);
-
- description.AddTransition("vi-IV", vi, IV);
- description.AddTransition("vi-ii", vi, ii);
-
- description.AddTransition("viio-I", viio, I);
- description.AddTransition("viio-V", viio, V);
-
- return description;
- }
-}
diff --git a/Examples/ObjectWrapperListModulesAndPatterns.cs b/Examples/ObjectWrapperListModulesAndPatterns.cs
index 553f4b4..1a37a18 100644
--- a/Examples/ObjectWrapperListModulesAndPatterns.cs
+++ b/Examples/ObjectWrapperListModulesAndPatterns.cs
@@ -54,6 +54,7 @@ private void ListPatterns(Slot slot)
if (t < tracks - 1)
Write(" ");
}
+
Write(Environment.NewLine);
}
}
diff --git a/Examples/ObjectWrapperManagePatterns.cs b/Examples/ObjectWrapperManagePatterns.cs
index 748dbef..3f3d056 100644
--- a/Examples/ObjectWrapperManagePatterns.cs
+++ b/Examples/ObjectWrapperManagePatterns.cs
@@ -31,10 +31,9 @@ protected override void RunTest(ISunVoxLib lib)
var data = pattern.GetData2D();
var newData = new PatternEvent[lines, tracks];
-
- for(int l = 0; l < lines; l++)
+ for (int l = 0; l < lines; l++)
{
- for(int t = 0; t < tracks; t++)
+ for (int t = 0; t < tracks; t++)
{
newData[l, t] = data[lines - 1 - l, tracks - t - 1];
}
@@ -56,8 +55,10 @@ protected override void RunTest(ISunVoxLib lib)
line = currentLine;
WriteLine($"Current line: {line}");
}
+
Thread.Sleep(10);
}
+
WriteLine("Song finished");
Thread.Sleep(1000); // wait a second, so the reverb may fade out a bit...
slot.Close();
diff --git a/Examples/ObjectWrapperPlaySong.cs b/Examples/ObjectWrapperPlaySong.cs
index 1a7a8b4..932713e 100644
--- a/Examples/ObjectWrapperPlaySong.cs
+++ b/Examples/ObjectWrapperPlaySong.cs
@@ -29,8 +29,10 @@ protected override void RunTest(ISunVoxLib lib)
line = currentLine;
WriteLine($"Current line: {line}");
}
+
Thread.Sleep(10);
}
+
WriteLine("Song finished");
Thread.Sleep(1000); // wait a second, so the reverb may fade out a bit...
diff --git a/Examples/ObjectWrapperSendEvents.cs b/Examples/ObjectWrapperSendEvents.cs
index 454392e..1261b18 100644
--- a/Examples/ObjectWrapperSendEvents.cs
+++ b/Examples/ObjectWrapperSendEvents.cs
@@ -28,13 +28,13 @@ private void SendNotes(Slot slot)
var ticksPerBeat = (int)(ticksPerSecond * 60f / 80f);
var data = new (Note note, int time)[] // the lick, lol
{
- (new Note(NoteName.D, 3), ticksPerBeat/4), // note, and the time it should be held, in ticks
- (new Note(NoteName.E, 3), ticksPerBeat/4),
- (new Note(NoteName.F, 3), ticksPerBeat/4),
- (new Note(NoteName.G, 3), ticksPerBeat/4),
- (new Note(NoteName.E, 3), ticksPerBeat * 2/4),
- (new Note(NoteName.C, 3), ticksPerBeat/4),
- (new Note(NoteName.D, 3), ticksPerBeat/4),
+ (new Note(NoteName.D, 3), ticksPerBeat / 4), // note, and the time it should be held, in ticks
+ (new Note(NoteName.E, 3), ticksPerBeat / 4),
+ (new Note(NoteName.F, 3), ticksPerBeat / 4),
+ (new Note(NoteName.G, 3), ticksPerBeat / 4),
+ (new Note(NoteName.E, 3), ticksPerBeat * 2 / 4),
+ (new Note(NoteName.C, 3), ticksPerBeat / 4),
+ (new Note(NoteName.D, 3), ticksPerBeat / 4),
(Note.Off, 0)
};
@@ -46,6 +46,7 @@ private void SendNotes(Slot slot)
vp.SendEvent(0, new PatternEvent(pair.note, 0x80, 2));
accumulator += pair.time;
}
+
vp.ResetEventTiming();
var wait = accumulator / (float)ticksPerSecond + 1;
diff --git a/Examples/ObjectWrapperUseModules.cs b/Examples/ObjectWrapperUseModules.cs
index df5d34f..6525a48 100644
--- a/Examples/ObjectWrapperUseModules.cs
+++ b/Examples/ObjectWrapperUseModules.cs
@@ -32,10 +32,11 @@ protected override void RunTest(ISunVoxLib lib)
foreach (var f in buffer)
WriteLine($"{f}");
WriteLine($"Changing drawn values");
- for(int i = 0; i < 32; i++)
+ for (int i = 0; i < 32; i++)
{
- buffer[i] = MathF.Sin(i * MathF.PI*2/32f);
+ buffer[i] = MathF.Sin(i * MathF.PI * 2 / 32f);
}
+
analogGenerator.WriteDrawnValues(buffer);
WriteLine($"Reading drawn values");
analogGenerator.ReadDrawnValues(buffer);
@@ -50,14 +51,16 @@ protected override void RunTest(ISunVoxLib lib)
while (line != slot.GetSongLengthInLines() - 1 || slot.IsPlaying())
{
var currentLine = slot.GetCurrentLine();
- analogGenerator.SetPanning((int)(128 * MathF.Sin(currentLine/32f*4f)));
+ analogGenerator.SetPanning((int)(128 * MathF.Sin(currentLine / 32f * 4f)));
if (currentLine != line)
{
line = currentLine;
WriteLine($"Current line: {line}");
}
+
Thread.Sleep(10);
}
+
WriteLine("Song finished");
Thread.Sleep(1000); // wait a second, so the reverb may fade out a bit...
slot.Close();
diff --git a/Examples/Program.cs b/Examples/Program.cs
index f5e1385..a89154b 100644
--- a/Examples/Program.cs
+++ b/Examples/Program.cs
@@ -1,6 +1,6 @@
namespace Examples;
-internal static partial class Program
+internal static class Program
{
private static List Options = new List()
{
@@ -13,7 +13,6 @@ internal static partial class Program
new ManualJobContainer("Object wrapper - send events"),
new ManualJobContainer("Object wrapper - using Modules"),
new ManualJobContainer("Object wrapper - manage patterns"),
- new ManualJobContainer("Abstraction - horizontal jumps"),
};
private static void Main(string[] args)
diff --git a/Examples/ThinWrapperListModulesAndPatterns.cs b/Examples/ThinWrapperListModulesAndPatterns.cs
index f237890..d2157f3 100644
--- a/Examples/ThinWrapperListModulesAndPatterns.cs
+++ b/Examples/ThinWrapperListModulesAndPatterns.cs
@@ -59,7 +59,8 @@ private void ListPatterns(ISunVoxLib lib)
var tracks = lib.GetPatternTracks(0, i);
var lines = lib.GetPatternLines(0, i);
var data = lib.GetPatternData(0, i);
- WriteLine($"{i}. \"{name}\" at position (x: {position.x}, y: {position.y}), length: ({tracks}x{lines})");
+ WriteLine(
+ $"{i}. \"{name}\" at position (x: {position.x}, y: {position.y}), length: ({tracks}x{lines})");
WriteLine("Data:");
WriteLine(string.Join(" ", Enumerable.Repeat("NNVVMMMMCCEEXXYY", tracks)));
@@ -72,6 +73,7 @@ private void ListPatterns(ISunVoxLib lib)
if (t < tracks - 1)
Write(" ");
}
+
Write(Environment.NewLine);
}
}
diff --git a/Examples/ThinWrapperPlaySong.cs b/Examples/ThinWrapperPlaySong.cs
index 836f771..5689df0 100644
--- a/Examples/ThinWrapperPlaySong.cs
+++ b/Examples/ThinWrapperPlaySong.cs
@@ -13,7 +13,7 @@ protected override void RunTest(ISunVoxLib lib)
lib.OpenSlot(0);
lib.Load(0, "the_lick.sunvox");
WriteLine($"Loaded song: {lib.GetSongName(0)}");
- lib.SetAutostop(0, autostop: true);
+ lib.SetAutoStop(0, autoStop: true);
lib.Rewind(0, line: 0);
WriteLine("Playing the song");
lib.Play(0);
@@ -27,8 +27,10 @@ protected override void RunTest(ISunVoxLib lib)
line = currentLine;
WriteLine($"Current line: {line}");
}
+
Thread.Sleep(10);
}
+
WriteLine("Song finished");
Thread.Sleep(1000); // wait a second, so the reverb may fade out a bit...
diff --git a/Examples/ThinWrapperSendEvents.cs b/Examples/ThinWrapperSendEvents.cs
index 398f806..cbab3c2 100644
--- a/Examples/ThinWrapperSendEvents.cs
+++ b/Examples/ThinWrapperSendEvents.cs
@@ -26,13 +26,13 @@ private void SendNotes(ISunVoxLib lib)
var tpb = (int)(tps * 60f / 80f);
var data = new (Note note, int time)[] // the lick, lol
{
- (new Note(NoteName.D, 3), tpb/4), // note, and the time it should be held, in ticks
- (new Note(NoteName.E, 3), tpb/4),
- (new Note(NoteName.F, 3), tpb/4),
- (new Note(NoteName.G, 3), tpb/4),
- (new Note(NoteName.E, 3), tpb * 2/4),
- (new Note(NoteName.C, 3), tpb/4),
- (new Note(NoteName.D, 3), tpb/4),
+ (new Note(NoteName.D, 3), tpb / 4), // note, and the time it should be held, in ticks
+ (new Note(NoteName.E, 3), tpb / 4),
+ (new Note(NoteName.F, 3), tpb / 4),
+ (new Note(NoteName.G, 3), tpb / 4),
+ (new Note(NoteName.E, 3), tpb * 2 / 4),
+ (new Note(NoteName.C, 3), tpb / 4),
+ (new Note(NoteName.D, 3), tpb / 4),
(Note.Off, 0)
};
@@ -44,6 +44,7 @@ private void SendNotes(ISunVoxLib lib)
lib.SendEvent(0, 0, new PatternEvent(pair.note, 0x80, 2));
accumulator += pair.time;
}
+
lib.SetSendEventTimestamp(0, true);
var wait = accumulator / (float)tps + 1;
diff --git a/Examples/ThinWrapperUserAudioCallback.cs b/Examples/ThinWrapperUserAudioCallback.cs
index 852bae6..28f9208 100644
--- a/Examples/ThinWrapperUserAudioCallback.cs
+++ b/Examples/ThinWrapperUserAudioCallback.cs
@@ -9,12 +9,13 @@ internal class ThinWrapperUserAudioCallback : BaseExample
protected override void RunTest(ISunVoxLib lib)
{
WriteLine("Initializing");
- lib.Init(48000, channels: AudioChannels.Stereo, flags: InitFlags.UserAudioCallback | InitFlags.AudioFloat32);
+ lib.Init(48000, channels: AudioChannels.Stereo,
+ flags: InitFlags.UserAudioCallback | InitFlags.AudioFloat32);
WriteLine("Loading the song");
lib.OpenSlot(0);
lib.Load(0, "the_lick.sunvox");
WriteLine($"Loaded song: {lib.GetSongName(0)}");
- lib.SetAutostop(0, autostop: true);
+ lib.SetAutoStop(0, autoStop: true);
lib.Rewind(0, line: 0);
WriteLine("Playing the song");
lib.Play(0);
@@ -34,8 +35,10 @@ protected override void RunTest(ISunVoxLib lib)
line = currentLine;
WriteLine($"Current line: {line}");
}
+
Thread.Sleep(10);
}
+
WriteLine("Song finished");
Thread.Sleep(1000); // wait a second, so the reverb may fade out a bit...
}
@@ -75,6 +78,7 @@ public int Read(float[] buffer, int offset, int count)
{
buffer[offset + i] = _internalBuffer[_offset + i];
}
+
_offset += copiedCount;
return copiedCount;
}
diff --git a/SunSharp.Redistribution/Redistribution.cs b/SunSharp.Redistribution/Redistribution.cs
index ce8ca2b..fdf3f5b 100644
--- a/SunSharp.Redistribution/Redistribution.cs
+++ b/SunSharp.Redistribution/Redistribution.cs
@@ -1,7 +1,7 @@
-using SunSharp.LibraryLoading;
-using System;
+using System;
using System.IO;
using System.Runtime.InteropServices;
+using SunSharp.LibraryLoading;
namespace SunSharp.Redistribution
{
@@ -101,6 +101,7 @@ private static string GetLibraryPath()
if (RuntimeInformation.ProcessArchitecture == Architecture.X86)
return Path.Combine("lib", "windows", "lib_x86", "sunvox.dll");
}
+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
@@ -110,6 +111,7 @@ private static string GetLibraryPath()
if (RuntimeInformation.ProcessArchitecture == Architecture.X86)
return Path.Combine("lib", "linux", "lib_x86", "sunvox.so");
}
+
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
@@ -117,59 +119,56 @@ private static string GetLibraryPath()
if (RuntimeInformation.ProcessArchitecture == Architecture.X64)
return Path.Combine("lib", "macos", "lib_x86_64", "sunvox.dylib");
}
+
throw new InvalidOperationException("Unsupported OS.");
}
#endregion platform invoke
- private static readonly object _lock = new object();
- private static IntPtr LoadedLibraryHandle;
- private static ProxyClass proxyClass;
+ private static readonly object Lock = new object();
+ private static IntPtr _loadedLibraryHandle = IntPtr.Zero;
+ private static ProxyClass? _proxyClass;
public static void LoadLibrary()
{
- lock (_lock)
+ lock (Lock)
{
- if (LoadedLibraryHandle == IntPtr.Zero)
- {
- var path = GetLibraryPath();
- if (!File.Exists(path))
- throw new InvalidOperationException($"Library at location \"{path}\" does not exist.");
-
- LoadedLibraryHandle = LoadLibrary(path);
- if (LoadedLibraryHandle == IntPtr.Zero)
- throw new InvalidOperationException("LoadLibrary failed.");
- }
+ if (_loadedLibraryHandle != IntPtr.Zero)
+ return;
+
+ var path = GetLibraryPath();
+ if (!File.Exists(path))
+ throw new InvalidOperationException($"Library at location \"{path}\" does not exist.");
+
+ _loadedLibraryHandle = LoadLibrary(path);
+ if (_loadedLibraryHandle == IntPtr.Zero)
+ throw new InvalidOperationException("LoadLibrary failed.");
}
}
public static ISunVoxLib GetLibrary()
{
- lock (_lock)
+ lock (Lock)
{
- if (LoadedLibraryHandle == IntPtr.Zero)
+ if (_loadedLibraryHandle == IntPtr.Zero)
throw new InvalidOperationException("Library is not loaded yet.");
- if (proxyClass == null)
- {
- proxyClass = new ProxyClass(GetDelegateFromName);
- }
- return proxyClass;
+ return _proxyClass ??= new ProxyClass(GetDelegateFromName);
}
}
public static void UnloadLibrary()
{
- lock (_lock)
+ lock (Lock)
{
- if (LoadedLibraryHandle != IntPtr.Zero)
- UnloadLibrary(LoadedLibraryHandle);
+ if (_loadedLibraryHandle != IntPtr.Zero)
+ UnloadLibrary(_loadedLibraryHandle);
}
}
private static Delegate GetDelegateFromName(string name, Type delegateType)
{
- var ptr = FindFunction(LoadedLibraryHandle, name);
+ var ptr = FindFunction(_loadedLibraryHandle, name);
if (ptr == IntPtr.Zero)
throw new InvalidOperationException($"Symbol {name} not found! Library: {GetLibraryPath()}.");
return Marshal.GetDelegateForFunctionPointer(ptr, delegateType);
diff --git a/SunSharp.Redistribution/SunSharp.Redistribution.csproj b/SunSharp.Redistribution/SunSharp.Redistribution.csproj
index 09a402e..7ec2819 100644
--- a/SunSharp.Redistribution/SunSharp.Redistribution.csproj
+++ b/SunSharp.Redistribution/SunSharp.Redistribution.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
SunSharp.Redistribution
True
Sotakebk.SunSharp.Redistribution
@@ -19,6 +19,19 @@
license.txt
True
snupkg
+ enable
+
+
+
+ 9999
+
+ $(WarningsAsErrors);NU1605;Nullable
+
+
+
+ 9999
+
+ $(WarningsAsErrors);NU1605;Nullable
diff --git a/SunSharp/Abstractions/AbstractionBuildingException.cs b/SunSharp/Abstractions/AbstractionBuildingException.cs
deleted file mode 100644
index 9ddc0c0..0000000
--- a/SunSharp/Abstractions/AbstractionBuildingException.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace SunSharp.Abstractions
-{
- internal class AbstractionBuildingException : System.Exception
- {
- public AbstractionBuildingException(string message) : base(message)
- {
- }
-
- public AbstractionBuildingException(string message, System.Exception innerException) : base(message, innerException)
- {
- }
- }
-}
diff --git a/SunSharp/Abstractions/Horizontal/Jumping/Graph.cs b/SunSharp/Abstractions/Horizontal/Jumping/Graph.cs
deleted file mode 100644
index 367e0ab..0000000
--- a/SunSharp/Abstractions/Horizontal/Jumping/Graph.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SunSharp.Abstractions.Horizontal.Jumping
-{
- public sealed class Graph
- {
- public string Name { get; internal set; }
- public IReadOnlyCollection States { get; internal set; }
- public IReadOnlyCollection Transitions { get; internal set; }
- public State StartingState { get; internal set; }
-
- internal Graph()
- {
- }
-
- public static Graph BuildFromData(GraphData data)
- {
- var states = data.States.Select(s => new State()
- {
- Id = s.Id,
- Name = s.Name,
- FirstLine = s.FirstLine,
- LastLine = s.LastLine
- }).ToArray();
-
- var transitions = data.Transitions.Select(t => new Transition()
- {
- Id = t.Id,
- Name = t.Name,
- Looping = t.FromStateId == t.ToStateId,
- Stopping = t.IsStopping,
- FromState = states.First(s => s.Id == t.FromStateId),
- ToState = states.First(s => s.Id == t.ToStateId),
- PatternIds = t.PatternIds.Select(i => i).ToArray()
- }).ToArray();
-
- foreach (var state in states)
- {
- state.LoopingTransition = transitions.FirstOrDefault(t => t.Looping && t.FromState == state);
- state.StoppingTransition = transitions.FirstOrDefault(t => t.Stopping && t.FromState == state);
- state.TransitionsFrom = transitions.Where(t => t.ToState == state
- && t != state.LoopingTransition
- && t != state.StoppingTransition).ToArray();
- state.TransitionsTo = transitions.Where(t => t.FromState == state
- && t != state.LoopingTransition
- && t != state.StoppingTransition).ToArray();
- }
-
- var graph = new Graph()
- {
- Name = data.Name,
- StartingState = (data.StartStateId != null)
- ? states.First(s => s.Id == data.StartStateId)
- : null,
- States = states.ToArray(),
- Transitions = transitions.ToArray()
- };
-
- foreach (var state in states)
- state.JumpGraph = graph;
-
- foreach (var transition in transitions)
- transition.JumpGraph = graph;
-
- return graph;
- }
- }
-
- public sealed class State
- {
- public Graph JumpGraph { get; internal set; }
- public int Id { get; internal set; }
- public string Name { get; internal set; }
- public int FirstLine { get; internal set; }
- public int LastLine { get; internal set; }
- public Transition LoopingTransition { get; internal set; }
- public Transition StoppingTransition { get; internal set; }
- public IReadOnlyCollection TransitionsFrom { get; internal set; }
- public IReadOnlyCollection TransitionsTo { get; internal set; }
-
- internal State()
- {
- }
- }
-
- public sealed class Transition
- {
- public Graph JumpGraph { get; internal set; }
- public int Id { get; internal set; }
- public string Name { get; internal set; }
- public bool Stopping { get; internal set; }
- public bool Looping { get; internal set; }
- public State FromState { get; internal set; }
- public State ToState { get; internal set; }
- public IReadOnlyCollection PatternIds { get; internal set; }
-
- internal Transition()
- {
- }
- }
-}
diff --git a/SunSharp/Abstractions/Horizontal/Jumping/GraphBuilder.cs b/SunSharp/Abstractions/Horizontal/Jumping/GraphBuilder.cs
deleted file mode 100644
index c580869..0000000
--- a/SunSharp/Abstractions/Horizontal/Jumping/GraphBuilder.cs
+++ /dev/null
@@ -1,512 +0,0 @@
-using SunSharp.DerivedData;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SunSharp.Abstractions.Horizontal.Jumping
-{
- public static class GraphBuilder
- {
- #region building
-
- public static GraphData BuildJumpGraph(IReadOnlySongData songData, IGraphDescription description, Action feedback = null)
- {
- var patterns = AnalyzePatterns(songData, feedback);
- var stacks = OrganizeStacks(patterns, feedback);
- var segments = SplitTimeline(stacks, description, feedback);
- var transitions = BuildTransitions(segments, patterns, feedback);
- var graph = ConstructGraph(segments, transitions, description, feedback);
-
- if (ValidateConstructedGraph(graph, description, feedback))
- throw new AbstractionBuildingException("Graph validation failed. Is the input data correct?");
-
- return graph;
- }
-
- #region pattern analysis
-
- private struct AnalyzedPattern
- {
- public int Id;
- public string Name;
- public int FirstLine;
- public int LastLine;
- public bool HasData;
- public (int from, int to)[] Jumps;
- public int[] Stops;
-
- public bool HasJumps => Jumps?.Any() ?? false;
- public bool HasStops => Stops?.Any() ?? false;
- }
-
- private static AnalyzedPattern[] AnalyzePatterns(IReadOnlySongData songData, Action feedback)
- {
- var analyzedPatterns = new List(songData.Patterns.Count);
- foreach (var pattern in songData.Patterns)
- {
- var analzedPattern = AnalyzePattern(pattern, feedback);
- analyzedPatterns.Add(analzedPattern);
- }
- return analyzedPatterns.ToArray();
- }
-
- private static AnalyzedPattern AnalyzePattern(IReadOnlyPatternData patternData, Action feedback)
- {
- int CalculateJumpTargetLine(int currentLine, ImmutablePatternEvent mode, ImmutablePatternEvent jump)
- {
- switch (mode.XXYY)
- {
- case 0: //0 - absolute address, relative to the start of the timeline(default)
- return jump.XXYY;
-
- case 1: //1 - (pattern beginning + address)
- return patternData.Position.X + jump.XXYY;
-
- case 2: //2 - (pattern beginning - address)
- return patternData.Position.X - jump.XXYY;
-
- case 3: //3 - (next line + address)
- return patternData.Position.X + currentLine + 1 + jump.XXYY;
-
- case 4: //4 - (next line - address);
- return patternData.Position.X + currentLine + 1 - jump.XXYY;
-
- default:
- feedback?.Invoke(MessageType.Warning, $"Unknown jump type {mode.XXYY} at line {currentLine} of pattern \"{patternData.Name}\", assuming absolute address.");
- return jump.XXYY;
- }
- }
-
- var hasNormalData = false;
- var jumps = new List<(int from, int to)>();
- var stops = new List();
-
- var lines = patternData.Lines;
- var tracks = patternData.Tracks;
- if (!patternData.IsLinear)
- {
- for (int l = 0; l < lines; l++)
- {
- ImmutablePatternEvent? setJumpMode = null;
- ImmutablePatternEvent? jump = null;
-
- for (int t = 0; t < tracks; t++)
- {
- var cEvent = patternData.Data.ElementAt(l * tracks + t);
- if (cEvent.NN != 0 || cEvent.MM != 0 || cEvent.CC != 0)
- hasNormalData = true;
-
- if (cEvent.Effect == Effect.SetJumpMode)
- {
- if (setJumpMode != null)
- feedback?.Invoke(MessageType.Warning, $"Line {l} of pattern \"{patternData.Name}\" (id:{patternData.Id}) has multiple jump mode setting effects.");
- else
- setJumpMode = cEvent;
- }
- if (cEvent.Effect == Effect.Jump)
- {
- if (jump != null)
- feedback?.Invoke(MessageType.Warning, $"Line {l} of pattern \"{patternData.Name}\" (id:{patternData.Id}) has multiple jump effects.");
- else
- jump = cEvent;
- }
- if (cEvent.Effect == Effect.StopPlaying)
- {
- stops.Add(patternData.Position.X + l);
- }
- }
- if (setJumpMode != null && jump != null)
- {
- jumps.Add((patternData.Position.X + l, CalculateJumpTargetLine(l, setJumpMode.Value, jump.Value)));
- }
- if ((setJumpMode == null && jump != null) || (setJumpMode != null && jump == null))
- {
- feedback?.Invoke(MessageType.Warning, $"Line {l} of pattern \"{patternData.Name}\" (id:{patternData.Id}) has malformed jump instruction. Both jump and jump mode setting effects must exist on the same line. Jump ignored!");
- }
- }
- }
-
- var ap = new AnalyzedPattern()
- {
- FirstLine = patternData.Position.X,
- LastLine = patternData.Position.X + patternData.Lines - 1,
- Id = patternData.Id,
- Name = patternData.Name,
- HasData = hasNormalData,
- Jumps = jumps.ToArray(),
- Stops = stops.ToArray()
- };
-
- if (ap.HasData && ap.HasJumps)
- {
- feedback?.Invoke(MessageType.Warning, $"Pattern \"{patternData.Name}\" (id:{patternData.Id}) has both jumps and normal data, which may cause unexpected behaviour.");
- }
-
- if (patternData.IsDestructive)
- {
- feedback?.Invoke(MessageType.Info, $"Pattern \"{patternData.Name}\" (id:{patternData.Id}) has destructive effects, which may cause unexpected behaviour.");
- }
-
- if (ap.HasJumps && ap.HasStops)
- {
- feedback?.Invoke(MessageType.Error, $"Pattern \"{patternData.Name}\" (id:{patternData.Id}) has both jumps and stops, which may cause unexpected behaviour.");
- throw new AbstractionBuildingException($"Pattern \"{patternData.Name}\" (id:{patternData.Id}) has both jumps and stops, which may cause unexpected behaviour.");
- }
-
- if (ap.HasJumps && !jumps.Any(j => j.from == patternData.Position.X + patternData.Lines - 1))
- {
- feedback?.Invoke(MessageType.Warning, $"Pattern \"{patternData.Name}\" (id:{patternData.Id}) doesn't have any jumps on the final line, which may cause unexpected behaviour.");
- }
-
- if (ap.HasStops && !stops.Any(s => s == patternData.Position.X + patternData.Lines - 1))
- {
- feedback?.Invoke(MessageType.Warning, $"Pattern \"{patternData.Name}\" (id:{patternData.Id}) despite having stopping effects, doesn't have any stops on the final line, which may cause unexpected behaviour.");
- }
-
- return ap;
- }
-
- #endregion pattern analysis
-
- #region stack organisation
-
- private struct PatternStack
- {
- public int FirstLine;
- public int LastLine;
- public AnalyzedPattern[] Stack;
- }
-
- private static PatternStack[] OrganizeStacks(AnalyzedPattern[] analyzedPatterns, Action feedback = null)
- {
- var firstLine = analyzedPatterns.Min(p => p.FirstLine);
- var lastLine = analyzedPatterns.Max(p => p.LastLine);
-
- var leftEdges = analyzedPatterns.Select(p => p.FirstLine);
- var rightEdges = analyzedPatterns.Select(p => p.LastLine);
- var edges = leftEdges.Union(rightEdges).OrderBy(i => i).ToArray();
-
- var stacks = new List();
- for (int i = 0; i < edges.Length - 1; i++)
- {
- var left = edges[i];
- var right = edges[i + 1];
-
- var stack = analyzedPatterns.Where(p => (left < p.LastLine) && (p.FirstLine < right)).ToArray();
- if (stack.Length != 0)
- stacks.Add(new PatternStack() { FirstLine = left, LastLine = right, Stack = stack });
- }
-
- return stacks.ToArray();
- }
-
- #endregion stack organisation
-
- #region split timeline
-
- private enum SegmentType
- {
- Unknown,
- Known,
- Overlap
- }
-
- private class TimelineSegment
- {
- public string Name;
- public int FirstLine;
- public int LastLine;
- public SegmentType Type;
- public AnalyzedPattern? GuidePattern;
- public AnalyzedPattern[] Patterns;
- }
-
- private static TimelineSegment[] SplitTimeline(PatternStack[] stacks, IGraphDescription description, Action feedback)
- {
- var sortedStacks = stacks.OrderBy(s => s.FirstLine).ToArray();
- var segments = new List();
- var stateNames = description.DescribedStates.ToDictionary(s => s.GuideName, s => s.Name);
-
- int i = 0;
- TimelineSegment currentSegment = null;
-
- while (i < sortedStacks.Length)
- {
- var currentStack = sortedStacks[i];
-
- var names = currentStack.Stack.Where(p => stateNames.ContainsKey(p.Name)).Select(p => stateNames[p.Name]);
-
- var type = SegmentType.Unknown;
- if (names.Count() == 1)
- type = SegmentType.Known;
- else if (names.Count() > 1)
- type = SegmentType.Overlap;
-
- var segmentName = string.Empty;
- if (type == SegmentType.Known)
- segmentName = names.First();
- else if (type == SegmentType.Unknown)
- segmentName = "Unknown";
- else if (type == SegmentType.Overlap)
- segmentName = $"Overlap ({string.Join(",", names)})";
-
- // merge the segments if possible
- if (currentSegment != null && type == currentSegment.Type && segmentName == currentSegment.Name && currentSegment.LastLine + 1 == stacks[i].FirstLine)
- {
- currentSegment.LastLine = currentStack.LastLine;
- currentSegment.Patterns = currentSegment.Patterns.Union(currentStack.Stack)
- .GroupBy(p => p.Id)
- .Select(g => g.First())
- .ToArray();
- }
- else
- {
- currentSegment = new TimelineSegment()
- {
- FirstLine = currentStack.FirstLine,
- LastLine = currentStack.LastLine,
- Name = segmentName,
- Patterns = currentStack.Stack,
- Type = type,
- };
- if (type == SegmentType.Known)
- currentSegment.GuidePattern = currentStack.Stack.First(p => stateNames.ContainsKey(p.Name));
- segments.Add(currentSegment);
- }
- i++;
- }
-
- foreach (var segment in segments)
- {
- if (segment.Type == SegmentType.Overlap)
- feedback?.Invoke(MessageType.Warning, $"{segment.Name} at lines {segment.FirstLine} to {segment.LastLine}.");
- if (segment.Type == SegmentType.Unknown)
- feedback?.Invoke(MessageType.Warning, $"Unknown state at lines {segment.FirstLine} to {segment.LastLine}.");
- }
-
- var multipleSegments = segments.Where(s => s.Type == SegmentType.Known).GroupBy(s => s.Name);
- foreach (var group in multipleSegments)
- {
- if (group.Count() > 1)
- {
- feedback?.Invoke(MessageType.Error, $"State \"{group.Key}\" occurs multiple times.");
- throw new AbstractionBuildingException($"State \"{group.Key}\" occurs multiple times.");
- }
- }
-
- return segments.ToArray();
- }
-
- #endregion split timeline
-
- #region build transitions
-
- private class PreparedTransition
- {
- public TimelineSegment From;
- public TimelineSegment To;
- public bool HasJumps;
- public bool HasStops;
- public List PatternIds;
- }
-
- private static PreparedTransition[] BuildTransitions(TimelineSegment[] segments, AnalyzedPattern[] patterns, Action feedback)
- {
- var transitions = new List();
-
- TimelineSegment SegmentFromPosition(int i)
- {
- return segments.Where(s => s.FirstLine <= i && s.LastLine >= i).FirstOrDefault();
- }
-
- foreach (var pattern in patterns)
- {
- if (pattern.HasJumps)
- {
- var segmentsFrom = pattern.Jumps.Select(j => SegmentFromPosition(j.from)).Distinct();
- var segmentsTo = pattern.Jumps.Select(j => SegmentFromPosition(j.to)).Distinct();
-
- if (segmentsFrom.Contains(null) || segmentsFrom.Any(s => s.Type == SegmentType.Unknown))
- {
- feedback?.Invoke(MessageType.Error, $"Transition pattern \"{pattern.Name}\" (id:{pattern.Id}) has jumps from an unknown state or silence. Pattern ignored!");
- continue;
- }
-
- if (segmentsTo.Contains(null) || segmentsTo.Any(s => s.Type == SegmentType.Unknown))
- {
- feedback?.Invoke(MessageType.Error, $"Transition pattern \"{pattern.Name}\" (id:{pattern.Id}) has jumps to an unknown state or silence. Pattern ignored!");
- continue;
- }
-
- if (segmentsFrom.Count() != 1)
- {
- feedback?.Invoke(MessageType.Error, $"Transition pattern \"{pattern.Name}\" (id:{pattern.Id}) has jumps from multiple states. Pattern ignored!");
- continue;
- }
- if (segmentsTo.Count() != 1)
- {
- feedback?.Invoke(MessageType.Error, $"Transition pattern \"{pattern.Name}\" (id:{pattern.Id}) has jumps to multiple states. Pattern ignored!");
- continue;
- }
-
- var segmentFrom = segmentsFrom.First();
- var segmentTo = segmentsTo.First();
-
- var existing = transitions.FirstOrDefault(t => t.From == segmentFrom && t.To == segmentTo && t.HasJumps == true && t.HasStops == false);
-
- if (existing != null)
- existing.PatternIds.Add(pattern.Id);
- else
- {
- transitions.Add(new PreparedTransition()
- {
- From = segmentFrom,
- To = segmentTo,
- HasJumps = true,
- PatternIds = new List() { pattern.Id }
- });
- }
- }
- else if (pattern.HasStops)
- {
- var segmentsIn = pattern.Stops.Select(s => SegmentFromPosition(s)).Distinct();
- if (segmentsIn.Contains(null) || segmentsIn.Any(s => s.Type == SegmentType.Unknown))
- {
- feedback?.Invoke(MessageType.Error, $"Transition pattern \"{pattern.Name}\" (id:{pattern.Id}) has stops in unknown states. Pattern ignored!");
- continue;
- }
- if (segmentsIn.Count() != 1)
- {
- feedback?.Invoke(MessageType.Error, $"Transition pattern \"{pattern.Name}\" (id:{pattern.Id}) has jumps in multiple states. Pattern ignored!");
- continue;
- }
-
- var segmentIn = segmentsIn.First();
- var existing = transitions.FirstOrDefault(t => t.From == segmentIn && t.To == segmentIn && t.HasJumps == false && t.HasStops == true);
-
- if (existing != null)
- existing.PatternIds.Add(pattern.Id);
- else
- {
- transitions.Add(new PreparedTransition()
- {
- From = segmentIn,
- To = segmentIn,
- HasStops = true,
- PatternIds = new List() { pattern.Id }
- });
- }
- }
- }
-
- return transitions.ToArray();
- }
-
- #endregion build transitions
-
- #region construct graph
-
- private static GraphData ConstructGraph(TimelineSegment[] segments, PreparedTransition[] transitions, IGraphDescription description, Action feedback)
- {
- var _states = new List();
- var _transitions = new List();
-
- int _stateId = 1;
- foreach (var segment in segments)
- {
- if (segment.GuidePattern == null) // ignore overlaps and unknowns
- continue;
-
- var newState = new StateData()
- {
- Id = _stateId,
- FirstLine = segment.FirstLine,
- LastLine = segment.LastLine,
- Name = segment.Name
- };
- _states.Add(newState);
- _stateId++;
- }
-
- int _transitionId = 1;
- foreach (var transition in transitions)
- {
- var newTransition = new TransitionData()
- {
- Id = _transitionId,
- Name = description.DescribedTransitions
- .FirstOrDefault(dt => dt.FromState.Name == transition.From.Name && dt.ToState.Name == transition.To.Name)
- ?.Name ?? $"(from \"{transition.From.Name}\" to \"{transition.To.Name}\")",
- PatternIds = transition.PatternIds.ToArray(),
- IsStopping = transition.HasStops,
- FromStateId = _states.First(s => s.Name == transition.From.Name).Id,
- ToStateId = _states.First(s => s.Name == transition.To.Name).Id
- };
- _transitions.Add(newTransition);
- _transitionId++;
- }
-
- var graph = new GraphData()
- {
- Name = description.Name,
- States = _states.ToArray(),
- Transitions = _transitions.ToArray(),
- StartStateId = (description.StartState != null)
- ? (int?)_states.FirstOrDefault(s => s.Name == description.StartState.Name).Id
- : null
- };
-
- return graph;
- }
-
- #endregion construct graph
-
- #region validate constructed graph
-
- private static bool ValidateConstructedGraph(GraphData graph, IGraphDescription description, Action feedback)
- {
- foreach (var describedState in description.DescribedStates)
- {
- var state = graph.States.FirstOrDefault(s => s.Name == describedState.Name);
- if (state == null)
- {
- feedback?.Invoke(MessageType.Error, $"Expected state \"{describedState.Name}\" was not found in built graph.");
- return false;
- }
- if (describedState.HasLoop)
- {
- var loopTransition = graph.Transitions.FirstOrDefault(t => t.FromStateId == state.Id && t.ToStateId == state.Id && t.IsStopping);
- if (loopTransition == null)
- {
- feedback?.Invoke(MessageType.Error, $"Expected loop transition for state \"{describedState.Name}\" was not found in built graph.");
- return false;
- }
- }
- if (describedState.HasStop)
- {
- var stopTransition = graph.Transitions.FirstOrDefault(t => t.FromStateId == state.Id && t.ToStateId == state.Id && t.IsStopping);
- if (stopTransition == null)
- {
- feedback?.Invoke(MessageType.Error, $"Expected stop transition for state \"{describedState.Name}\" was not found in built graph.");
- return false;
- }
- }
- }
-
- foreach (var describedTransition in description.DescribedTransitions)
- {
- var transition = graph.Transitions.FirstOrDefault(t =>
- graph.States.First(s => s.Id == t.FromStateId).Name == describedTransition.FromState.Name
- && graph.States.First(s => s.Id == t.ToStateId).Name == describedTransition.ToState.Name);
- if (transition == null)
- feedback?.Invoke(MessageType.Error, $"Expected transition \"{describedTransition.Name}\" was not found in built graph.");
- return false;
- }
- return true;
- }
-
- #endregion validate constructed graph
-
- #endregion building
- }
-}
diff --git a/SunSharp/Abstractions/Horizontal/Jumping/GraphData.cs b/SunSharp/Abstractions/Horizontal/Jumping/GraphData.cs
deleted file mode 100644
index a6648da..0000000
--- a/SunSharp/Abstractions/Horizontal/Jumping/GraphData.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SunSharp.Abstractions.Horizontal.Jumping
-{
- // TODO make setters init, or properties readonly when raising C# version?
-
- public class GraphData
- {
- public string Name { get; set; }
- public int? StartStateId { get; set; }
- public IReadOnlyCollection States { get; set; }
- public IReadOnlyCollection Transitions { get; set; }
-
- public GraphData()
- {
- }
-
- public static GraphData DeepCopy(GraphData original)
- {
- if (original == null)
- throw new System.ArgumentNullException(nameof(original));
-
- return new GraphData()
- {
- Name = original.Name,
- StartStateId = original.StartStateId,
- States = original.States.Select(s => StateData.DeepCopy(s)).ToArray(),
- Transitions = original.Transitions.Select(t => TransitionData.DeepCopy(t)).ToArray()
- };
- }
- }
-
- public class StateData
- {
- public int Id { get; set; }
- public string Name { get; set; }
- public int FirstLine { get; set; }
- public int LastLine { get; set; }
-
- public StateData()
- {
- }
-
- public static StateData DeepCopy(StateData original)
- {
- if (original == null)
- throw new System.ArgumentNullException(nameof(original));
-
- return new StateData()
- {
- Id = original.Id,
- FirstLine = original.FirstLine,
- LastLine = original.LastLine,
- Name = original.Name,
- };
- }
- }
-
- public class TransitionData
- {
- public int Id { get; set; }
- public string Name { get; set; }
- public int FromStateId { get; set; }
- public int ToStateId { get; set; }
- public bool IsStopping { get; set; }
- public IReadOnlyCollection PatternIds { get; set; }
-
- public TransitionData()
- {
- }
-
- public static TransitionData DeepCopy(TransitionData original)
- {
- if (original == null)
- throw new System.ArgumentNullException(nameof(original));
-
- return new TransitionData()
- {
- Id = original.Id,
- Name = original.Name,
- FromStateId = original.FromStateId,
- ToStateId = original.ToStateId,
- IsStopping = original.IsStopping,
- PatternIds = original.PatternIds.Select(i => i).ToArray()
- };
- }
- }
-}
diff --git a/SunSharp/Abstractions/Horizontal/Jumping/IGraphDescription.cs b/SunSharp/Abstractions/Horizontal/Jumping/IGraphDescription.cs
deleted file mode 100644
index e30a7cf..0000000
--- a/SunSharp/Abstractions/Horizontal/Jumping/IGraphDescription.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Collections.Generic;
-
-namespace SunSharp.Abstractions.Horizontal.Jumping
-{
- public interface IGraphDescription
- {
- string Name { get; }
- IStateDescription StartState { get; }
- IReadOnlyCollection DescribedStates { get; }
- IReadOnlyCollection DescribedTransitions { get; }
- }
-
- public interface IStateDescription
- {
- string Name { get; }
- string GuideName { get; }
- bool HasLoop { get; }
- bool HasStop { get; }
- }
-
- public interface ITransitionDescription
- {
- string Name { get; }
- IStateDescription FromState { get; }
- IStateDescription ToState { get; }
- }
-}
diff --git a/SunSharp/Abstractions/Horizontal/Jumping/JumpGraphController.cs b/SunSharp/Abstractions/Horizontal/Jumping/JumpGraphController.cs
deleted file mode 100644
index 50cd9c6..0000000
--- a/SunSharp/Abstractions/Horizontal/Jumping/JumpGraphController.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-using SunSharp.ObjectWrapper;
-using SunSharp.ThinWrapper;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SunSharp.Abstractions.Horizontal.Jumping
-{
- public class GraphController
- {
- protected Graph Graph { get; set; }
- protected ISunVoxLib Lib { get; set; }
- protected int SlotId { get; set; }
-
- public GraphController(Slot slot, GraphData data) : this(slot, Graph.BuildFromData(data))
- {
- Lib = slot.Library;
- SlotId = slot.Id;
- }
-
- public GraphController(ISunVoxLib lib, int slotId, GraphData data) : this(lib, slotId, Graph.BuildFromData(data))
- {
- Lib = lib;
- SlotId = slotId;
- }
-
- public GraphController(Slot slot, Graph graph)
- {
- Lib = slot.Library;
- SlotId = slot.Id;
- Graph = graph;
- }
-
- public GraphController(ISunVoxLib lib, int slotId, Graph graph)
- {
- Lib = lib;
- SlotId = slotId;
- Graph = graph;
- }
-
- public State GetState(int id)
- {
- return Graph.States.FirstOrDefault(s => s.Id == id);
- }
-
- public State GetState(string name)
- {
- return Graph.States.FirstOrDefault(s => s.Name == name);
- }
-
- public Transition GetTransition(int id)
- {
- return Graph.Transitions.FirstOrDefault(s => s.Id == id);
- }
-
- public Transition GetTransition(string name)
- {
- return Graph.Transitions.FirstOrDefault(s => s.Name == name);
- }
-
- public State GetCurrentState()
- {
- var position = Lib.GetCurrentLine(SlotId);
- return Lib.RunInLock(SlotId, () =>
- {
- return Graph.States.FirstOrDefault(s => s.FirstLine <= position && s.LastLine >= position);
- });
- }
-
- public void SetTransitionEnabled(Transition transition, bool enabled)
- {
- Lib.RunInLock(SlotId, () =>
- {
- foreach (var i in transition.PatternIds)
- Lib.SetPatternMute(SlotId, i, enabled);
- });
- }
-
- public void Start(State startingState, State targetState = null, TargetType targetType = TargetType.Either)
- {
- if (startingState.JumpGraph != Graph)
- throw new ArgumentException("Starting state does not belong to the graph provided in controller construction.");
-
- if (targetState == null)
- {
- targetState = startingState;
- }
- Lib.RunInLock(SlotId, () =>
- {
- DirectGraphToState(targetState, targetType);
- Lib.SetAutostop(SlotId, true);
- Lib.Rewind(SlotId, startingState.FirstLine);
- Lib.Play(SlotId);
- });
- }
-
- public void DirectGraphToState(State targetState, TargetType targetType = TargetType.Either)
- {
- if (targetState.JumpGraph != Graph)
- throw new ArgumentException("Target state does not belong to the graph provided in controller construction.");
-
- if (targetType == TargetType.Either && targetState.LoopingTransition == null && targetState.StoppingTransition == null)
- throw new ArgumentException("Target state does not have a looping transition or a stopping transition.");
-
- if (targetType == TargetType.Loop && targetState.LoopingTransition == null)
- throw new ArgumentException("Target state does not have a looping transition.");
-
- if (targetType == TargetType.Stop && targetState.StoppingTransition == null)
- throw new ArgumentException("Target state does not have a stopping transition.");
-
- var transitionsToEnable = new HashSet();
-
- var oldStates = new HashSet();
- var states = new HashSet();
- var newStates = new HashSet();
- states.Add(targetState);
-
- if (targetType == TargetType.Either)
- {
- if (targetState.LoopingTransition != null)
- transitionsToEnable.Add(targetState.LoopingTransition);
- else
- transitionsToEnable.Add(targetState.StoppingTransition);
- }
- else if (targetType == TargetType.Loop)
- transitionsToEnable.Add(targetState.LoopingTransition);
- else if (targetType == TargetType.Stop)
- transitionsToEnable.Add(targetState.StoppingTransition);
- else
- throw new ArgumentException("Unsupported value.", nameof(targetType));
-
- while (states.Any())
- {
- foreach (var state in states)
- {
- foreach (var transition in state.TransitionsFrom)
- {
- if (transition.ToState != transition.FromState
- && !oldStates.Contains(transition.ToState)
- && !oldStates.Contains(transition.FromState)
- && !states.Contains(transition.FromState))
- {
- newStates.Add(transition.FromState);
- transitionsToEnable.Add(transition);
- }
- }
- oldStates.Add(state);
- }
- (newStates, states) = (states, newStates);
- newStates.Clear();
- }
-
- Lib.RunInLock(SlotId, () =>
- {
- foreach (var transition in Graph.Transitions)
- {
- var enabled = transitionsToEnable.Contains(transition);
- foreach (var patternId in transition.PatternIds)
- {
- Lib.SetPatternMute(SlotId, patternId, !enabled);
- }
- }
- });
- }
-
- public object Select() => throw new NotImplementedException();
- }
-}
diff --git a/SunSharp/Abstractions/Horizontal/Jumping/SimpleGraphDescription.cs b/SunSharp/Abstractions/Horizontal/Jumping/SimpleGraphDescription.cs
deleted file mode 100644
index 8c13226..0000000
--- a/SunSharp/Abstractions/Horizontal/Jumping/SimpleGraphDescription.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SunSharp.Abstractions.Horizontal.Jumping
-{
- public class SimpleGraphDescription : IGraphDescription
- {
- public string Name { get; set; }
- public int? StartStateId { get; set; }
- IStateDescription IGraphDescription.StartState => (StartStateId == null) ? null : DescribedStates.First(s => s.Id == StartStateId);
- IReadOnlyCollection IGraphDescription.DescribedStates => DescribedStates;
- IReadOnlyCollection IGraphDescription.DescribedTransitions => DescribedTransitions;
-
- public List DescribedStates { get; private set; }
- public List DescribedTransitions { get; private set; }
-
- public SimpleGraphDescription()
- {
- DescribedStates = new List();
- DescribedTransitions = new List();
- }
-
- public SimpleStateDescription AddState(string name, string guideName, int? id = null, bool hasLoop = false, bool hasStop = false)
- {
- if (id == null)
- id = (DescribedStates.Count == 0) ? 0 : DescribedStates.Max(s => s.Id) + 1;
-
- var state = new SimpleStateDescription()
- {
- Id = id.Value,
- Name = name,
- GraphDescription = this,
- GuideName = guideName,
- HasLoop = hasLoop,
- HasStop = hasStop
- };
-
- DescribedStates.Add(state);
- return state;
- }
-
- public SimpleTransitionDescription AddTransition(string name, SimpleStateDescription from, SimpleStateDescription to, int? id = null)
- {
- if (id == null)
- id = (DescribedTransitions.Count == 0) ? 0 : DescribedTransitions.Max(s => s.Id) + 1;
-
- var transition = new SimpleTransitionDescription()
- {
- Id = id.Value,
- GraphDescription = this,
- StateFromId = from.Id,
- StateToId = to.Id,
- Name = name
- };
-
- DescribedTransitions.Add(transition);
- return transition;
- }
- }
-
- public class SimpleStateDescription : IStateDescription
- {
- public SimpleGraphDescription GraphDescription { get; set; }
- public int Id { get; set; }
- public string Name { get; set; }
- public string GuideName { get; set; }
- public bool HasLoop { get; set; }
- public bool HasStop { get; set; }
-
- public SimpleStateDescription()
- {
- }
- }
-
- public class SimpleTransitionDescription : ITransitionDescription
- {
- public SimpleGraphDescription GraphDescription { get; set; }
- public string Name { get; set; }
- public int Id { get; set; }
- public int StateFromId { get; set; }
- public int StateToId { get; set; }
-
- public IStateDescription FromState => GraphDescription.DescribedStates.First(s => s.Id == StateFromId);
- public IStateDescription ToState => GraphDescription.DescribedStates.First(s => s.Id == StateToId);
-
- public SimpleTransitionDescription()
- {
- }
- }
-}
diff --git a/SunSharp/Abstractions/Horizontal/Jumping/TargetType.cs b/SunSharp/Abstractions/Horizontal/Jumping/TargetType.cs
deleted file mode 100644
index 78b50f6..0000000
--- a/SunSharp/Abstractions/Horizontal/Jumping/TargetType.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace SunSharp.Abstractions.Horizontal.Jumping
-{
- public enum TargetType
- {
- Unknown,
- Loop,
- Stop,
- Either
- }
-}
diff --git a/SunSharp/Abstractions/MessageType.cs b/SunSharp/Abstractions/MessageType.cs
deleted file mode 100644
index 006b26b..0000000
--- a/SunSharp/Abstractions/MessageType.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace SunSharp.Abstractions
-{
- public enum MessageType
- {
- Info,
- Warning,
- Error
- }
-}
diff --git a/SunSharp/Constants.cs b/SunSharp/Constants.cs
index e2ed972..bc7468d 100644
--- a/SunSharp/Constants.cs
+++ b/SunSharp/Constants.cs
@@ -1,6 +1,8 @@
-namespace SunSharp
+#pragma warning disable CA1707 // keep same naming as in official sunvox documentation
+
+namespace SunSharp
{
- internal static class Constants
+ public static class Constants
{
public const uint SV_INIT_FLAG_NO_DEBUG_OUTPUT = 1 << 0;
public const uint SV_INIT_FLAG_USER_AUDIO_CALLBACK = 1 << 1;
diff --git a/SunSharp/DerivedData/ControllerData.cs b/SunSharp/DerivedData/ControllerData.cs
new file mode 100644
index 0000000..216144e
--- /dev/null
+++ b/SunSharp/DerivedData/ControllerData.cs
@@ -0,0 +1,22 @@
+namespace SunSharp.DerivedData
+{
+ public class ControllerData : IDeepCopyable
+ {
+ public int Id { get; set; }
+ public string Name { get; set; } = string.Empty;
+ public int Value { get; set; }
+ public ControllerType ControllerType { get; set; }
+
+ public ControllerData DeepCopy()
+ {
+ var clone = new ControllerData
+ {
+ Id = this.Id,
+ Name = this.Name,
+ Value = this.Value,
+ ControllerType = this.ControllerType
+ };
+ return clone;
+ }
+ }
+}
diff --git a/SunSharp/DerivedData/DerivedDataFactory.cs b/SunSharp/DerivedData/DerivedDataFactory.cs
new file mode 100644
index 0000000..2c3eb6e
--- /dev/null
+++ b/SunSharp/DerivedData/DerivedDataFactory.cs
@@ -0,0 +1,170 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using SunSharp.ObjectWrapper;
+using SunSharp.ThinWrapper;
+
+namespace SunSharp.DerivedData
+{
+ public static class DerivedDataFactory
+ {
+ #region entire song
+
+ public static SongData ReadSongData(ISunVoxLib lib, int slotId)
+ {
+ return lib.RunInLock(slotId, () => ReadSongDataInternal(lib, slotId));
+ }
+
+ public static SongData ReadSongData(Slot slot)
+ {
+ return slot.RunInLock(() => ReadSongDataInternal(slot.Library, slot.Id));
+ }
+
+ internal static SongData ReadSongDataInternal(ISunVoxLib lib, int slot)
+ {
+ var modules = ReadModules(lib, slot);
+ var patterns = ReadPatterns(lib, slot);
+
+ var songData = new SongData
+ {
+ Modules = modules,
+ Patterns = patterns,
+ BPM = lib.GetSongBpm(slot),
+ CurrentLine = lib.GetCurrentLine(slot),
+ FirstLine = patterns.Min(p => p.Position.X),
+ Frames = lib.GetSongLengthInFrames(slot),
+ HasDynamicTempo = patterns.Any(p => p.HasDynamicTempo),
+ IsDestructive = patterns.Any(p => p.IsDestructive),
+ IsLinear = patterns.All(p => p.IsLinear),
+ LastLine = patterns.Max(p => p.Position.X + p.Lines),
+ Lines = lib.GetSongLengthInLines(slot),
+ Name = lib.GetSongName(slot),
+ TPL = lib.GetSongTpl(slot)
+ };
+ return songData;
+ }
+
+ #endregion entire song
+
+ #region module data
+
+ internal static ModuleData[] ReadModules(ISunVoxLib lib, int slot)
+ {
+ var moduleCount = lib.GetUpperModuleCount(slot);
+ var modules = new List(moduleCount);
+
+ for (var i = 0; i < moduleCount; i++)
+ {
+ if (!lib.GetModuleExists(slot, i))
+ continue;
+
+ var m = ReadModule(lib, slot, i);
+ modules.Add(m);
+ }
+
+ return modules.ToArray();
+ }
+
+ internal static ModuleData ReadModule(ISunVoxLib lib, int slot, int moduleId)
+ {
+ var flags = lib.GetModuleFlags(slot, moduleId);
+
+ var controllerCount = lib.GetModuleControllerCount(slot, moduleId);
+ var controllers = new ControllerData[controllerCount];
+
+ for (var controllerId = 0; controllerId < controllerCount; controllerId++)
+ {
+ var controllerData = ReadControllerData(lib, slot, moduleId, controllerId);
+ controllers[controllerId] = controllerData;
+ }
+
+ var moduleData = new ModuleData()
+ {
+ Bypass = flags.Bypass,
+ Color = lib.GetModuleColor(slot, moduleId),
+ Controllers = controllers,
+ FineTunePair = lib.GetModuleFineTune(slot, moduleId),
+ Id = moduleId,
+ Inputs = lib.GetModuleInputs(slot, moduleId),
+ Mute = flags.Mute,
+ Name = lib.GetModuleName(slot, moduleId),
+ Outputs = lib.GetModuleOutputs(slot, moduleId),
+ Position = lib.GetModulePosition(slot, moduleId),
+ Solo = flags.Solo
+ };
+ return moduleData;
+ }
+
+ #region controller data
+
+ public static ControllerData ReadControllerData(ISunVoxLib lib, int slot, int moduleId, int controllerId)
+ {
+ var controllerData = new ControllerData
+ {
+ Id = controllerId,
+ Name = lib.GetModuleControllerName(slot, moduleId, controllerId) ?? "undefined",
+ Value = lib.GetModuleControllerValue(slot, moduleId, controllerId, ValueScalingType.Real),
+ ControllerType = lib.GetModuleControllerType(slot, moduleId, controllerId)
+ };
+ return controllerData;
+ }
+
+ #endregion controller data
+
+ #endregion module data
+
+ #region pattern data
+
+ private static PatternData[] ReadPatterns(ISunVoxLib lib, int slot)
+ {
+ var patternCount = lib.GetUpperPatternCount(slot);
+ var patterns = new List(patternCount);
+
+ for (var i = 0; i < patternCount; i++)
+ {
+ if (!lib.GetPatternExists(slot, i))
+ continue;
+
+ var p = ReadPatternData(lib, slot, i);
+ patterns.Add(p);
+ }
+
+ return patterns.ToArray();
+ }
+
+ internal static PatternData ReadPatternData(ISunVoxLib lib, int slot, int patternId)
+ {
+ var data = lib.GetPatternData(slot, patternId) ?? Array.Empty();
+ var isDestructive = false;
+ var isLinear = true;
+ var hasDynamicTempo = false;
+
+ foreach (var @event in data)
+ {
+ isDestructive = @event.Effect.IsDestructive() || isDestructive;
+ isLinear = isLinear && !@event.Effect.IsNonLinear();
+ hasDynamicTempo = hasDynamicTempo || @event.Effect.ModifiesTime();
+ }
+
+ var muted = lib.SetPatternMute(slot, patternId, false);
+ lib.SetPatternMute(slot, patternId, muted);
+
+ var patternData = new PatternData()
+ {
+ Data = data,
+ HasDynamicTempo = hasDynamicTempo,
+ Id = patternId,
+ IsDestructive = isDestructive,
+ IsLinear = isLinear,
+ IsMuted = muted,
+ Lines = lib.GetPatternLines(slot, patternId),
+ Name = lib.GetPatternName(slot, patternId),
+ Position = lib.GetPatternPosition(slot, patternId),
+ Tracks = lib.GetPatternTracks(slot, patternId)
+ };
+ return patternData;
+ }
+
+ #endregion pattern data
+ }
+}
diff --git a/SunSharp/DerivedData/IDeepCopyable.cs b/SunSharp/DerivedData/IDeepCopyable.cs
new file mode 100644
index 0000000..37bb3fe
--- /dev/null
+++ b/SunSharp/DerivedData/IDeepCopyable.cs
@@ -0,0 +1,7 @@
+namespace SunSharp.DerivedData
+{
+ public interface IDeepCopyable
+ {
+ T DeepCopy();
+ }
+}
diff --git a/SunSharp/DerivedData/ModuleData.cs b/SunSharp/DerivedData/ModuleData.cs
index 7643947..31a05d2 100644
--- a/SunSharp/DerivedData/ModuleData.cs
+++ b/SunSharp/DerivedData/ModuleData.cs
@@ -1,102 +1,41 @@
-using SunSharp.ObjectWrapper;
-using SunSharp.ThinWrapper;
+using System;
using System.Collections.Generic;
using System.Linq;
namespace SunSharp.DerivedData
{
- public interface IReadOnlyModuleData
- {
- int Id { get; }
- string Name { get; }
- (int X, int Y) Position { get; }
- (int finetune, int relativeNote) Finetune { get; }
- bool Solo { get; }
- bool Mute { get; }
- bool Bypass { get; }
- (int R, int G, int B) Color { get; }
- IReadOnlyCollection<(string name, int value)> Controllers { get; }
- IReadOnlyCollection Inputs { get; }
- IReadOnlyCollection Outputs { get; }
- }
-
- public class ModuleData : IReadOnlyModuleData
+ public sealed class ModuleData : IDeepCopyable
{
public int Id { get; set; }
- public string Name { get; set; }
- public (int X, int Y) Position { get; set; }
- public (int finetune, int relativeNote) Finetune { get; set; }
+ public string? Name { get; set; }
+ public (int X, int Y) Position { get; set; } = (0, 0);
+ public FineTunePair FineTunePair { get; set; }
public bool Solo { get; set; }
public bool Mute { get; set; }
public bool Bypass { get; set; }
- public (int R, int G, int B) Color { get; set; }
- public ICollection<(string name, int value)> Controllers { get; set; }
- public ICollection Inputs { get; set; }
- public ICollection Outputs { get; set; }
-
- IReadOnlyCollection<(string name, int value)> IReadOnlyModuleData.Controllers => Controllers.AsReadonlyOrGetWrapper();
- IReadOnlyCollection IReadOnlyModuleData.Inputs => Inputs.AsReadonlyOrGetWrapper();
- IReadOnlyCollection IReadOnlyModuleData.Outputs => Outputs.AsReadonlyOrGetWrapper();
-
- public ModuleData()
- {
- }
+ public (int r, int g, int b) Color { get; set; } = (0, 0, 0);
+ public ICollection Controllers { get; set; } = Array.Empty();
+ public ICollection Inputs { get; set; } = Array.Empty();
+ public ICollection Outputs { get; set; } = Array.Empty();
- public static ModuleData DeepCopy(IReadOnlyModuleData data)
+ public ModuleData DeepCopy()
{
- return new ModuleData
+ var copy = new ModuleData
{
- Id = data.Id,
- Name = data.Name,
- Position = data.Position,
- Finetune = data.Finetune,
- Solo = data.Solo,
- Mute = data.Mute,
- Bypass = data.Bypass,
- Color = data.Color,
- Controllers = data.Controllers.Select(c => (c.name, c.value)).ToArray(),
- Inputs = data.Inputs.Select(i => i).ToArray(),
- Outputs = data.Outputs.Select(o => o).ToArray()
+ Id = this.Id,
+ Name = this.Name,
+ Position = this.Position,
+ FineTunePair = this.FineTunePair,
+ Solo = this.Solo,
+ Mute = this.Mute,
+ Bypass = this.Bypass,
+ Color = this.Color,
+ Controllers = this.Controllers.Select(c => c.DeepCopy()).ToArray(),
+ Inputs = this.Inputs.Select(i => i).ToArray(),
+ Outputs = this.Outputs.Select(o => o).ToArray()
};
- }
-
- public static ModuleData ReadModuleData(ISunVoxLib lib, int slotId, int moduleId)
- {
- return lib.RunInLock(slotId, () => ReadModuleDataInternal(lib, slotId, moduleId));
- }
-
- public static ModuleData ReadModuleData(ModuleHandle module)
- {
- return module.Slot.RunInLock(() => ReadModuleDataInternal(module.Slot.Library, module.Slot.Id, module.Id));
- }
-
- internal static ModuleData ReadModuleDataInternal(ISunVoxLib lib, int slot, int moduleId)
- {
- var flags = lib.GetModuleFlags(slot, moduleId);
- var controllers = new (string name, int realValue)[lib.GetModuleControllerCount(slot, moduleId)];
-
- for (int i = 0; i < controllers.Length; i++)
- {
- var name = lib.GetModuleControllerName(slot, moduleId, i);
- var value = lib.GetModuleControllerValue(slot, moduleId, i, ValueScalingType.Real);
- controllers[i] = (name, value);
- }
- var moduleData = new ModuleData()
- {
- Bypass = flags.Bypass,
- Color = lib.GetModuleColor(slot, moduleId),
- Controllers = controllers,
- Finetune = lib.GetModuleFinetune(slot, moduleId),
- Id = moduleId,
- Inputs = lib.GetModuleInputs(slot, moduleId),
- Mute = flags.Mute,
- Name = lib.GetModuleName(slot, moduleId),
- Outputs = lib.GetModuleOutputs(slot, moduleId),
- Position = lib.GetModulePosition(slot, moduleId),
- Solo = flags.Solo
- };
- return moduleData;
+ return copy;
}
}
}
diff --git a/SunSharp/DerivedData/PatternData.cs b/SunSharp/DerivedData/PatternData.cs
index e75103c..f8f768c 100644
--- a/SunSharp/DerivedData/PatternData.cs
+++ b/SunSharp/DerivedData/PatternData.cs
@@ -1,28 +1,13 @@
-using SunSharp.ObjectWrapper;
-using SunSharp.ThinWrapper;
+using System;
using System.Collections.Generic;
using System.Linq;
namespace SunSharp.DerivedData
{
- public interface IReadOnlyPatternData
- {
- int Id { get; }
- string Name { get; }
- (int X, int Y) Position { get; }
- int Lines { get; }
- int Tracks { get; }
- bool IsMuted { get; }
- bool IsLinear { get; }
- bool IsDestructive { get; }
- bool HasDynamicTempo { get; }
- IReadOnlyCollection Data { get; }
- }
-
- public class PatternData : IReadOnlyPatternData
+ public class PatternData : IDeepCopyable
{
public int Id { get; set; }
- public string Name { get; set; }
+ public string? Name { get; set; }
public (int X, int Y) Position { get; set; }
public int Lines { get; set; }
public int Tracks { get; set; }
@@ -30,73 +15,24 @@ public class PatternData : IReadOnlyPatternData
public bool IsLinear { get; set; }
public bool IsDestructive { get; set; }
public bool HasDynamicTempo { get; set; }
- public ICollection Data { get; set; }
-
- IReadOnlyCollection IReadOnlyPatternData.Data => Data.AsReadonlyOrGetWrapper();
-
- public PatternData()
- {
- }
-
- public static PatternData DeepCopy(IReadOnlyPatternData data)
- {
- return new PatternData()
- {
- Id = data.Id,
- Name = data.Name,
- Position = data.Position,
- Lines = data.Lines,
- Tracks = data.Tracks,
- IsMuted = data.IsMuted,
- IsLinear = data.IsLinear,
- IsDestructive = data.IsDestructive,
- HasDynamicTempo = data.HasDynamicTempo,
- Data = data.Data.Select(e => e).ToArray()
- };
- }
-
- public static PatternData ReadModuleData(ISunVoxLib lib, int slotId, int patternId)
- {
- return lib.RunInLock(slotId, () => ReadPatternDataInternal(lib, slotId, patternId));
- }
+ public ICollection Data { get; set; } = Array.Empty();
- public static PatternData ReadModuleData(PatternHandle pattern)
+ public PatternData DeepCopy()
{
- return pattern.Slot.RunInLock(() => ReadPatternDataInternal(pattern.Slot.Library, pattern.Slot.Id, pattern.Id));
- }
-
- internal static PatternData ReadPatternDataInternal(ISunVoxLib lib, int slot, int patternId)
- {
- var data = lib.GetPatternData(slot, patternId).Select(e => (ImmutablePatternEvent)e).ToArray();
- bool isDestructive = false;
- bool isLinear = true;
- bool hasDynamicTempo = false;
-
- for (int i = 0; i < data.Length; i++)
- {
- var @event = data[i];
- isDestructive = @event.Effect.IsDestructive() || isDestructive;
- isLinear = isLinear && !@event.Effect.IsNonLinear();
- hasDynamicTempo = hasDynamicTempo || @event.Effect.ModifiesTime();
- }
-
- bool muted = lib.SetPatternMute(slot, patternId, false);
- lib.SetPatternMute(slot, patternId, muted);
-
- var patternData = new PatternData()
+ var copy = new PatternData()
{
- Data = data,
- HasDynamicTempo = hasDynamicTempo,
- Id = patternId,
- IsDestructive = isDestructive,
- IsLinear = isLinear,
- IsMuted = muted,
- Lines = lib.GetPatternLines(slot, patternId),
- Name = lib.GetPatternName(slot, patternId),
- Position = lib.GetPatternPosition(slot, patternId),
- Tracks = lib.GetPatternTracks(slot, patternId)
+ Id = this.Id,
+ Name = this.Name,
+ Position = this.Position,
+ Lines = this.Lines,
+ Tracks = this.Tracks,
+ IsMuted = this.IsMuted,
+ IsLinear = this.IsLinear,
+ IsDestructive = this.IsDestructive,
+ HasDynamicTempo = this.HasDynamicTempo,
+ Data = this.Data.Select(e => e).ToArray()
};
- return patternData;
+ return copy;
}
}
}
diff --git a/SunSharp/DerivedData/ReadOnlyCollectionWrapper.cs b/SunSharp/DerivedData/ReadOnlyCollectionWrapper.cs
deleted file mode 100644
index 9190350..0000000
--- a/SunSharp/DerivedData/ReadOnlyCollectionWrapper.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-
-namespace SunSharp.DerivedData
-{
- public class ReadOnlyCollectionWrapper : IReadOnlyCollection
- {
- private ICollection _collection;
-
- public ReadOnlyCollectionWrapper(ICollection collection)
- {
- _collection = collection;
- }
-
- public int Count => _collection.Count;
-
- public IEnumerator GetEnumerator() => _collection.GetEnumerator();
-
- IEnumerator IEnumerable.GetEnumerator() => _collection.GetEnumerator();
- }
-
- public static class ReadOnlyCollectionWrapperExtensions
- {
- public static IReadOnlyCollection AsReadonlyOrGetWrapper(this ICollection collection)
- {
- if (collection is IReadOnlyCollection _collection)
- return _collection;
- return new ReadOnlyCollectionWrapper(collection);
- }
- }
-}
diff --git a/SunSharp/DerivedData/SongData.cs b/SunSharp/DerivedData/SongData.cs
index 6c9b53d..ab6259a 100644
--- a/SunSharp/DerivedData/SongData.cs
+++ b/SunSharp/DerivedData/SongData.cs
@@ -1,30 +1,12 @@
-using SunSharp.ObjectWrapper;
-using SunSharp.ThinWrapper;
+using System;
using System.Collections.Generic;
using System.Linq;
namespace SunSharp.DerivedData
{
- public interface IReadOnlySongData
+ public class SongData : IDeepCopyable
{
- string Name { get; }
- int BPM { get; }
- int TPL { get; }
- int Frames { get; }
- int Lines { get; }
- int CurrentLine { get; }
- int FirstLine { get; }
- int LastLine { get; }
- bool IsLinear { get; }
- bool IsDestructive { get; }
- bool HasDynamicTempo { get; }
- IReadOnlyCollection Modules { get; }
- IReadOnlyCollection Patterns { get; }
- }
-
- public class SongData : IReadOnlySongData
- {
- public string Name { get; set; }
+ public string? Name { get; set; }
public int BPM { get; set; }
public int TPL { get; set; }
public int Frames { get; set; }
@@ -35,100 +17,28 @@ public class SongData : IReadOnlySongData
public bool IsLinear { get; set; }
public bool IsDestructive { get; set; }
public bool HasDynamicTempo { get; set; }
- public ICollection Modules { get; set; }
- public ICollection Patterns { get; set; }
-
- IReadOnlyCollection IReadOnlySongData.Modules => Modules.AsReadonlyOrGetWrapper();
- IReadOnlyCollection IReadOnlySongData.Patterns => Patterns.AsReadonlyOrGetWrapper();
-
- public SongData()
- {
- }
-
- public static SongData ReadSongData(ISunVoxLib lib, int slotId)
- {
- return lib.RunInLock(slotId, () => ReadSongDataInternal(lib, slotId));
- }
-
- public static SongData ReadSongData(Slot slot)
- {
- return slot.RunInLock(() => ReadSongDataInternal(slot.Library, slot.Id));
- }
-
- internal static SongData ReadSongDataInternal(ISunVoxLib lib, int slot)
- {
- var modules = ReadModuleDataArray(lib, slot);
- var patterns = ReadPatternDataArray(lib, slot);
-
- var songData = new SongData()
- {
- Modules = modules,
- Patterns = patterns,
- BPM = lib.GetSongBpm(slot),
- CurrentLine = lib.GetCurrentLine(slot),
- FirstLine = patterns.Min(p => p.Position.X),
- Frames = lib.GetSongLengthInFrames(slot),
- HasDynamicTempo = patterns.Any(p => p.HasDynamicTempo),
- IsDestructive = patterns.Any(p => p.IsDestructive),
- IsLinear = patterns.All(p => p.IsLinear),
- LastLine = patterns.Max(p => p.Position.X + p.Lines),
- Lines = lib.GetSongLengthInLines(slot),
- Name = lib.GetSongName(slot),
- TPL = lib.GetSongTpl(slot)
- };
- return songData;
- }
-
- private static ModuleData[] ReadModuleDataArray(ISunVoxLib lib, int slot)
- {
- var moduleCount = lib.GetUpperModuleCount(slot);
- var modules = new List(moduleCount);
-
- for (int i = 0; i < moduleCount; i++)
- {
- if (lib.GetModuleExists(slot, i))
- {
- var m = ModuleData.ReadModuleDataInternal(lib, slot, i);
- modules.Add(m);
- }
- }
- return modules.ToArray();
- }
-
- private static PatternData[] ReadPatternDataArray(ISunVoxLib lib, int slot)
- {
- var patternCount = lib.GetUpperPatternCount(slot);
- var patterns = new List(patternCount);
-
- for (int i = 0; i < patternCount; i++)
- {
- if (lib.GetPatternExists(slot, i))
- {
- var p = PatternData.ReadPatternDataInternal(lib, slot, i);
- patterns.Add(p);
- }
- }
- return patterns.ToArray();
- }
+ public ICollection Modules { get; set; } = Array.Empty();
+ public ICollection Patterns { get; set; } = Array.Empty();
- public static SongData DeepCopy(IReadOnlySongData original)
+ public SongData DeepCopy()
{
- return new SongData()
+ var copy = new SongData()
{
- Name = original.Name,
- BPM = original.BPM,
- TPL = original.TPL,
- Frames = original.Frames,
- Lines = original.Lines,
- CurrentLine = original.CurrentLine,
- FirstLine = original.FirstLine,
- LastLine = original.LastLine,
- IsLinear = original.IsLinear,
- IsDestructive = original.IsDestructive,
- HasDynamicTempo = original.HasDynamicTempo,
- Modules = original.Modules.Select(m => ModuleData.DeepCopy(m)).ToArray(),
- Patterns = original.Patterns.Select(p => PatternData.DeepCopy(p)).ToArray()
+ Name = this.Name,
+ BPM = this.BPM,
+ TPL = this.TPL,
+ Frames = this.Frames,
+ Lines = this.Lines,
+ CurrentLine = this.CurrentLine,
+ FirstLine = this.FirstLine,
+ LastLine = this.LastLine,
+ IsLinear = this.IsLinear,
+ IsDestructive = this.IsDestructive,
+ HasDynamicTempo = this.HasDynamicTempo,
+ Modules = this.Modules.Select(m => m.DeepCopy()).ToArray(),
+ Patterns = this.Patterns.Select(p => p.DeepCopy()).ToArray()
};
+ return copy;
}
}
}
diff --git a/SunSharp/Effects.cs b/SunSharp/Effects.cs
index 85bd70b..fc4774e 100644
--- a/SunSharp/Effects.cs
+++ b/SunSharp/Effects.cs
@@ -54,24 +54,24 @@ public static class EffectExtensions
public static bool IsNonLinear(this Effect effect)
{
return effect == Effect.Jump
- || effect == Effect.SetJumpMode
- || effect == Effect.StopPlaying;
+ || effect == Effect.SetJumpMode
+ || effect == Effect.StopPlaying;
}
public static bool IsDestructive(this Effect effect)
{
return effect == Effect.DeleteEventOnTrackWithProbability
- || effect == Effect.CyclicShiftTrackLines
- || effect == Effect.GeneratePolyrhythm
- || effect == Effect.CopyTrackToPattern
- || effect == Effect.CopyTrackFromPattern
- || effect == Effect.WriteRandomValue;
+ || effect == Effect.CyclicShiftTrackLines
+ || effect == Effect.GeneratePolyrhythm
+ || effect == Effect.CopyTrackToPattern
+ || effect == Effect.CopyTrackFromPattern
+ || effect == Effect.WriteRandomValue;
}
public static bool ModifiesTime(this Effect effect)
{
return effect == Effect.SetBpm
- || effect == Effect.SetPlayingSpeed;
+ || effect == Effect.SetPlayingSpeed;
}
}
}
diff --git a/SunSharp/FineTunePair.cs b/SunSharp/FineTunePair.cs
new file mode 100644
index 0000000..e86c7c3
--- /dev/null
+++ b/SunSharp/FineTunePair.cs
@@ -0,0 +1,50 @@
+using System;
+
+namespace SunSharp
+{
+ [Serializable]
+ public struct FineTunePair
+ {
+ public short FineTune { get; set; }
+ public short RelativeNote { get; set; }
+
+ public FineTunePair(short fineTune, short relativeNote)
+ {
+ FineTune = fineTune;
+ RelativeNote = relativeNote;
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (obj is FineTunePair other)
+ return Equals(other);
+
+ return false;
+ }
+
+ public bool Equals(FineTunePair other)
+ {
+ return FineTune == other.FineTune && RelativeNote == other.RelativeNote;
+ }
+
+ public override int GetHashCode()
+ {
+ return HashCode.Combine(FineTune, RelativeNote);
+ }
+
+ public override string ToString()
+ {
+ return $"FineTunePair: fine-tune: {FineTune}, relative note: {RelativeNote}";
+ }
+
+ public static bool operator ==(FineTunePair left, FineTunePair right)
+ {
+ return left.Equals(right);
+ }
+
+ public static bool operator !=(FineTunePair left, FineTunePair right)
+ {
+ return !(left == right);
+ }
+ }
+}
diff --git a/SunSharp/ISunVoxLib.cs b/SunSharp/ISunVoxLib.cs
index ea3e892..cb6b3d2 100644
--- a/SunSharp/ISunVoxLib.cs
+++ b/SunSharp/ISunVoxLib.cs
@@ -36,7 +36,8 @@ public interface ISunVoxLib
///
/// int sv_audio_callback2(void* buf, int frames, int latency, uint32_t out_time, int in_type, int in_channels, void* in_buf) SUNVOX_FN_ATTR;
///
- int sv_audio_callback2(IntPtr buf, int frames, int latency, uint out_time, int in_type, int in_channels, IntPtr in_buf);
+ int sv_audio_callback2(IntPtr buf, int frames, int latency, uint out_time, int in_type, int in_channels,
+ IntPtr in_buf);
///
/// int sv_open_slot(int slot) SUNVOX_FN_ATTR;
@@ -446,7 +447,8 @@ public interface ISunVoxLib
///
/// int sv_set_pattern_event(int slot, int pat_num, int track, int line, int nn, int vv, int mm, int ccee, int xxyy) SUNVOX_FN_ATTR;
///
- int sv_set_pattern_event(int slot, int pat_num, int track, int line, int nn, int vv, int mm, int ccee, int xxyy);
+ int sv_set_pattern_event(int slot, int pat_num, int track, int line, int nn, int vv, int mm, int ccee,
+ int xxyy);
///
/// int sv_get_pattern_event(int slot, int pat_num, int track, int line, int column) SUNVOX_FN_ATTR;
diff --git a/SunSharp/LibraryLoading/ProxyClass.Generated.cs b/SunSharp/LibraryLoading/ProxyClass.Generated.cs
index ec19085..ba5985e 100644
--- a/SunSharp/LibraryLoading/ProxyClass.Generated.cs
+++ b/SunSharp/LibraryLoading/ProxyClass.Generated.cs
@@ -20,61 +20,61 @@ public ProxyClass(Func GetDelegate)
#region delegate definitions
- private delegate int o_Int_i_Int(int _int);
-
- private delegate int o_Int_i_Int_Int(int _int, int _int1);
+ private delegate int o_Int_i_Int_Int_Int_Int_Int_Int_Int_Int_Int(int _int, int _int1, int _int2, int _int3, int _int4, int _int5, int _int6, int _int7, int _int8);
- private delegate int o_Int_i_Int_Int_Int(int _int, int _int1, int _int2);
+ private delegate int o_Int_i_Int_Int_Int_Int_Int_Int_Int_IntPtr(int _int, int _int1, int _int2, int _int3, int _int4, int _int5, int _int6, IntPtr _IntPtr);
- private delegate int o_Int_i_Int_Int_Int_Int(int _int, int _int1, int _int2, int _int3);
+ private delegate int o_Int_i_Int_Int_Int_Int_Int_Int_Int(int _int, int _int1, int _int2, int _int3, int _int4, int _int5, int _int6);
private delegate int o_Int_i_Int_Int_Int_Int_Int(int _int, int _int1, int _int2, int _int3, int _int4);
- private delegate int o_Int_i_Int_Int_Int_Int_Int_Int_Int(int _int, int _int1, int _int2, int _int3, int _int4, int _int5, int _int6);
-
- private delegate int o_Int_i_Int_Int_Int_Int_Int_Int_Int_Int_Int(int _int, int _int1, int _int2, int _int3, int _int4, int _int5, int _int6, int _int7, int _int8);
+ private delegate int o_Int_i_Int_Int_Int_Int(int _int, int _int1, int _int2, int _int3);
- private delegate int o_Int_i_Int_Int_Int_Int_Int_Int_Int_IntPtr(int _int, int _int1, int _int2, int _int3, int _int4, int _int5, int _int6, IntPtr _IntPtr);
+ private delegate int o_Int_i_Int_Int_Int_IntPtr_Int_Int(int _int, int _int1, int _int2, IntPtr _IntPtr, int _int3, int _int4);
private delegate int o_Int_i_Int_Int_Int_IntPtr_Int(int _int, int _int1, int _int2, IntPtr _IntPtr, int _int3);
- private delegate int o_Int_i_Int_Int_Int_IntPtr_Int_Int(int _int, int _int1, int _int2, IntPtr _IntPtr, int _int3, int _int4);
-
- private delegate int o_Int_i_Int_Int_IntPtr(int _int, int _int1, IntPtr _IntPtr);
+ private delegate int o_Int_i_Int_Int_Int(int _int, int _int1, int _int2);
private delegate int o_Int_i_Int_Int_IntPtr_Int(int _int, int _int1, IntPtr _IntPtr, int _int2);
+ private delegate int o_Int_i_Int_Int_IntPtr_Uint_Int(int _int, int _int1, IntPtr _IntPtr, uint _uint, int _int2);
+
private delegate int o_Int_i_Int_Int_IntPtr_Uint(int _int, int _int1, IntPtr _IntPtr, uint _uint);
- private delegate int o_Int_i_Int_Int_IntPtr_Uint_Int(int _int, int _int1, IntPtr _IntPtr, uint _uint, int _int2);
+ private delegate int o_Int_i_Int_Int_IntPtr(int _int, int _int1, IntPtr _IntPtr);
- private delegate int o_Int_i_Int_IntPtr(int _int, IntPtr _IntPtr);
+ private delegate int o_Int_i_Int_Int(int _int, int _int1);
private delegate int o_Int_i_Int_IntPtr_Int_Int_Int(int _int, IntPtr _IntPtr, int _int1, int _int2, int _int3);
private delegate int o_Int_i_Int_IntPtr_IntPtr_Int_Int_Int(int _int, IntPtr _IntPtr, IntPtr _IntPtr1, int _int1, int _int2, int _int3);
+ private delegate int o_Int_i_Int_IntPtr_Uint_Int_Int_Int(int _int, IntPtr _IntPtr, uint _uint, int _int1, int _int2, int _int3);
+
private delegate int o_Int_i_Int_IntPtr_Uint(int _int, IntPtr _IntPtr, uint _uint);
- private delegate int o_Int_i_Int_IntPtr_Uint_Int_Int_Int(int _int, IntPtr _IntPtr, uint _uint, int _int1, int _int2, int _int3);
+ private delegate int o_Int_i_Int_IntPtr(int _int, IntPtr _IntPtr);
- private delegate int o_Int_i_IntPtr_Int_Int_Uint(IntPtr _IntPtr, int _int, int _int1, uint _uint);
+ private delegate int o_Int_i_Int(int _int);
private delegate int o_Int_i_IntPtr_Int_Int_Uint_Int_Int_IntPtr(IntPtr _IntPtr, int _int, int _int1, uint _uint, int _int2, int _int3, IntPtr _IntPtr1);
+ private delegate int o_Int_i_IntPtr_Int_Int_Uint(IntPtr _IntPtr, int _int, int _int1, uint _uint);
+
private delegate int o_Int_i_Void();
- private delegate IntPtr o_IntPtr_i_Int(int _int);
+ private delegate IntPtr o_IntPtr_i_Int_Int_Int(int _int, int _int1, int _int2);
private delegate IntPtr o_IntPtr_i_Int_Int(int _int, int _int1);
- private delegate IntPtr o_IntPtr_i_Int_Int_Int(int _int, int _int1, int _int2);
+ private delegate IntPtr o_IntPtr_i_Int(int _int);
- private delegate uint o_Uint_i_Int(int _int);
+ private delegate uint o_Uint_i_Int_Int_Int_IntPtr_Uint(int _int, int _int1, int _int2, IntPtr _IntPtr, uint _uint);
private delegate uint o_Uint_i_Int_Int(int _int, int _int1);
- private delegate uint o_Uint_i_Int_Int_Int_IntPtr_Uint(int _int, int _int1, int _int2, IntPtr _IntPtr, uint _uint);
+ private delegate uint o_Uint_i_Int(int _int);
private delegate uint o_Uint_i_Void();
@@ -108,10 +108,10 @@ public ProxyClass(Func GetDelegate)
private o_Int_i_Int sv_pause;
- private o_Int_i_Int sv_play;
-
private o_Int_i_Int sv_play_from_beginning;
+ private o_Int_i_Int sv_play;
+
private o_Int_i_Int sv_resume;
private o_Int_i_Int sv_stop;
@@ -266,10 +266,10 @@ public ProxyClass(Func GetDelegate)
private o_Uint_i_Int_Int_Int_IntPtr_Uint sv_get_module_scope2;
- private o_Uint_i_Void sv_get_ticks;
-
private o_Uint_i_Void sv_get_ticks_per_second;
+ private o_Uint_i_Void sv_get_ticks;
+
#pragma warning restore CS0649
#endregion delegates
@@ -342,20 +342,20 @@ public ProxyClass(Func GetDelegate)
int ISunVoxLib.sv_init(IntPtr config, int freq, int channels, uint flags) => sv_init(config, freq, channels, flags);
- int ISunVoxLib.sv_load(int slot, IntPtr name) => sv_load(slot, name);
-
int ISunVoxLib.sv_load_from_memory(int slot, IntPtr data, uint data_size) => sv_load_from_memory(slot, data, data_size);
+ int ISunVoxLib.sv_load_module_from_memory(int slot, IntPtr data, uint data_size, int x, int y, int z) => sv_load_module_from_memory(slot, data, data_size, x, y, z);
+
int ISunVoxLib.sv_load_module(int slot, IntPtr file_name, int x, int y, int z) => sv_load_module(slot, file_name, x, y, z);
- int ISunVoxLib.sv_load_module_from_memory(int slot, IntPtr data, uint data_size, int x, int y, int z) => sv_load_module_from_memory(slot, data, data_size, x, y, z);
+ int ISunVoxLib.sv_load(int slot, IntPtr name) => sv_load(slot, name);
int ISunVoxLib.sv_lock_slot(int slot) => sv_lock_slot(slot);
- int ISunVoxLib.sv_metamodule_load(int slot, int mod_num, IntPtr file_name) => sv_metamodule_load(slot, mod_num, file_name);
-
int ISunVoxLib.sv_metamodule_load_from_memory(int slot, int mod_num, IntPtr data, uint data_size) => sv_metamodule_load_from_memory(slot, mod_num, data, data_size);
+ int ISunVoxLib.sv_metamodule_load(int slot, int mod_num, IntPtr file_name) => sv_metamodule_load(slot, mod_num, file_name);
+
int ISunVoxLib.sv_module_curve(int slot, int mod_num, int curve_num, IntPtr data, int len, int w) => sv_module_curve(slot, mod_num, curve_num, data, len, w);
int ISunVoxLib.sv_new_module(int slot, IntPtr type, IntPtr name, int x, int y, int z) => sv_new_module(slot, type, name, x, y, z);
@@ -368,10 +368,10 @@ public ProxyClass(Func GetDelegate)
int ISunVoxLib.sv_pause(int slot) => sv_pause(slot);
- int ISunVoxLib.sv_play(int slot) => sv_play(slot);
-
int ISunVoxLib.sv_play_from_beginning(int slot) => sv_play_from_beginning(slot);
+ int ISunVoxLib.sv_play(int slot) => sv_play(slot);
+
int ISunVoxLib.sv_remove_module(int slot, int mod_num) => sv_remove_module(slot, mod_num);
int ISunVoxLib.sv_remove_pattern(int slot, int pat_num) => sv_remove_pattern(slot, pat_num);
@@ -380,10 +380,10 @@ public ProxyClass(Func GetDelegate)
int ISunVoxLib.sv_rewind(int slot, int line_num) => sv_rewind(slot, line_num);
- int ISunVoxLib.sv_sampler_load(int slot, int sampler_module, IntPtr file_name, int sample_slot) => sv_sampler_load(slot, sampler_module, file_name, sample_slot);
-
int ISunVoxLib.sv_sampler_load_from_memory(int slot, int sampler_module, IntPtr data, uint data_size, int sample_slot) => sv_sampler_load_from_memory(slot, sampler_module, data, data_size, sample_slot);
+ int ISunVoxLib.sv_sampler_load(int slot, int sampler_module, IntPtr file_name, int sample_slot) => sv_sampler_load(slot, sampler_module, file_name, sample_slot);
+
int ISunVoxLib.sv_save(int slot, IntPtr name) => sv_save(slot, name);
int ISunVoxLib.sv_send_event(int slot, int track_num, int note, int vel, int module, int ctl, int ctl_val) => sv_send_event(slot, track_num, note, vel, module, ctl, ctl_val);
@@ -424,10 +424,10 @@ public ProxyClass(Func GetDelegate)
int ISunVoxLib.sv_volume(int slot, int vol) => sv_volume(slot, vol);
- int ISunVoxLib.sv_vplayer_load(int slot, int mod_num, IntPtr file_name) => sv_vplayer_load(slot, mod_num, file_name);
-
int ISunVoxLib.sv_vplayer_load_from_memory(int slot, int mod_num, IntPtr data, uint data_size) => sv_vplayer_load_from_memory(slot, mod_num, data, data_size);
+ int ISunVoxLib.sv_vplayer_load(int slot, int mod_num, IntPtr file_name) => sv_vplayer_load(slot, mod_num, file_name);
+
IntPtr ISunVoxLib.sv_get_log(int size) => sv_get_log(size);
IntPtr ISunVoxLib.sv_get_module_ctl_name(int slot, int mod_num, int ctl_num) => sv_get_module_ctl_name(slot, mod_num, ctl_num);
@@ -458,10 +458,10 @@ public ProxyClass(Func GetDelegate)
uint ISunVoxLib.sv_get_song_length_lines(int slot) => sv_get_song_length_lines(slot);
- uint ISunVoxLib.sv_get_ticks() => sv_get_ticks();
-
uint ISunVoxLib.sv_get_ticks_per_second() => sv_get_ticks_per_second();
+ uint ISunVoxLib.sv_get_ticks() => sv_get_ticks();
+
#endregion interface
}
}
diff --git a/SunSharp/Note.cs b/SunSharp/Note.cs
index 540f95c..5569f0c 100644
--- a/SunSharp/Note.cs
+++ b/SunSharp/Note.cs
@@ -33,8 +33,7 @@ public static char GetNoteNameCharacter(this NoteName noteName)
[StructLayout(LayoutKind.Explicit, Size = 1)]
public readonly struct Note
{
- [FieldOffset(0)]
- public readonly byte Value;
+ [FieldOffset(0)] public readonly byte Value;
private const byte NOTECMD_NOTE_OFF = 128;
private const byte NOTECMD_ALL_NOTES_OFF = 129;
diff --git a/SunSharp/ObjectWrapper/Enums.cs b/SunSharp/ObjectWrapper/Enums.cs
index 8cb1dc1..64038e8 100644
--- a/SunSharp/ObjectWrapper/Enums.cs
+++ b/SunSharp/ObjectWrapper/Enums.cs
@@ -1,6 +1,7 @@
namespace SunSharp.ObjectWrapper
{
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "The enum is supposed to help with choosing a type.")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name",
+ Justification = "The enum is supposed to help with choosing a type.")]
public enum OutputType
{
Float32 = 1,
diff --git a/SunSharp/ObjectWrapper/ModuleHandle.cs b/SunSharp/ObjectWrapper/ModuleHandle.cs
index 56e9d28..1953752 100644
--- a/SunSharp/ObjectWrapper/ModuleHandle.cs
+++ b/SunSharp/ObjectWrapper/ModuleHandle.cs
@@ -1,5 +1,5 @@
-using SunSharp.ThinWrapper;
-using System.Linq;
+using System.Linq;
+using SunSharp.ThinWrapper;
namespace SunSharp.ObjectWrapper
{
@@ -9,35 +9,34 @@ namespace SunSharp.ObjectWrapper
public readonly struct ModuleHandle
{
private readonly ISunVoxLib _lib;
- private readonly Slot _slot;
- private readonly int _id;
private readonly int _slotId;
- public int Id => _id;
- public Slot Slot => _slot;
+ public int Id { get; }
+
+ public Slot Slot { get; }
public ModuleHandle(Synthesizer synthesizer, int id)
{
- _slot = synthesizer.Slot;
- _slotId = _slot.Id;
+ Slot = synthesizer.Slot;
+ _slotId = Slot.Id;
_lib = synthesizer.Slot.Library;
- _id = id;
+ Id = id;
}
#region general
- public ModuleFlags GetFlags() => _lib.GetModuleFlags(_slotId, _id);
+ public ModuleFlags GetFlags() => _lib.GetModuleFlags(_slotId, Id);
- public ModuleType GetModuleType() => ModuleTypeHelper.TypeFromInternalName(_lib.GetModuleType(_slotId, _id));
+ public ModuleType GetModuleType() => ModuleTypeHelper.TypeFromInternalName(_lib.GetModuleType(_slotId, Id));
- public bool GetExists() => _lib.GetModuleExists(_slotId, _id);
+ public bool GetExists() => _lib.GetModuleExists(_slotId, Id);
- public (int finetune, int relativeNote) GetFinetune() => _lib.GetModuleFinetune(_slotId, _id);
+ public FineTunePair GetFineTune() => _lib.GetModuleFineTune(_slotId, Id);
- public void SetFinetune(int finetune, int relativeNote)
+ public void SetFineTune(FineTunePair pair)
{
- _lib.SetModuleRelativeNote(_slotId, _id, relativeNote);
- _lib.SetModuleFinetune(_slotId, _id, finetune);
+ _lib.SetModuleRelativeNote(_slotId, Id, pair.RelativeNote);
+ _lib.SetModuleFineTune(_slotId, Id, pair.FineTune);
}
///
@@ -48,43 +47,43 @@ public void SetFinetune(int finetune, int relativeNote)
/// Number of samples successfully read.
public int ReadScope(AudioChannel channel, short[] buffer)
{
- return _lib.ReadModuleScope(_slotId, _id, (int)channel, buffer);
+ return _lib.ReadModuleScope(_slotId, Id, (int)channel, buffer);
}
#endregion general
#region cosmetic
- public string GetName() => _lib.GetModuleName(_slotId, _id);
+ public string? GetName() => _lib.GetModuleName(_slotId, Id);
- public void SetName(string name) => _lib.SetModuleName(_slotId, _id, name);
+ public void SetName(string name) => _lib.SetModuleName(_slotId, Id, name);
- public (int x, int y) GetPosition() => _lib.GetModulePosition(_slotId, _id);
+ public (int x, int y) GetPosition() => _lib.GetModulePosition(_slotId, Id);
- public void SetPosition(int x, int y) => _lib.SetModulePosition(_slotId, _id, x, y);
+ public void SetPosition(int x, int y) => _lib.SetModulePosition(_slotId, Id, x, y);
- public (byte R, byte G, byte B) GetColor() => _lib.GetModuleColor(_slotId, _id);
+ public (byte r, byte g, byte b) GetColor() => _lib.GetModuleColor(_slotId, Id);
- public void SetColor(byte R, byte G, byte B) => _lib.SetModuleColor(_slotId, _id, R, G, B);
+ public void SetColor(byte r, byte g, byte b) => _lib.SetModuleColor(_slotId, Id, r, g, b);
#endregion cosmetic
#region connections
- public int[] GetInputs() => _lib.GetModuleInputs(_slotId, _id);
+ public int[] GetInputs() => _lib.GetModuleInputs(_slotId, Id);
public ModuleHandle[] GetInputModules()
{
- var synthesizer = _slot.Synthesizer;
- return _lib.GetModuleInputs(_slotId, _id).Select(i => new ModuleHandle(synthesizer, i)).ToArray();
+ var synthesizer = Slot.Synthesizer;
+ return _lib.GetModuleInputs(_slotId, Id).Select(i => new ModuleHandle(synthesizer, i)).ToArray();
}
- public int[] GetOutputs() => _lib.GetModuleInputs(_slotId, _id);
+ public int[] GetOutputs() => _lib.GetModuleInputs(_slotId, Id);
public ModuleHandle[] GetModuleOutputs()
{
- var synthesizer = _slot.Synthesizer;
- return _lib.GetModuleOutputs(_slotId, _id).Select(i => new ModuleHandle(synthesizer, i)).ToArray();
+ var synthesizer = Slot.Synthesizer;
+ return _lib.GetModuleOutputs(_slotId, Id).Select(i => new ModuleHandle(synthesizer, i)).ToArray();
}
#endregion connections
@@ -99,11 +98,8 @@ public void LoadSamplerSample(string path, int sampleSlot = -1)
{
var lib = _lib;
var slotId = _slotId;
- var id = _id;
- _slot.RunInLock(() =>
- {
- lib.LoadSamplerSample(slotId, id, path, sampleSlot);
- });
+ var id = Id;
+ Slot.RunInLock(() => { lib.LoadSamplerSample(slotId, id, path, sampleSlot); });
}
///
@@ -114,11 +110,8 @@ public void LoadSamplerSample(byte[] data, int sampleSlot = -1)
{
var lib = _lib;
var slotId = _slotId;
- var id = _id;
- _slot.RunInLock(() =>
- {
- lib.LoadSamplerSample(slotId, id, data, sampleSlot);
- });
+ var id = Id;
+ Slot.RunInLock(() => { lib.LoadSamplerSample(slotId, id, data, sampleSlot); });
}
///
@@ -126,7 +119,7 @@ public void LoadSamplerSample(byte[] data, int sampleSlot = -1)
///
public void LoadIntoMetaModule(string path)
{
- _lib.LoadIntoMetaModule(_slotId, _id, path);
+ _lib.LoadIntoMetaModule(_slotId, Id, path);
}
///
@@ -134,7 +127,7 @@ public void LoadIntoMetaModule(string path)
///
public void LoadIntoMetaModule(byte[] data)
{
- _lib.LoadIntoMetaModule(_slotId, _id, data);
+ _lib.LoadIntoMetaModule(_slotId, Id, data);
}
///
@@ -142,7 +135,7 @@ public void LoadIntoMetaModule(byte[] data)
///
public void LoadIntoVorbisPLayer(string path)
{
- _lib.LoadIntoVorbisPLayer(_slotId, _id, path);
+ _lib.LoadIntoVorbisPLayer(_slotId, Id, path);
}
///
@@ -150,29 +143,23 @@ public void LoadIntoVorbisPLayer(string path)
///
public void LoadIntoVorbisPLayer(byte[] data)
{
- _lib.LoadIntoVorbisPLayer(_slotId, _id, data);
+ _lib.LoadIntoVorbisPLayer(_slotId, Id, data);
}
public int WriteCurve(int curveId, float[] buffer)
{
var lib = _lib;
var slotId = _slotId;
- var id = _id;
- return _slot.RunInLock(() =>
- {
- return lib.WriteModuleCurve(slotId, id, curveId, buffer);
- });
+ var id = Id;
+ return Slot.RunInLock(() => lib.WriteModuleCurve(slotId, id, curveId, buffer));
}
public int ReadCurve(int curveId, float[] buffer)
{
var lib = _lib;
var slotId = _slotId;
- var id = _id;
- return _slot.RunInLock(() =>
- {
- return lib.ReadModuleCurve(slotId, id, curveId, buffer);
- });
+ var id = Id;
+ return Slot.RunInLock(() => lib.ReadModuleCurve(slotId, id, curveId, buffer));
}
#endregion specific data IO
@@ -181,47 +168,47 @@ public int ReadCurve(int curveId, float[] buffer)
public int GetControllerCount()
{
- return _lib.GetModuleControllerCount(_slotId, _id);
+ return _lib.GetModuleControllerCount(_slotId, Id);
}
- public string GetControllerName(int controllerId)
+ public string? GetControllerName(int controllerId)
{
- return _lib.GetModuleControllerName(_slotId, _id, controllerId);
+ return _lib.GetModuleControllerName(_slotId, Id, controllerId);
}
public int GetControllerValue(int controllerId, ValueScalingType scaling = ValueScalingType.Displayed)
{
- return _lib.GetModuleControllerValue(_slotId, _id, controllerId, scaling);
+ return _lib.GetModuleControllerValue(_slotId, Id, controllerId, scaling);
}
public void SetControllerValue(int controller, int value, ValueScalingType scaling = ValueScalingType.Displayed)
{
- _lib.SetModuleControllerValue(_slotId, _id, controller, value, scaling);
+ _lib.SetModuleControllerValue(_slotId, Id, controller, value, scaling);
}
public int GetControllerMinValue(int controllerId, ValueScalingType scaling)
{
- return _lib.GetModuleControllerMinValue(_slotId, _id, controllerId, scaling);
+ return _lib.GetModuleControllerMinValue(_slotId, Id, controllerId, scaling);
}
public int GetControllerMaxValue(int controllerId, ValueScalingType scaling)
{
- return _lib.GetModuleControllerMaxValue(_slotId, _id, controllerId, scaling);
+ return _lib.GetModuleControllerMaxValue(_slotId, Id, controllerId, scaling);
}
public int GetControllerOffset(int controllerId)
{
- return _lib.GetModuleControllerOffset(_slotId, _id, controllerId);
+ return _lib.GetModuleControllerOffset(_slotId, Id, controllerId);
}
public ControllerType GetControllerType(int controllerId)
{
- return _lib.GetModuleControllerType(_slotId, _id, controllerId);
+ return _lib.GetModuleControllerType(_slotId, Id, controllerId);
}
public int GetControllerGroup(int controllerId)
{
- return _lib.GetModuleControllerGroup(_slotId, _id, controllerId);
+ return _lib.GetModuleControllerGroup(_slotId, Id, controllerId);
}
#endregion controllers
diff --git a/SunSharp/ObjectWrapper/Modules/IModuleHandleWrapper.cs b/SunSharp/ObjectWrapper/Modules/IModuleHandleWrapper.cs
index 273fd94..ed4f1c9 100644
--- a/SunSharp/ObjectWrapper/Modules/IModuleHandleWrapper.cs
+++ b/SunSharp/ObjectWrapper/Modules/IModuleHandleWrapper.cs
@@ -2,84 +2,105 @@
{
public interface IModuleHandleWrapper
{
- ModuleHandle Module { get; }
+ ModuleHandle ModuleHandle { get; }
}
- public static class ModuleHandleWrapperExtensions
+ public static class ModuleWrapperExtensions
{
///
- public static ModuleFlags GetFlags(this IModuleHandleWrapper wrapper) => wrapper.Module.GetFlags();
+ public static ModuleFlags GetFlags(this IModuleHandleWrapper wrapper) => wrapper.ModuleHandle.GetFlags();
///
- public static ModuleType GetModuleType(this IModuleHandleWrapper wrapper) => wrapper.Module.GetModuleType();
+ public static ModuleType GetModuleType(this IModuleHandleWrapper wrapper) =>
+ wrapper.ModuleHandle.GetModuleType();
///
- public static bool GetExists(this IModuleHandleWrapper wrapper) => wrapper.Module.GetExists();
+ public static bool GetExists(this IModuleHandleWrapper wrapper) => wrapper.ModuleHandle.GetExists();
- ///
- public static (int finetune, int relativeNote) GetFinetune(this IModuleHandleWrapper wrapper) => wrapper.Module.GetFinetune();
+ ///
+ public static FineTunePair GetFineTune(this IModuleHandleWrapper wrapper) => wrapper.ModuleHandle.GetFineTune();
- ///
- public static void SetFinetune(this IModuleHandleWrapper wrapper, int finetune, int relativeNote) => wrapper.Module.SetFinetune(finetune, relativeNote);
+ ///
+ public static void SetFineTune(this IModuleHandleWrapper wrapper, FineTunePair pair) =>
+ wrapper.ModuleHandle.SetFineTune(pair);
///
- public static int ReadScope(this IModuleHandleWrapper wrapper, AudioChannel channel, short[] buffer) => wrapper.Module.ReadScope(channel, buffer);
+ public static int ReadScope(this IModuleHandleWrapper wrapper, AudioChannel channel, short[] buffer) =>
+ wrapper.ModuleHandle.ReadScope(channel, buffer);
///
- public static string GetName(this IModuleHandleWrapper wrapper) => wrapper.Module.GetName();
+ public static string? GetName(this IModuleHandleWrapper wrapper) => wrapper.ModuleHandle.GetName();
///
- public static void SetName(this IModuleHandleWrapper wrapper, string name) => wrapper.Module.SetName(name);
+ public static void SetName(this IModuleHandleWrapper wrapper, string name) =>
+ wrapper.ModuleHandle.SetName(name);
///
- public static (int x, int y) GetPosition(this IModuleHandleWrapper wrapper) => wrapper.Module.GetPosition();
+ public static (int x, int y) GetPosition(this IModuleHandleWrapper wrapper) =>
+ wrapper.ModuleHandle.GetPosition();
///
- public static void SetPosition(this IModuleHandleWrapper wrapper, int x, int y) => wrapper.Module.SetPosition(x, y);
+ public static void SetPosition(this IModuleHandleWrapper wrapper, int x, int y) =>
+ wrapper.ModuleHandle.SetPosition(x, y);
///
- public static (byte R, byte G, byte B) GetColor(this IModuleHandleWrapper wrapper) => wrapper.Module.GetColor();
+ public static (byte r, byte g, byte b) GetColor(this IModuleHandleWrapper wrapper) =>
+ wrapper.ModuleHandle.GetColor();
///
- public static void SetColor(this IModuleHandleWrapper wrapper, byte R, byte G, byte B) => wrapper.Module.SetColor(R, G, B);
+ public static void SetColor(this IModuleHandleWrapper wrapper, byte R, byte G, byte B) =>
+ wrapper.ModuleHandle.SetColor(R, G, B);
///
- public static int[] GetInputs(this IModuleHandleWrapper wrapper) => wrapper.Module.GetInputs();
+ public static int[] GetInputs(this IModuleHandleWrapper wrapper) => wrapper.ModuleHandle.GetInputs();
///
- public static ModuleHandle[] GetInputModules(this IModuleHandleWrapper wrapper) => wrapper.Module.GetInputModules();
+ public static ModuleHandle[] GetInputModules(this IModuleHandleWrapper wrapper) =>
+ wrapper.ModuleHandle.GetInputModules();
///
- public static int[] GetOutputs(this IModuleHandleWrapper wrapper) => wrapper.Module.GetOutputs();
+ public static int[] GetOutputs(this IModuleHandleWrapper wrapper) => wrapper.ModuleHandle.GetOutputs();
///
- public static ModuleHandle[] GetModuleOutputs(this IModuleHandleWrapper wrapper) => wrapper.Module.GetModuleOutputs();
+ public static ModuleHandle[] GetModuleOutputs(this IModuleHandleWrapper wrapper) =>
+ wrapper.ModuleHandle.GetModuleOutputs();
///
- public static int GetControllerCount(this IModuleHandleWrapper wrapper) => wrapper.Module.GetControllerCount();
+ public static int GetControllerCount(this IModuleHandleWrapper wrapper) =>
+ wrapper.ModuleHandle.GetControllerCount();
///
- public static string GetControllerName(this IModuleHandleWrapper wrapper, int controllerId) => wrapper.Module.GetControllerName(controllerId);
+ public static string? GetControllerName(this IModuleHandleWrapper wrapper, int controllerId) =>
+ wrapper.ModuleHandle.GetControllerName(controllerId);
///
- public static int GetControllerValue(this IModuleHandleWrapper wrapper, int controllerId, ValueScalingType scaling = ValueScalingType.Displayed) => wrapper.GetControllerValue(controllerId, scaling);
+ public static int GetControllerValue(this IModuleHandleWrapper wrapper, int controllerId,
+ ValueScalingType scaling = ValueScalingType.Displayed) =>
+ wrapper.ModuleHandle.GetControllerValue(controllerId, scaling);
///
- public static void SetControllerValue(this IModuleHandleWrapper wrapper, int controller, int value, ValueScalingType scaling = ValueScalingType.Displayed) => wrapper.SetControllerValue(controller, value, scaling);
+ public static void SetControllerValue(this IModuleHandleWrapper wrapper, int controller, int value,
+ ValueScalingType scaling = ValueScalingType.Displayed) =>
+ wrapper.ModuleHandle.SetControllerValue(controller, value, scaling);
///
- public static int GetControllerMinValue(this IModuleHandleWrapper wrapper, int controllerId, ValueScalingType scaling) => wrapper.Module.GetControllerMinValue(controllerId, scaling);
+ public static int GetControllerMinValue(this IModuleHandleWrapper wrapper, int controllerId,
+ ValueScalingType scaling) => wrapper.ModuleHandle.GetControllerMinValue(controllerId, scaling);
///
- public static int GetControllerMaxValue(this IModuleHandleWrapper wrapper, int controllerId, ValueScalingType scaling) => wrapper.Module.GetControllerMaxValue(controllerId, scaling);
+ public static int GetControllerMaxValue(this IModuleHandleWrapper wrapper, int controllerId,
+ ValueScalingType scaling) => wrapper.ModuleHandle.GetControllerMaxValue(controllerId, scaling);
///
- public static int GetControllerOffset(this IModuleHandleWrapper wrapper, int controllerId) => wrapper.Module.GetControllerOffset(controllerId);
+ public static int GetControllerOffset(this IModuleHandleWrapper wrapper, int controllerId) =>
+ wrapper.ModuleHandle.GetControllerOffset(controllerId);
- ///
- public static ControllerType GetModuleControllerType(this IModuleHandleWrapper wrapper, int controllerId) => wrapper.Module.GetControllerType(controllerId);
+ ///
+ public static ControllerType GetControllerType(this IModuleHandleWrapper wrapper, int controllerId) =>
+ wrapper.ModuleHandle.GetControllerType(controllerId);
- ///
- public static int GetModuleControllerGroup(this IModuleHandleWrapper wrapper, int controllerId) => wrapper.Module.GetControllerGroup(controllerId);
+ ///
+ public static int GetControllerGroup(this IModuleHandleWrapper wrapper, int controllerId) =>
+ wrapper.ModuleHandle.GetControllerGroup(controllerId);
}
}
diff --git a/SunSharp/ObjectWrapper/Modules/SpecificModules.Generated.cs b/SunSharp/ObjectWrapper/Modules/SpecificModules.Generated.cs
index 3482a17..9fb33b3 100644
--- a/SunSharp/ObjectWrapper/Modules/SpecificModules.Generated.cs
+++ b/SunSharp/ObjectWrapper/Modules/SpecificModules.Generated.cs
@@ -705,11 +705,11 @@ public static class ModuleExtensions
public struct ADSRModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public ADSRModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -719,192 +719,192 @@ public ADSRModuleHandle(ModuleHandle module)
/// Original name: Attack
/// Value range: 0 to 10000
///
- public int GetAttack() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetAttack() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Attack
/// Value range: 0 to 10000
///
- public void SetAttack(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetAttack(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetAttackCurve() => (ADSRCurveType)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public ADSRCurveType GetAttackCurve() => (ADSRCurveType)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetAttackCurve(ADSRCurveType value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetAttackCurve(ADSRCurveType value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Decay
/// Value range: 0 to 10000
///
- public int GetDecay() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetDecay() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Decay
/// Value range: 0 to 10000
///
- public void SetDecay(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetDecay(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetDecayCurve() => (ADSRCurveType)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public ADSRCurveType GetDecayCurve() => (ADSRCurveType)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetDecayCurve(ADSRCurveType value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetDecayCurve(ADSRCurveType value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Generator, AmplitudeModulatorMono, AmplitudeModulatorStereo
///
- public ADSRMode GetMode() => (ADSRMode)Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public ADSRMode GetMode() => (ADSRMode)ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Generator, AmplitudeModulatorMono, AmplitudeModulatorStereo
///
- public void SetMode(ADSRMode value) => Module.SetControllerValue(13, (int)value, ValueScalingType.Displayed);
+ public void SetMode(ADSRMode value) => ModuleHandle.SetControllerValue(13, (int)value, ValueScalingType.Displayed);
///
/// Original name: On NoteOFF
/// Possible values: DoNothing, StopOnLastNote, Stop
///
- public ADSROnNoteOffBehaviour GetOnNoteOff() => (ADSROnNoteOffBehaviour)Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public ADSROnNoteOffBehaviour GetOnNoteOff() => (ADSROnNoteOffBehaviour)ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: On NoteOFF
/// Possible values: DoNothing, StopOnLastNote, Stop
///
- public void SetOnNoteOff(ADSROnNoteOffBehaviour value) => Module.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
+ public void SetOnNoteOff(ADSROnNoteOffBehaviour value) => ModuleHandle.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
///
/// Original name: On NoteON
/// Possible values: DoNothing, StartOnFirstNote, Start
///
- public ADSROnNoteOnBehaviour GetOnNoteOn() => (ADSROnNoteOnBehaviour)Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public ADSROnNoteOnBehaviour GetOnNoteOn() => (ADSROnNoteOnBehaviour)ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: On NoteON
/// Possible values: DoNothing, StartOnFirstNote, Start
///
- public void SetOnNoteOn(ADSROnNoteOnBehaviour value) => Module.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
+ public void SetOnNoteOn(ADSROnNoteOnBehaviour value) => ModuleHandle.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 10000
///
- public int GetRelease() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetRelease() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 10000
///
- public void SetRelease(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetRelease(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetReleaseCurve() => (ADSRCurveType)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public ADSRCurveType GetReleaseCurve() => (ADSRCurveType)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetReleaseCurve(ADSRCurveType value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetReleaseCurve(ADSRCurveType value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Smooth transitions
/// Possible values: Off, RestartAndVolumeChange, RestartAndVolumeChangeSmooth, VolumeChange
///
- public ADSRSmoothTransitions GetSmoothTransitions() => (ADSRSmoothTransitions)Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public ADSRSmoothTransitions GetSmoothTransitions() => (ADSRSmoothTransitions)ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: Smooth transitions
/// Possible values: Off, RestartAndVolumeChange, RestartAndVolumeChangeSmooth, VolumeChange
///
- public void SetSmoothTransitions(ADSRSmoothTransitions value) => Module.SetControllerValue(14, (int)value, ValueScalingType.Displayed);
+ public void SetSmoothTransitions(ADSRSmoothTransitions value) => ModuleHandle.SetControllerValue(14, (int)value, ValueScalingType.Displayed);
///
/// Original name: State
/// Possible values: Off, On
///
- public Toggle GetState() => (Toggle)Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public Toggle GetState() => (Toggle)ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: State
/// Possible values: Off, On
///
- public void SetState(Toggle value) => Module.SetControllerValue(10, (int)value, ValueScalingType.Displayed);
+ public void SetState(Toggle value) => ModuleHandle.SetControllerValue(10, (int)value, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On, Repeat
///
- public ADSRSustainMode GetSustain() => (ADSRSustainMode)Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public ADSRSustainMode GetSustain() => (ADSRSustainMode)ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On, Repeat
///
- public void SetSustain(ADSRSustainMode value) => Module.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
+ public void SetSustain(ADSRSustainMode value) => ModuleHandle.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
///
/// Original name: Sustain level
/// Value range: 0 to 32768
///
- public int GetSustainLevel() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetSustainLevel() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Sustain level
/// Value range: 0 to 32768
///
- public void SetSustainLevel(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetSustainLevel(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Sustain pedal
/// Possible values: Off, On
///
- public Toggle GetSustainPedal() => (Toggle)Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public Toggle GetSustainPedal() => (Toggle)ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Sustain pedal
/// Possible values: Off, On
///
- public void SetSustainPedal(Toggle value) => Module.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
+ public void SetSustainPedal(Toggle value) => ModuleHandle.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct AmplifierModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public AmplifierModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -914,120 +914,120 @@ public AmplifierModuleHandle(ModuleHandle module)
/// Original name: Absolute
/// Possible values: Off, On
///
- public Toggle GetAbsolute() => (Toggle)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public Toggle GetAbsolute() => (Toggle)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Absolute
/// Possible values: Off, On
///
- public void SetAbsolute(Toggle value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetAbsolute(Toggle value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Balance
/// Value range: -128 to 128
///
- public int GetBalance() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetBalance() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Balance
/// Value range: -128 to 128
///
- public void SetBalance(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetBalance(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Bipolar DC Offset
/// Value range: -16384 to 16384
///
- public int GetBipolarDCOffset() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetBipolarDCOffset() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Bipolar DC Offset
/// Value range: -16384 to 16384
///
- public void SetBipolarDCOffset(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetBipolarDCOffset(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: DC Offset
/// Value range: -128 to 128
///
- public int GetDCOffset() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetDCOffset() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: DC Offset
/// Value range: -128 to 128
///
- public void SetDCOffset(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetDCOffset(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Fine volume
/// Value range: 0 to 32768
///
- public int GetFineVolume() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetFineVolume() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Fine volume
/// Value range: 0 to 32768
///
- public void SetFineVolume(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetFineVolume(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: 0 to 5000
///
- public int GetGain() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetGain() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: 0 to 5000
///
- public void SetGain(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetGain(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Inverse
/// Possible values: Off, On
///
- public Toggle GetInverse() => (Toggle)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public Toggle GetInverse() => (Toggle)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Inverse
/// Possible values: Off, On
///
- public void SetInverse(Toggle value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetInverse(Toggle value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: Stereo width
/// Value range: 0 to 256
///
- public int GetStereoWidth() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetStereoWidth() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Stereo width
/// Value range: 0 to 256
///
- public void SetStereoWidth(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetStereoWidth(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 1024
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 1024
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct AnalogGeneratorModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public AnalogGeneratorModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -1037,265 +1037,265 @@ public AnalogGeneratorModuleHandle(ModuleHandle module)
/// Original name: Attack
/// Value range: 0 to 256
///
- public int GetAttack() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetAttack() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Attack
/// Value range: 0 to 256
///
- public void SetAttack(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetAttack(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Duty cycle
/// Value range: 0 to 1024
///
- public int GetDutyCycle() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetDutyCycle() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Duty cycle
/// Value range: 0 to 1024
///
- public void SetDutyCycle(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetDutyCycle(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Exponential envelope
/// Possible values: Off, On
///
- public Toggle GetExponentialEnvelope() => (Toggle)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Toggle GetExponentialEnvelope() => (Toggle)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Exponential envelope
/// Possible values: Off, On
///
- public void SetExponentialEnvelope(Toggle value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetExponentialEnvelope(Toggle value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: F.attack
/// Value range: 0 to 256
///
- public int GetFAttack() => Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public int GetFAttack() => ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: F.attack
/// Value range: 0 to 256
///
- public void SetFAttack(int value) => Module.SetControllerValue(13, value, ValueScalingType.Displayed);
+ public void SetFAttack(int value) => ModuleHandle.SetControllerValue(13, value, ValueScalingType.Displayed);
///
/// Original name: F.envelope
/// Possible values: Off, SustainOff, SustainOn
///
- public AnalogGeneratorEnvelopeMode GetFEnvelope() => (AnalogGeneratorEnvelopeMode)Module.GetControllerValue(15, ValueScalingType.Displayed);
+ public AnalogGeneratorEnvelopeMode GetFEnvelope() => (AnalogGeneratorEnvelopeMode)ModuleHandle.GetControllerValue(15, ValueScalingType.Displayed);
///
/// Original name: F.envelope
/// Possible values: Off, SustainOff, SustainOn
///
- public void SetFEnvelope(AnalogGeneratorEnvelopeMode value) => Module.SetControllerValue(15, (int)value, ValueScalingType.Displayed);
+ public void SetFEnvelope(AnalogGeneratorEnvelopeMode value) => ModuleHandle.SetControllerValue(15, (int)value, ValueScalingType.Displayed);
///
/// Original name: F.exponential freq
/// Possible values: Off, On
///
- public Toggle GetFExponentialFreq() => (Toggle)Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public Toggle GetFExponentialFreq() => (Toggle)ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: F.exponential freq
/// Possible values: Off, On
///
- public void SetFExponentialFreq(Toggle value) => Module.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
+ public void SetFExponentialFreq(Toggle value) => ModuleHandle.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
///
/// Original name: F.freq
/// Value range: 0 to 14000
///
- public int GetFFreq() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetFFreq() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: F.freq
/// Value range: 0 to 14000
///
- public void SetFFreq(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetFFreq(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: Filter
/// Possible values: Off, LP12dB, HP12dB, BP12dB, BR12dB, LP24dB, HP24dB, BP24dB, BR24dB
///
- public AnalogGeneratorFilterType GetFilter() => (AnalogGeneratorFilterType)Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public AnalogGeneratorFilterType GetFilter() => (AnalogGeneratorFilterType)ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Filter
/// Possible values: Off, LP12dB, HP12dB, BP12dB, BR12dB, LP24dB, HP24dB, BP24dB, BR24dB
///
- public void SetFilter(AnalogGeneratorFilterType value) => Module.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
+ public void SetFilter(AnalogGeneratorFilterType value) => ModuleHandle.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
///
/// Original name: F.release
/// Value range: 0 to 256
///
- public int GetFRelease() => Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public int GetFRelease() => ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: F.release
/// Value range: 0 to 256
///
- public void SetFRelease(int value) => Module.SetControllerValue(14, value, ValueScalingType.Displayed);
+ public void SetFRelease(int value) => ModuleHandle.SetControllerValue(14, value, ValueScalingType.Displayed);
///
/// Original name: F.resonance
/// Value range: 0 to 1530
///
- public int GetFResonance() => Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public int GetFResonance() => ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: F.resonance
/// Value range: 0 to 1530
///
- public void SetFResonance(int value) => Module.SetControllerValue(11, value, ValueScalingType.Displayed);
+ public void SetFResonance(int value) => ModuleHandle.SetControllerValue(11, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public Quality GetMode() => (Quality)Module.GetControllerValue(17, ValueScalingType.Displayed);
+ public Quality GetMode() => (Quality)ModuleHandle.GetControllerValue(17, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public void SetMode(Quality value) => Module.SetControllerValue(17, (int)value, ValueScalingType.Displayed);
+ public void SetMode(Quality value) => ModuleHandle.SetControllerValue(17, (int)value, ValueScalingType.Displayed);
///
/// Original name: Noise
/// Value range: 0 to 256
///
- public int GetNoise() => Module.GetControllerValue(18, ValueScalingType.Displayed);
+ public int GetNoise() => ModuleHandle.GetControllerValue(18, ValueScalingType.Displayed);
///
/// Original name: Noise
/// Value range: 0 to 256
///
- public void SetNoise(int value) => Module.SetControllerValue(18, value, ValueScalingType.Displayed);
+ public void SetNoise(int value) => ModuleHandle.SetControllerValue(18, value, ValueScalingType.Displayed);
///
/// Original name: Osc2
/// Value range: -1000 to 1000
///
- public int GetOsc2() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetOsc2() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Osc2
/// Value range: -1000 to 1000
///
- public void SetOsc2(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetOsc2(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Osc2 mode
/// Possible values: Add, Sub, Mul, Min, Max, BitwiseAnd, BitwiseXor
///
- public AnalogGeneratorOsc2Mode GetOsc2Mode() => (AnalogGeneratorOsc2Mode)Module.GetControllerValue(20, ValueScalingType.Displayed);
+ public AnalogGeneratorOsc2Mode GetOsc2Mode() => (AnalogGeneratorOsc2Mode)ModuleHandle.GetControllerValue(20, ValueScalingType.Displayed);
///
/// Original name: Osc2 mode
/// Possible values: Add, Sub, Mul, Min, Max, BitwiseAnd, BitwiseXor
///
- public void SetOsc2Mode(AnalogGeneratorOsc2Mode value) => Module.SetControllerValue(20, (int)value, ValueScalingType.Displayed);
+ public void SetOsc2Mode(AnalogGeneratorOsc2Mode value) => ModuleHandle.SetControllerValue(20, (int)value, ValueScalingType.Displayed);
///
/// Original name: Osc2 phase
/// Value range: 0 to 32768
///
- public int GetOsc2Phase() => Module.GetControllerValue(21, ValueScalingType.Displayed);
+ public int GetOsc2Phase() => ModuleHandle.GetControllerValue(21, ValueScalingType.Displayed);
///
/// Original name: Osc2 phase
/// Value range: 0 to 32768
///
- public void SetOsc2Phase(int value) => Module.SetControllerValue(21, value, ValueScalingType.Displayed);
+ public void SetOsc2Phase(int value) => ModuleHandle.SetControllerValue(21, value, ValueScalingType.Displayed);
///
/// Original name: Osc2 volume
/// Value range: 0 to 32768
///
- public int GetOsc2Volume() => Module.GetControllerValue(19, ValueScalingType.Displayed);
+ public int GetOsc2Volume() => ModuleHandle.GetControllerValue(19, ValueScalingType.Displayed);
///
/// Original name: Osc2 volume
/// Value range: 0 to 32768
///
- public void SetOsc2Volume(int value) => Module.SetControllerValue(19, value, ValueScalingType.Displayed);
+ public void SetOsc2Volume(int value) => ModuleHandle.SetControllerValue(19, value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public int GetPolyphony() => Module.GetControllerValue(16, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(16, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public void SetPolyphony(int value) => Module.SetControllerValue(16, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(16, value, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 256
///
- public int GetRelease() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetRelease() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 256
///
- public void SetRelease(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetRelease(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On
///
- public Toggle GetSustain() => (Toggle)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public Toggle GetSustain() => (Toggle)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On
///
- public void SetSustain(Toggle value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetSustain(Toggle value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Triangle, Saw, Square, NoiseSampler, Drawn, Sin, Hsin, Asin, DrawnSpline, NoiseSamplerSpline, WhiteNoise, PinkNoise, RedNoise, BlueNosie, VioletNoise, GreyNoise, Harmonics
///
- public AnalogGeneratorWaveform GetWaveform() => (AnalogGeneratorWaveform)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public AnalogGeneratorWaveform GetWaveform() => (AnalogGeneratorWaveform)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Triangle, Saw, Square, NoiseSampler, Drawn, Sin, Hsin, Asin, DrawnSpline, NoiseSamplerSpline, WhiteNoise, PinkNoise, RedNoise, BlueNosie, VioletNoise, GreyNoise, Harmonics
///
- public void SetWaveform(AnalogGeneratorWaveform value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform(AnalogGeneratorWaveform value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
#endregion controllers
@@ -1311,7 +1311,7 @@ public void ReadDrawnValues(float[] buffer)
if (buffer.Length < 32)
throw new System.ArgumentException("Buffer must be at least of size 32");
- Module.ReadCurve(0, buffer);
+ ModuleHandle.ReadCurve(0, buffer);
}
///
@@ -1324,7 +1324,7 @@ public void WriteDrawnValues(float[] buffer)
if (buffer.Length < 32)
throw new System.ArgumentException("Buffer must be at least of size 32");
- Module.WriteCurve(0, buffer);
+ ModuleHandle.WriteCurve(0, buffer);
}
#endregion curves
@@ -1332,11 +1332,11 @@ public void WriteDrawnValues(float[] buffer)
public struct CompressorModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public CompressorModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -1346,96 +1346,96 @@ public CompressorModuleHandle(ModuleHandle module)
/// Original name: Attack
/// Value range: 0 to 500
///
- public int GetAttack() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetAttack() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Attack
/// Value range: 0 to 500
///
- public void SetAttack(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetAttack(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Peak, RMS, PeakZeroLatency
///
- public CompressorMode GetMode() => (CompressorMode)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public CompressorMode GetMode() => (CompressorMode)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Peak, RMS, PeakZeroLatency
///
- public void SetMode(CompressorMode value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetMode(CompressorMode value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 1 to 1000
///
- public int GetRelease() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetRelease() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 1 to 1000
///
- public void SetRelease(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetRelease(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Side-chain input
/// Value range: 0 to 32
///
- public int GetSideChainInput() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetSideChainInput() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Side-chain input
/// Value range: 0 to 32
///
- public void SetSideChainInput(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetSideChainInput(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Slope
/// Value range: 0 to 200
///
- public int GetSlope() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetSlope() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Slope
/// Value range: 0 to 200
///
- public void SetSlope(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetSlope(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Threshold
/// Value range: 0 to 512
///
- public int GetThreshold() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetThreshold() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Threshold
/// Value range: 0 to 512
///
- public void SetThreshold(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetThreshold(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct ControlToNoteModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public ControlToNoteModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -1445,132 +1445,132 @@ public ControlToNoteModuleHandle(ModuleHandle module)
/// Original name: Finetune
/// Value range: -256 to 256
///
- public int GetFinetune() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetFinetune() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Finetune
/// Value range: -256 to 256
///
- public void SetFinetune(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetFinetune(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: First note
/// Value range: 0 to 120
///
- public int GetFirstNote() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetFirstNote() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: First note
/// Value range: 0 to 120
///
- public void SetFirstNote(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetFirstNote(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: NoteOFF
/// Possible values: Nothing, OnMinPitch, OnMaxPitch
///
- public ControlToNoteOffBehaviour GetNoteOff() => (ControlToNoteOffBehaviour)Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public ControlToNoteOffBehaviour GetNoteOff() => (ControlToNoteOffBehaviour)ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: NoteOFF
/// Possible values: Nothing, OnMinPitch, OnMaxPitch
///
- public void SetNoteOff(ControlToNoteOffBehaviour value) => Module.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
+ public void SetNoteOff(ControlToNoteOffBehaviour value) => ModuleHandle.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
///
/// Original name: NoteON
/// Possible values: Nothing, OnPitchChange
///
- public ControlToNoteOnBehaviour GetNoteOn() => (ControlToNoteOnBehaviour)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public ControlToNoteOnBehaviour GetNoteOn() => (ControlToNoteOnBehaviour)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: NoteON
/// Possible values: Nothing, OnPitchChange
///
- public void SetNoteOn(ControlToNoteOnBehaviour value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetNoteOn(ControlToNoteOnBehaviour value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Pitch
/// Value range: 0 to 32768
///
- public int GetPitch() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetPitch() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Pitch
/// Value range: 0 to 32768
///
- public void SetPitch(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetPitch(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Range (number of semitones)
/// Value range: 0 to 120
///
- public int GetRangeNumberOfSemitones() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetRangeNumberOfSemitones() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Range (number of semitones)
/// Value range: 0 to 120
///
- public void SetRangeNumberOfSemitones(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetRangeNumberOfSemitones(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Record notes
/// Possible values: Off, On
///
- public Toggle GetRecordNotes() => (Toggle)Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public Toggle GetRecordNotes() => (Toggle)ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Record notes
/// Possible values: Off, On
///
- public void SetRecordNotes(Toggle value) => Module.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
+ public void SetRecordNotes(Toggle value) => ModuleHandle.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
///
/// Original name: State
/// Possible values: Off, On
///
- public Toggle GetState() => (Toggle)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Toggle GetState() => (Toggle)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: State
/// Possible values: Off, On
///
- public void SetState(Toggle value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetState(Toggle value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Transpose
/// Value range: -128 to 128
///
- public int GetTranspose() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetTranspose() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Transpose
/// Value range: -128 to 128
///
- public void SetTranspose(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetTranspose(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Velocity
/// Value range: 0 to 256
///
- public int GetVelocity() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetVelocity() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Velocity
/// Value range: 0 to 256
///
- public void SetVelocity(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetVelocity(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct DcBlockerModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public DcBlockerModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -1580,24 +1580,24 @@ public DcBlockerModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
#endregion controllers
}
public struct DelayModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public DelayModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -1607,144 +1607,144 @@ public DelayModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Delay L
/// Value range: 0 to 256
///
- public int GetDelayL() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetDelayL() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Delay L
/// Value range: 0 to 256
///
- public void SetDelayL(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetDelayL(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Delay multiplier
/// Value range: 1 to 15
///
- public int GetDelayMultiplier() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetDelayMultiplier() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Delay multiplier
/// Value range: 1 to 15
///
- public void SetDelayMultiplier(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetDelayMultiplier(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: Delay R
/// Value range: 0 to 256
///
- public int GetDelayR() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetDelayR() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Delay R
/// Value range: 0 to 256
///
- public void SetDelayR(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetDelayR(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Delay unit
/// Possible values: SecondDivBy16384, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine, SecondDivBy44100, SecondDivBy48000, Sample
///
- public DelayUnit GetDelayUnit() => (DelayUnit)Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public DelayUnit GetDelayUnit() => (DelayUnit)ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Delay unit
/// Possible values: SecondDivBy16384, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine, SecondDivBy44100, SecondDivBy48000, Sample
///
- public void SetDelayUnit(DelayUnit value) => Module.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
+ public void SetDelayUnit(DelayUnit value) => ModuleHandle.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 512
///
- public int GetDry() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetDry() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 512
///
- public void SetDry(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetDry(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 32768
///
- public int GetFeedback() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetFeedback() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 32768
///
- public void SetFeedback(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetFeedback(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: Inverse
/// Possible values: Off, On
///
- public Toggle GetInverse() => (Toggle)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public Toggle GetInverse() => (Toggle)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Inverse
/// Possible values: Off, On
///
- public void SetInverse(Toggle value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetInverse(Toggle value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume L
/// Value range: 0 to 256
///
- public int GetVolumeL() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetVolumeL() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Volume L
/// Value range: 0 to 256
///
- public void SetVolumeL(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetVolumeL(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Volume R
/// Value range: 0 to 256
///
- public int GetVolumeR() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetVolumeR() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Volume R
/// Value range: 0 to 256
///
- public void SetVolumeR(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetVolumeR(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 512
///
- public int GetWet() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetWet() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 512
///
- public void SetWet(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetWet(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct DistortionModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public DistortionModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -1754,84 +1754,84 @@ public DistortionModuleHandle(ModuleHandle module)
/// Original name: Bit depth
/// Value range: 1 to 16
///
- public int GetBitDepth() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetBitDepth() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Bit depth
/// Value range: 1 to 16
///
- public void SetBitDepth(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetBitDepth(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: Clipping, Foldback, Foldback2, Foldback3, Overflow, Overflow2, SaturationFoldback, SaturationFoldbackSin, Saturation3, Saturation4, Saturation5
///
- public DistortionType GetDistortionType() => (DistortionType)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public DistortionType GetDistortionType() => (DistortionType)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: Clipping, Foldback, Foldback2, Foldback3, Overflow, Overflow2, SaturationFoldback, SaturationFoldbackSin, Saturation3, Saturation4, Saturation5
///
- public void SetDistortionType(DistortionType value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetDistortionType(DistortionType value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 0 to 44100
///
- public int GetFreq() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetFreq() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 0 to 44100
///
- public void SetFreq(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetFreq(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Noise
/// Value range: 0 to 256
///
- public int GetNoise() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetNoise() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Noise
/// Value range: 0 to 256
///
- public void SetNoise(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetNoise(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Power
/// Value range: 0 to 256
///
- public int GetPower() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetPower() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Power
/// Value range: 0 to 256
///
- public void SetPower(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetPower(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct DrumSynthModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public DrumSynthModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -1841,192 +1841,192 @@ public DrumSynthModuleHandle(ModuleHandle module)
/// Original name: Bass length
/// Value range: 0 to 256
///
- public int GetBassLength() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetBassLength() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Bass length
/// Value range: 0 to 256
///
- public void SetBassLength(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetBassLength(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Bass panning
/// Value range: -128 to 128
///
- public int GetBassPanning() => Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public int GetBassPanning() => ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: Bass panning
/// Value range: -128 to 128
///
- public void SetBassPanning(int value) => Module.SetControllerValue(12, value, ValueScalingType.Displayed);
+ public void SetBassPanning(int value) => ModuleHandle.SetControllerValue(12, value, ValueScalingType.Displayed);
///
/// Original name: Bass power
/// Value range: 0 to 256
///
- public int GetBassPower() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetBassPower() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Bass power
/// Value range: 0 to 256
///
- public void SetBassPower(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetBassPower(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Bass tone
/// Value range: 0 to 256
///
- public int GetBassTone() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetBassTone() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Bass tone
/// Value range: 0 to 256
///
- public void SetBassTone(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetBassTone(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Bass volume
/// Value range: 0 to 512
///
- public int GetBassVolume() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetBassVolume() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Bass volume
/// Value range: 0 to 512
///
- public void SetBassVolume(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetBassVolume(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Hihat length
/// Value range: 0 to 256
///
- public int GetHihatLength() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetHihatLength() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Hihat length
/// Value range: 0 to 256
///
- public void SetHihatLength(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetHihatLength(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Hihat panning
/// Value range: -128 to 128
///
- public int GetHihatPanning() => Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public int GetHihatPanning() => ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: Hihat panning
/// Value range: -128 to 128
///
- public void SetHihatPanning(int value) => Module.SetControllerValue(13, value, ValueScalingType.Displayed);
+ public void SetHihatPanning(int value) => ModuleHandle.SetControllerValue(13, value, ValueScalingType.Displayed);
///
/// Original name: Hihat volume
/// Value range: 0 to 512
///
- public int GetHihatVolume() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetHihatVolume() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Hihat volume
/// Value range: 0 to 512
///
- public void SetHihatVolume(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetHihatVolume(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 8
///
- public int GetPolyphony() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 8
///
- public void SetPolyphony(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Snare length
/// Value range: 0 to 256
///
- public int GetSnareLength() => Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public int GetSnareLength() => ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: Snare length
/// Value range: 0 to 256
///
- public void SetSnareLength(int value) => Module.SetControllerValue(11, value, ValueScalingType.Displayed);
+ public void SetSnareLength(int value) => ModuleHandle.SetControllerValue(11, value, ValueScalingType.Displayed);
///
/// Original name: Snare panning
/// Value range: -128 to 128
///
- public int GetSnarePanning() => Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public int GetSnarePanning() => ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: Snare panning
/// Value range: -128 to 128
///
- public void SetSnarePanning(int value) => Module.SetControllerValue(14, value, ValueScalingType.Displayed);
+ public void SetSnarePanning(int value) => ModuleHandle.SetControllerValue(14, value, ValueScalingType.Displayed);
///
/// Original name: Snare tone
/// Value range: 0 to 256
///
- public int GetSnareTone() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetSnareTone() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Snare tone
/// Value range: 0 to 256
///
- public void SetSnareTone(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetSnareTone(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: Snare volume
/// Value range: 0 to 512
///
- public int GetSnareVolume() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetSnareVolume() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Snare volume
/// Value range: 0 to 512
///
- public void SetSnareVolume(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetSnareVolume(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct EchoModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public EchoModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -2036,122 +2036,122 @@ public EchoModuleHandle(ModuleHandle module)
/// Original name: Delay
/// Value range: 0 to 256
///
- public int GetDelay() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetDelay() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Delay
/// Value range: 0 to 256
///
- public void SetDelay(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetDelay(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Delay unit
/// Possible values: SecondDivBy256, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public EchoDelayUnit GetDelayUnit() => (EchoDelayUnit)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public EchoDelayUnit GetDelayUnit() => (EchoDelayUnit)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Delay unit
/// Possible values: SecondDivBy256, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public void SetDelayUnit(EchoDelayUnit value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetDelayUnit(EchoDelayUnit value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 256
///
- public int GetDry() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetDry() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 256
///
- public void SetDry(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetDry(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public int GetFeedback() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetFeedback() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public void SetFeedback(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetFeedback(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: F.freq
/// Value range: 0 to 22000
///
- public int GetFFreq() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetFFreq() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: F.freq
/// Value range: 0 to 22000
///
- public void SetFFreq(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetFFreq(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Filter
/// Possible values: Off, LP6dB, HP6dB
///
- public EchoFilter GetFilter() => (EchoFilter)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public EchoFilter GetFilter() => (EchoFilter)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Filter
/// Possible values: Off, LP6dB, HP6dB
///
- public void SetFilter(EchoFilter value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetFilter(EchoFilter value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Right channel offset
/// Possible values: Off, On
///
- public Toggle GetRightChannelOffset() => (Toggle)Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public Toggle GetRightChannelOffset() => (Toggle)ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Right channel offset
/// Possible values: Off, On
///
- public void SetRightChannelOffset(Toggle value) => Module.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
+ public void SetRightChannelOffset(Toggle value) => ModuleHandle.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
///
/// Original name: Right channel offset
/// Value range: 0 to 32768
/// Delay/32768
///
- public int GetRightChannelOffsetDelay() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetRightChannelOffsetDelay() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Right channel offset
/// Value range: 0 to 32768
/// Delay/32768
///
- public void SetRightChannelOffsetDelay(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetRightChannelOffsetDelay(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 256
///
- public int GetWet() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetWet() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 256
///
- public void SetWet(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetWet(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct EQModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public EQModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -2161,60 +2161,60 @@ public EQModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: High
/// Value range: 0 to 512
///
- public int GetHigh() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetHigh() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: High
/// Value range: 0 to 512
///
- public void SetHigh(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetHigh(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Low
/// Value range: 0 to 512
///
- public int GetLow() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetLow() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Low
/// Value range: 0 to 512
///
- public void SetLow(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetLow(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Middle
/// Value range: 0 to 512
///
- public int GetMiddle() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetMiddle() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Middle
/// Value range: 0 to 512
///
- public void SetMiddle(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetMiddle(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct FeedbackModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public FeedbackModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -2224,36 +2224,36 @@ public FeedbackModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 10000
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 10000
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct FFTModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public FFTModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -2263,216 +2263,216 @@ public FFTModuleHandle(ModuleHandle module)
/// Original name: All-pass filter
/// Value range: 0 to 32768
///
- public int GetAllPassFilter() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetAllPassFilter() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: All-pass filter
/// Value range: 0 to 32768
///
- public void SetAllPassFilter(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetAllPassFilter(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Buffer (samples)
/// Possible values: x64, x128, x256, x512, x1024, x2048, x4096, x8192
///
- public FFTBufferSize GetBufferSamples() => (FFTBufferSize)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public FFTBufferSize GetBufferSamples() => (FFTBufferSize)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Buffer (samples)
/// Possible values: x64, x128, x256, x512, x1024, x2048, x4096, x8192
///
- public void SetBufferSamples(FFTBufferSize value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetBufferSamples(FFTBufferSize value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: Buf overlap
/// Possible values: None, x2, x4
///
- public FFTBufferOverlap GetBufOverlap() => (FFTBufferOverlap)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public FFTBufferOverlap GetBufOverlap() => (FFTBufferOverlap)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Buf overlap
/// Possible values: None, x2, x4
///
- public void SetBufOverlap(FFTBufferOverlap value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetBufOverlap(FFTBufferOverlap value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public ChannelsInverted GetChannels() => (ChannelsInverted)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public ChannelsInverted GetChannels() => (ChannelsInverted)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public void SetChannels(ChannelsInverted value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(ChannelsInverted value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Deform1
/// Value range: 0 to 32768
///
- public int GetDeform1() => Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public int GetDeform1() => ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: Deform1
/// Value range: 0 to 32768
///
- public void SetDeform1(int value) => Module.SetControllerValue(12, value, ValueScalingType.Displayed);
+ public void SetDeform1(int value) => ModuleHandle.SetControllerValue(12, value, ValueScalingType.Displayed);
///
/// Original name: Deform2
/// Value range: 0 to 32768
///
- public int GetDeform2() => Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public int GetDeform2() => ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: Deform2
/// Value range: 0 to 32768
///
- public void SetDeform2(int value) => Module.SetControllerValue(13, value, ValueScalingType.Displayed);
+ public void SetDeform2(int value) => ModuleHandle.SetControllerValue(13, value, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 32768
///
- public int GetFeedback() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetFeedback() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 32768
///
- public void SetFeedback(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetFeedback(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Freq shift
/// Value range: -4096 to 4096
///
- public int GetFreqShift() => Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public int GetFreqShift() => ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: Freq shift
/// Value range: -4096 to 4096
///
- public void SetFreqShift(int value) => Module.SetControllerValue(11, value, ValueScalingType.Displayed);
+ public void SetFreqShift(int value) => ModuleHandle.SetControllerValue(11, value, ValueScalingType.Displayed);
///
/// Original name: Frequency spread
/// Value range: 0 to 32768
///
- public int GetFrequencySpread() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetFrequencySpread() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Frequency spread
/// Value range: 0 to 32768
///
- public void SetFrequencySpread(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetFrequencySpread(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: HP cutoff
/// Value range: 0 to 32768
///
- public int GetHPCutoff() => Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public int GetHPCutoff() => ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: HP cutoff
/// Value range: 0 to 32768
///
- public void SetHPCutoff(int value) => Module.SetControllerValue(14, value, ValueScalingType.Displayed);
+ public void SetHPCutoff(int value) => ModuleHandle.SetControllerValue(14, value, ValueScalingType.Displayed);
///
/// Original name: LP cutoff
/// Value range: 0 to 32768
///
- public int GetLPCutoff() => Module.GetControllerValue(15, ValueScalingType.Displayed);
+ public int GetLPCutoff() => ModuleHandle.GetControllerValue(15, ValueScalingType.Displayed);
///
/// Original name: LP cutoff
/// Value range: 0 to 32768
///
- public void SetLPCutoff(int value) => Module.SetControllerValue(15, value, ValueScalingType.Displayed);
+ public void SetLPCutoff(int value) => ModuleHandle.SetControllerValue(15, value, ValueScalingType.Displayed);
///
/// Original name: Noise reduction
/// Value range: 0 to 32768
///
- public int GetNoiseReduction() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetNoiseReduction() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Noise reduction
/// Value range: 0 to 32768
///
- public void SetNoiseReduction(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetNoiseReduction(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Phase gain (norm=16384)
/// Value range: 0 to 32768
///
- public int GetPhaseGainNorm16384() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetPhaseGainNorm16384() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Phase gain (norm=16384)
/// Value range: 0 to 32768
///
- public void SetPhaseGainNorm16384(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetPhaseGainNorm16384(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Random phase
/// Value range: 0 to 32768
///
- public int GetRandomPhase() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetRandomPhase() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Random phase
/// Value range: 0 to 32768
///
- public void SetRandomPhase(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetRandomPhase(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: Random phase (lite)
/// Value range: 0 to 32768
///
- public int GetRandomPhaseLite() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetRandomPhaseLite() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Random phase (lite)
/// Value range: 0 to 32768
///
- public void SetRandomPhaseLite(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetRandomPhaseLite(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Possible values: Hz8000, Hz11025, Hz16000, Hz22050, Hz32000, Hz44100, Hz48000, Hz88200, Hz96000, Hz192000
///
- public FFTSampleRate GetSampleRate() => (FFTSampleRate)Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public FFTSampleRate GetSampleRate() => (FFTSampleRate)ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Possible values: Hz8000, Hz11025, Hz16000, Hz22050, Hz32000, Hz44100, Hz48000, Hz88200, Hz96000, Hz192000
///
- public void SetSampleRate(FFTSampleRate value) => Module.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
+ public void SetSampleRate(FFTSampleRate value) => ModuleHandle.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public int GetVolume() => Module.GetControllerValue(16, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(16, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public void SetVolume(int value) => Module.SetControllerValue(16, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(16, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct FilterModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public FilterModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -2482,192 +2482,192 @@ public FilterModuleHandle(ModuleHandle module)
/// Original name: Exponential freq
/// Possible values: Off, On
///
- public Toggle GetExponentialFreq() => (Toggle)Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public Toggle GetExponentialFreq() => (Toggle)ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: Exponential freq
/// Possible values: Off, On
///
- public void SetExponentialFreq(Toggle value) => Module.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
+ public void SetExponentialFreq(Toggle value) => ModuleHandle.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: LP, HP, BP, Notch
///
- public FilterType GetFilterType() => (FilterType)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public FilterType GetFilterType() => (FilterType)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: LP, HP, BP, Notch
///
- public void SetFilterType(FilterType value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetFilterType(FilterType value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 0 to 14000
///
- public int GetFrequency() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetFrequency() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 0 to 14000
///
- public void SetFrequency(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetFrequency(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Impulse
/// Value range: 0 to 14000
///
- public int GetImpulse() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetImpulse() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Impulse
/// Value range: 0 to 14000
///
- public void SetImpulse(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetImpulse(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: LFO amp
/// Value range: 0 to 256
///
- public int GetLFOAmp() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetLFOAmp() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: LFO amp
/// Value range: 0 to 256
///
- public void SetLFOAmp(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetLFOAmp(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: LFO freq
/// Value range: 0 to 1024
///
- public int GetLFOFreq() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetLFOFreq() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: LFO freq
/// Value range: 0 to 1024
///
- public void SetLFOFreq(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetLFOFreq(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: LFO freq unit
/// Possible values: FiveHundredthHz, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public FilterLFOFrequencyUnit GetLFOFreqUnit() => (FilterLFOFrequencyUnit)Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public FilterLFOFrequencyUnit GetLFOFreqUnit() => (FilterLFOFrequencyUnit)ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: LFO freq unit
/// Possible values: FiveHundredthHz, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public void SetLFOFreqUnit(FilterLFOFrequencyUnit value) => Module.SetControllerValue(13, (int)value, ValueScalingType.Displayed);
+ public void SetLFOFreqUnit(FilterLFOFrequencyUnit value) => ModuleHandle.SetControllerValue(13, (int)value, ValueScalingType.Displayed);
///
/// Original name: LFO waveform
/// Possible values: Sin, Saw, Saw2, Square, Random
///
- public FilterLFOWaveform GetLFOWaveform() => (FilterLFOWaveform)Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public FilterLFOWaveform GetLFOWaveform() => (FilterLFOWaveform)ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: LFO waveform
/// Possible values: Sin, Saw, Saw2, Square, Random
///
- public void SetLFOWaveform(FilterLFOWaveform value) => Module.SetControllerValue(14, (int)value, ValueScalingType.Displayed);
+ public void SetLFOWaveform(FilterLFOWaveform value) => ModuleHandle.SetControllerValue(14, (int)value, ValueScalingType.Displayed);
///
/// Original name: Mix
/// Value range: 0 to 256
///
- public int GetMix() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetMix() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Mix
/// Value range: 0 to 256
///
- public void SetMix(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetMix(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public Quality GetMode() => (Quality)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public Quality GetMode() => (Quality)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public void SetMode(Quality value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetMode(Quality value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Resonance
/// Value range: 0 to 1530
///
- public int GetResonance() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetResonance() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Resonance
/// Value range: 0 to 1530
///
- public void SetResonance(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetResonance(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 256
///
- public int GetResponse() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetResponse() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 256
///
- public void SetResponse(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetResponse(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Roll-off
/// Possible values: dB12, dB24, dB36, dB48
///
- public FilterRollOff GetRollOff() => (FilterRollOff)Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public FilterRollOff GetRollOff() => (FilterRollOff)ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: Roll-off
/// Possible values: dB12, dB24, dB36, dB48
///
- public void SetRollOff(FilterRollOff value) => Module.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
+ public void SetRollOff(FilterRollOff value) => ModuleHandle.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
///
/// Original name: Set LFO phase
/// Value range: 0 to 256
///
- public int GetSetLFOPhase() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetSetLFOPhase() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Set LFO phase
/// Value range: 0 to 256
///
- public void SetSetLFOPhase(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetSetLFOPhase(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct FilterProModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public FilterProModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -2677,216 +2677,216 @@ public FilterProModuleHandle(ModuleHandle module)
/// Original name: Exponential freq
/// Possible values: Off, On
///
- public Toggle GetExponentialFreq() => (Toggle)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public Toggle GetExponentialFreq() => (Toggle)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Exponential freq
/// Possible values: Off, On
///
- public void SetExponentialFreq(Toggle value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetExponentialFreq(Toggle value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: LP, HP, BPConstSkirtGain, BPConstPeakGain, Notch, AllPass, Peaking, LowShelf, HighShelf, LP6dB, HP6dB
///
- public FilterProType GetFilterType() => (FilterProType)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public FilterProType GetFilterType() => (FilterProType)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: LP, HP, BPConstSkirtGain, BPConstPeakGain, Notch, AllPass, Peaking, LowShelf, HighShelf, LP6dB, HP6dB
///
- public void SetFilterType(FilterProType value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetFilterType(FilterProType value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 0 to 22000
///
- public int GetFreq() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetFreq() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 0 to 22000
///
- public void SetFreq(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetFreq(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Freq finetune
/// Value range: -1000 to 1000
///
- public int GetFreqFinetune() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetFreqFinetune() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Freq finetune
/// Value range: -1000 to 1000
///
- public void SetFreqFinetune(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetFreqFinetune(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Freq scale
/// Value range: 0 to 200
///
- public int GetFreqScale() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetFreqScale() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Freq scale
/// Value range: 0 to 200
///
- public void SetFreqScale(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetFreqScale(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: -16384 to 16384
///
- public int GetGain() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetGain() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: -16384 to 16384
///
- public void SetGain(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetGain(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: LFO amp
/// Value range: 0 to 32768
///
- public int GetLFOAmp() => Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public int GetLFOAmp() => ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: LFO amp
/// Value range: 0 to 32768
///
- public void SetLFOAmp(int value) => Module.SetControllerValue(13, value, ValueScalingType.Displayed);
+ public void SetLFOAmp(int value) => ModuleHandle.SetControllerValue(13, value, ValueScalingType.Displayed);
///
/// Original name: LFO freq
/// Value range: 0 to 1024
///
- public int GetLFOFreq() => Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public int GetLFOFreq() => ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: LFO freq
/// Value range: 0 to 1024
///
- public void SetLFOFreq(int value) => Module.SetControllerValue(12, value, ValueScalingType.Displayed);
+ public void SetLFOFreq(int value) => ModuleHandle.SetControllerValue(12, value, ValueScalingType.Displayed);
///
/// Original name: LFO freq unit
/// Possible values: FiveHundredthHz, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public FilterLFOFrequencyUnit GetLFOFreqUnit() => (FilterLFOFrequencyUnit)Module.GetControllerValue(16, ValueScalingType.Displayed);
+ public FilterLFOFrequencyUnit GetLFOFreqUnit() => (FilterLFOFrequencyUnit)ModuleHandle.GetControllerValue(16, ValueScalingType.Displayed);
///
/// Original name: LFO freq unit
/// Possible values: FiveHundredthHz, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public void SetLFOFreqUnit(FilterLFOFrequencyUnit value) => Module.SetControllerValue(16, (int)value, ValueScalingType.Displayed);
+ public void SetLFOFreqUnit(FilterLFOFrequencyUnit value) => ModuleHandle.SetControllerValue(16, (int)value, ValueScalingType.Displayed);
///
/// Original name: LFO waveform
/// Possible values: Sin, Saw, Saw2, Square, Random
///
- public FilterLFOWaveform GetLFOWaveform() => (FilterLFOWaveform)Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public FilterLFOWaveform GetLFOWaveform() => (FilterLFOWaveform)ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: LFO waveform
/// Possible values: Sin, Saw, Saw2, Square, Random
///
- public void SetLFOWaveform(FilterLFOWaveform value) => Module.SetControllerValue(14, (int)value, ValueScalingType.Displayed);
+ public void SetLFOWaveform(FilterLFOWaveform value) => ModuleHandle.SetControllerValue(14, (int)value, ValueScalingType.Displayed);
///
/// Original name: Mix
/// Value range: 0 to 32768
///
- public int GetMix() => Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public int GetMix() => ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: Mix
/// Value range: 0 to 32768
///
- public void SetMix(int value) => Module.SetControllerValue(11, value, ValueScalingType.Displayed);
+ public void SetMix(int value) => ModuleHandle.SetControllerValue(11, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Stereo, Mono, StereoSmoothing, MonoSmoothing
///
- public FilterProMode GetMode() => (FilterProMode)Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public FilterProMode GetMode() => (FilterProMode)ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Stereo, Mono, StereoSmoothing, MonoSmoothing
///
- public void SetMode(FilterProMode value) => Module.SetControllerValue(10, (int)value, ValueScalingType.Displayed);
+ public void SetMode(FilterProMode value) => ModuleHandle.SetControllerValue(10, (int)value, ValueScalingType.Displayed);
///
/// Original name: Q
/// Value range: 0 to 32768
///
- public int GetQ() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetQ() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Q
/// Value range: 0 to 32768
///
- public void SetQ(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetQ(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 1000
///
- public int GetResponse() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetResponse() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 1000
///
- public void SetResponse(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetResponse(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: Roll-off
/// Possible values: dB12, dB24, dB36, dB48
///
- public FilterProRollOff GetRollOff() => (FilterProRollOff)Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public FilterProRollOff GetRollOff() => (FilterProRollOff)ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Roll-off
/// Possible values: dB12, dB24, dB36, dB48
///
- public void SetRollOff(FilterProRollOff value) => Module.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
+ public void SetRollOff(FilterProRollOff value) => ModuleHandle.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
///
/// Original name: Set LFO phase
/// Value range: 0 to 256
///
- public int GetSetLFOPhase() => Module.GetControllerValue(15, ValueScalingType.Displayed);
+ public int GetSetLFOPhase() => ModuleHandle.GetControllerValue(15, ValueScalingType.Displayed);
///
/// Original name: Set LFO phase
/// Value range: 0 to 256
///
- public void SetSetLFOPhase(int value) => Module.SetControllerValue(15, value, ValueScalingType.Displayed);
+ public void SetSetLFOPhase(int value) => ModuleHandle.SetControllerValue(15, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct FlangerModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public FlangerModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -2896,132 +2896,132 @@ public FlangerModuleHandle(ModuleHandle module)
/// Original name: Delay
/// Value range: 8 to 1000
///
- public int GetDelay() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetDelay() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Delay
/// Value range: 8 to 1000
///
- public void SetDelay(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetDelay(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 256
///
- public int GetDry() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetDry() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 256
///
- public void SetDry(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetDry(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public int GetFeedback() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetFeedback() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public void SetFeedback(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetFeedback(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: LFO amp
/// Value range: 0 to 256
///
- public int GetLFOAmp() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetLFOAmp() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: LFO amp
/// Value range: 0 to 256
///
- public void SetLFOAmp(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetLFOAmp(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: LFO freq
/// Value range: 0 to 512
///
- public int GetLFOFreq() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetLFOFreq() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: LFO freq
/// Value range: 0 to 512
///
- public void SetLFOFreq(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetLFOFreq(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: LFO freq unit
/// Possible values: FiveHundredthHz, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public FlangerLFOFrequencyUnit GetLFOFreqUnit() => (FlangerLFOFrequencyUnit)Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public FlangerLFOFrequencyUnit GetLFOFreqUnit() => (FlangerLFOFrequencyUnit)ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: LFO freq unit
/// Possible values: FiveHundredthHz, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public void SetLFOFreqUnit(FlangerLFOFrequencyUnit value) => Module.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
+ public void SetLFOFreqUnit(FlangerLFOFrequencyUnit value) => ModuleHandle.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
///
/// Original name: LFO waveform
/// Possible values: Hsin, Sin
///
- public FlangerLFOWaveform GetLFOWaveform() => (FlangerLFOWaveform)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public FlangerLFOWaveform GetLFOWaveform() => (FlangerLFOWaveform)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: LFO waveform
/// Possible values: Hsin, Sin
///
- public void SetLFOWaveform(FlangerLFOWaveform value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetLFOWaveform(FlangerLFOWaveform value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 256
///
- public int GetResponse() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetResponse() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 256
///
- public void SetResponse(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetResponse(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Set LFO phase
/// Value range: 0 to 256
///
- public int GetSetLFOPhase() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetSetLFOPhase() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Set LFO phase
/// Value range: 0 to 256
///
- public void SetSetLFOPhase(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetSetLFOPhase(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 256
///
- public int GetWet() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetWet() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 256
///
- public void SetWet(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetWet(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct FMModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public FMModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -3031,216 +3031,216 @@ public FMModuleHandle(ModuleHandle module)
/// Original name: C.Attack
/// Value range: 0 to 512
///
- public int GetCAttack() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetCAttack() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: C.Attack
/// Value range: 0 to 512
///
- public void SetCAttack(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetCAttack(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: C.Decay
/// Value range: 0 to 512
///
- public int GetCDecay() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetCDecay() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: C.Decay
/// Value range: 0 to 512
///
- public void SetCDecay(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetCDecay(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: C.Freq ratio
/// Value range: 0 to 16
///
- public int GetCFreqRatio() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetCFreqRatio() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: C.Freq ratio
/// Value range: 0 to 16
///
- public void SetCFreqRatio(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetCFreqRatio(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: C.Release
/// Value range: 0 to 512
///
- public int GetCRelease() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetCRelease() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: C.Release
/// Value range: 0 to 512
///
- public void SetCRelease(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetCRelease(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: C.Sustain
/// Value range: 0 to 256
///
- public int GetCSustain() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetCSustain() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: C.Sustain
/// Value range: 0 to 256
///
- public void SetCSustain(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetCSustain(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: C.Volume
/// Value range: 0 to 256
///
- public int GetCVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetCVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: C.Volume
/// Value range: 0 to 256
///
- public void SetCVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetCVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: M.Attack
/// Value range: 0 to 512
///
- public int GetMAttack() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetMAttack() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: M.Attack
/// Value range: 0 to 512
///
- public void SetMAttack(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetMAttack(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: M.Decay
/// Value range: 0 to 512
///
- public int GetMDecay() => Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public int GetMDecay() => ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: M.Decay
/// Value range: 0 to 512
///
- public void SetMDecay(int value) => Module.SetControllerValue(11, value, ValueScalingType.Displayed);
+ public void SetMDecay(int value) => ModuleHandle.SetControllerValue(11, value, ValueScalingType.Displayed);
///
/// Original name: M.Freq ratio
/// Value range: 0 to 16
///
- public int GetMFreqRatio() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetMFreqRatio() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: M.Freq ratio
/// Value range: 0 to 16
///
- public void SetMFreqRatio(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetMFreqRatio(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public Quality GetMode() => (Quality)Module.GetControllerValue(16, ValueScalingType.Displayed);
+ public Quality GetMode() => (Quality)ModuleHandle.GetControllerValue(16, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public void SetMode(Quality value) => Module.SetControllerValue(16, (int)value, ValueScalingType.Displayed);
+ public void SetMode(Quality value) => ModuleHandle.SetControllerValue(16, (int)value, ValueScalingType.Displayed);
///
/// Original name: M.Release
/// Value range: 0 to 512
///
- public int GetMRelease() => Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public int GetMRelease() => ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: M.Release
/// Value range: 0 to 512
///
- public void SetMRelease(int value) => Module.SetControllerValue(13, value, ValueScalingType.Displayed);
+ public void SetMRelease(int value) => ModuleHandle.SetControllerValue(13, value, ValueScalingType.Displayed);
///
/// Original name: M.Scaling per key
/// Value range: 0 to 4
///
- public int GetMScalingPerKey() => Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public int GetMScalingPerKey() => ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: M.Scaling per key
/// Value range: 0 to 4
///
- public void SetMScalingPerKey(int value) => Module.SetControllerValue(14, value, ValueScalingType.Displayed);
+ public void SetMScalingPerKey(int value) => ModuleHandle.SetControllerValue(14, value, ValueScalingType.Displayed);
///
/// Original name: M.Self-modulation
/// Value range: 0 to 256
///
- public int GetMSelfModulation() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetMSelfModulation() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: M.Self-modulation
/// Value range: 0 to 256
///
- public void SetMSelfModulation(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetMSelfModulation(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: M.Sustain
/// Value range: 0 to 256
///
- public int GetMSustain() => Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public int GetMSustain() => ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: M.Sustain
/// Value range: 0 to 256
///
- public void SetMSustain(int value) => Module.SetControllerValue(12, value, ValueScalingType.Displayed);
+ public void SetMSustain(int value) => ModuleHandle.SetControllerValue(12, value, ValueScalingType.Displayed);
///
/// Original name: M.Volume
/// Value range: 0 to 256
///
- public int GetMVolume() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetMVolume() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: M.Volume
/// Value range: 0 to 256
///
- public void SetMVolume(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetMVolume(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 16
///
- public int GetPolyphony() => Module.GetControllerValue(15, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(15, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 16
///
- public void SetPolyphony(int value) => Module.SetControllerValue(15, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(15, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct FMXModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public FMXModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -3255,7 +3255,7 @@ public int GetVolume(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(9 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(9 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3267,7 +3267,7 @@ public void SetVolume(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(9 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(9 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3279,7 +3279,7 @@ public int GetAttack(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(14 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(14 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3291,7 +3291,7 @@ public void SetAttack(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(14 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(14 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3303,7 +3303,7 @@ public int GetDecay(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(19 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(19 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3315,7 +3315,7 @@ public void SetDecay(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(19 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(19 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3327,7 +3327,7 @@ public int GetSustainLevel(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(24 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(24 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3339,7 +3339,7 @@ public void SetSustainLevel(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(24 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(24 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3351,7 +3351,7 @@ public int GetRelease(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(29 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(29 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3363,7 +3363,7 @@ public void SetRelease(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(29 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(29 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3375,7 +3375,7 @@ public ADSRCurveType GetAttackCurve(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return (ADSRCurveType)Module.GetControllerValue(34 + index - 1, ValueScalingType.Displayed);
+ return (ADSRCurveType)ModuleHandle.GetControllerValue(34 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3387,7 +3387,7 @@ public void SetAttackCurve(int index, ADSRCurveType value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(34 + index - 1, (int)value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(34 + index - 1, (int)value, ValueScalingType.Displayed);
}
///
@@ -3399,7 +3399,7 @@ public ADSRCurveType GetDecayCurve(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return (ADSRCurveType)Module.GetControllerValue(39 + index - 1, ValueScalingType.Displayed);
+ return (ADSRCurveType)ModuleHandle.GetControllerValue(39 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3411,7 +3411,7 @@ public void SetDecayCurve(int index, ADSRCurveType value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(39 + index - 1, (int)value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(39 + index - 1, (int)value, ValueScalingType.Displayed);
}
///
@@ -3423,7 +3423,7 @@ public ADSRCurveType GetReleaseCurve(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return (ADSRCurveType)Module.GetControllerValue(44 + index - 1, ValueScalingType.Displayed);
+ return (ADSRCurveType)ModuleHandle.GetControllerValue(44 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3435,7 +3435,7 @@ public void SetReleaseCurve(int index, ADSRCurveType value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(44 + index - 1, (int)value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(44 + index - 1, (int)value, ValueScalingType.Displayed);
}
///
@@ -3447,7 +3447,7 @@ public int GetSustain(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(24 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(24 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3459,7 +3459,7 @@ public void SetSustain(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(24 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(24 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3471,7 +3471,7 @@ public Toggle GetSustainPedal(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return (Toggle)Module.GetControllerValue(54 + index - 1, ValueScalingType.Displayed);
+ return (Toggle)ModuleHandle.GetControllerValue(54 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3483,7 +3483,7 @@ public void SetSustainPedal(int index, Toggle value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(54 + index - 1, (int)value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(54 + index - 1, (int)value, ValueScalingType.Displayed);
}
///
@@ -3495,7 +3495,7 @@ public int GetEnvelopeScalingPerKey(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(59 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(59 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3507,7 +3507,7 @@ public void SetEnvelopeScalingPerKey(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(59 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(59 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3519,7 +3519,7 @@ public int GetVolumeScalingPerKey(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(64 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(64 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3531,7 +3531,7 @@ public void SetVolumeScalingPerKey(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(64 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(64 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3543,7 +3543,7 @@ public int GetVelocitySensitivity(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(69 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(69 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3555,7 +3555,7 @@ public void SetVelocitySensitivity(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(69 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(69 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3567,7 +3567,7 @@ public FMXWaveform GetWaveform(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return (FMXWaveform)Module.GetControllerValue(74 + index - 1, ValueScalingType.Displayed);
+ return (FMXWaveform)ModuleHandle.GetControllerValue(74 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3579,7 +3579,7 @@ public void SetWaveform(int index, FMXWaveform value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(74 + index - 1, (int)value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(74 + index - 1, (int)value, ValueScalingType.Displayed);
}
///
@@ -3591,7 +3591,7 @@ public int GetNoise(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(79 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(79 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3603,7 +3603,7 @@ public void SetNoise(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(79 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(79 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3615,7 +3615,7 @@ public int GetPhase(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(84 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(84 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3627,7 +3627,7 @@ public void SetPhase(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(84 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(84 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3639,7 +3639,7 @@ public int GetFreqMultiply(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(89 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(89 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3651,7 +3651,7 @@ public void SetFreqMultiply(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(89 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(89 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3663,7 +3663,7 @@ public int GetConstantPitch(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(94 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(94 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3675,7 +3675,7 @@ public void SetConstantPitch(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(94 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(94 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3687,7 +3687,7 @@ public int GetSelfModulation(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(99 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(99 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3699,7 +3699,7 @@ public void SetSelfModulation(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(99 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(99 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3711,7 +3711,7 @@ public int GetFeedback(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return Module.GetControllerValue(104 + index - 1, ValueScalingType.Displayed);
+ return ModuleHandle.GetControllerValue(104 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3723,7 +3723,7 @@ public void SetFeedback(int index, int value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(104 + index - 1, value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(104 + index - 1, value, ValueScalingType.Displayed);
}
///
@@ -3735,7 +3735,7 @@ public FMXModulationType GetModulationType(int index)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- return (FMXModulationType)Module.GetControllerValue(109 + index - 1, ValueScalingType.Displayed);
+ return (FMXModulationType)ModuleHandle.GetControllerValue(109 + index - 1, ValueScalingType.Displayed);
}
///
@@ -3747,7 +3747,7 @@ public void SetModulationType(int index, FMXModulationType value)
if (index < 1 || index > 5)
throw new System.ArgumentOutOfRangeException(nameof(index));
- Module.SetControllerValue(109 + index - 1, (int)value, ValueScalingType.Displayed);
+ ModuleHandle.SetControllerValue(109 + index - 1, (int)value, ValueScalingType.Displayed);
}
#endregion module type-specific methods
@@ -3759,1429 +3759,1429 @@ public void SetModulationType(int index, FMXModulationType value)
/// Original name: ADSR smooth transitions
/// Possible values: Off, RestartAndVolumeChange, RestartAndVolumeChangeSmooth, VolumeChange
///
- public ADSRSmoothTransitions GetADSRSmoothTransitions() => (ADSRSmoothTransitions)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public ADSRSmoothTransitions GetADSRSmoothTransitions() => (ADSRSmoothTransitions)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: ADSR smooth transitions
/// Possible values: Off, RestartAndVolumeChange, RestartAndVolumeChangeSmooth, VolumeChange
///
- public void SetADSRSmoothTransitions(ADSRSmoothTransitions value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetADSRSmoothTransitions(ADSRSmoothTransitions value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: 1 Attack
/// Value range: 0 to 10000
///
- public int GetAttack1() => Module.GetControllerValue(14, ValueScalingType.Displayed);
+ public int GetAttack1() => ModuleHandle.GetControllerValue(14, ValueScalingType.Displayed);
///
/// Original name: 1 Attack
/// Value range: 0 to 10000
///
- public void SetAttack1(int value) => Module.SetControllerValue(14, value, ValueScalingType.Displayed);
+ public void SetAttack1(int value) => ModuleHandle.SetControllerValue(14, value, ValueScalingType.Displayed);
///
/// Original name: 2 Attack
/// Value range: 0 to 10000
///
- public int GetAttack2() => Module.GetControllerValue(15, ValueScalingType.Displayed);
+ public int GetAttack2() => ModuleHandle.GetControllerValue(15, ValueScalingType.Displayed);
///
/// Original name: 2 Attack
/// Value range: 0 to 10000
///
- public void SetAttack2(int value) => Module.SetControllerValue(15, value, ValueScalingType.Displayed);
+ public void SetAttack2(int value) => ModuleHandle.SetControllerValue(15, value, ValueScalingType.Displayed);
///
/// Original name: 3 Attack
/// Value range: 0 to 10000
///
- public int GetAttack3() => Module.GetControllerValue(16, ValueScalingType.Displayed);
+ public int GetAttack3() => ModuleHandle.GetControllerValue(16, ValueScalingType.Displayed);
///
/// Original name: 3 Attack
/// Value range: 0 to 10000
///
- public void SetAttack3(int value) => Module.SetControllerValue(16, value, ValueScalingType.Displayed);
+ public void SetAttack3(int value) => ModuleHandle.SetControllerValue(16, value, ValueScalingType.Displayed);
///
/// Original name: 4 Attack
/// Value range: 0 to 10000
///
- public int GetAttack4() => Module.GetControllerValue(17, ValueScalingType.Displayed);
+ public int GetAttack4() => ModuleHandle.GetControllerValue(17, ValueScalingType.Displayed);
///
/// Original name: 4 Attack
/// Value range: 0 to 10000
///
- public void SetAttack4(int value) => Module.SetControllerValue(17, value, ValueScalingType.Displayed);
+ public void SetAttack4(int value) => ModuleHandle.SetControllerValue(17, value, ValueScalingType.Displayed);
///
/// Original name: 5 Attack
/// Value range: 0 to 10000
///
- public int GetAttack5() => Module.GetControllerValue(18, ValueScalingType.Displayed);
+ public int GetAttack5() => ModuleHandle.GetControllerValue(18, ValueScalingType.Displayed);
///
/// Original name: 5 Attack
/// Value range: 0 to 10000
///
- public void SetAttack5(int value) => Module.SetControllerValue(18, value, ValueScalingType.Displayed);
+ public void SetAttack5(int value) => ModuleHandle.SetControllerValue(18, value, ValueScalingType.Displayed);
///
/// Original name: 1 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetAttackCurve1() => (ADSRCurveType)Module.GetControllerValue(34, ValueScalingType.Displayed);
+ public ADSRCurveType GetAttackCurve1() => (ADSRCurveType)ModuleHandle.GetControllerValue(34, ValueScalingType.Displayed);
///
/// Original name: 1 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetAttackCurve1(ADSRCurveType value) => Module.SetControllerValue(34, (int)value, ValueScalingType.Displayed);
+ public void SetAttackCurve1(ADSRCurveType value) => ModuleHandle.SetControllerValue(34, (int)value, ValueScalingType.Displayed);
///
/// Original name: 2 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetAttackCurve2() => (ADSRCurveType)Module.GetControllerValue(35, ValueScalingType.Displayed);
+ public ADSRCurveType GetAttackCurve2() => (ADSRCurveType)ModuleHandle.GetControllerValue(35, ValueScalingType.Displayed);
///
/// Original name: 2 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetAttackCurve2(ADSRCurveType value) => Module.SetControllerValue(35, (int)value, ValueScalingType.Displayed);
+ public void SetAttackCurve2(ADSRCurveType value) => ModuleHandle.SetControllerValue(35, (int)value, ValueScalingType.Displayed);
///
/// Original name: 3 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetAttackCurve3() => (ADSRCurveType)Module.GetControllerValue(36, ValueScalingType.Displayed);
+ public ADSRCurveType GetAttackCurve3() => (ADSRCurveType)ModuleHandle.GetControllerValue(36, ValueScalingType.Displayed);
///
/// Original name: 3 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetAttackCurve3(ADSRCurveType value) => Module.SetControllerValue(36, (int)value, ValueScalingType.Displayed);
+ public void SetAttackCurve3(ADSRCurveType value) => ModuleHandle.SetControllerValue(36, (int)value, ValueScalingType.Displayed);
///
/// Original name: 4 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetAttackCurve4() => (ADSRCurveType)Module.GetControllerValue(37, ValueScalingType.Displayed);
+ public ADSRCurveType GetAttackCurve4() => (ADSRCurveType)ModuleHandle.GetControllerValue(37, ValueScalingType.Displayed);
///
/// Original name: 4 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetAttackCurve4(ADSRCurveType value) => Module.SetControllerValue(37, (int)value, ValueScalingType.Displayed);
+ public void SetAttackCurve4(ADSRCurveType value) => ModuleHandle.SetControllerValue(37, (int)value, ValueScalingType.Displayed);
///
/// Original name: 5 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetAttackCurve5() => (ADSRCurveType)Module.GetControllerValue(38, ValueScalingType.Displayed);
+ public ADSRCurveType GetAttackCurve5() => (ADSRCurveType)ModuleHandle.GetControllerValue(38, ValueScalingType.Displayed);
///
/// Original name: 5 Attack curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetAttackCurve5(ADSRCurveType value) => Module.SetControllerValue(38, (int)value, ValueScalingType.Displayed);
+ public void SetAttackCurve5(ADSRCurveType value) => ModuleHandle.SetControllerValue(38, (int)value, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public ChannelsInverted GetChannels() => (ChannelsInverted)Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public ChannelsInverted GetChannels() => (ChannelsInverted)ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public void SetChannels(ChannelsInverted value) => Module.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(ChannelsInverted value) => ModuleHandle.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
///
/// Original name: 1 Constant pitch
/// Value range: -8192 to 8192
///
- public int GetConstantPitch1() => Module.GetControllerValue(94, ValueScalingType.Displayed);
+ public int GetConstantPitch1() => ModuleHandle.GetControllerValue(94, ValueScalingType.Displayed);
///
/// Original name: 1 Constant pitch
/// Value range: -8192 to 8192
///
- public void SetConstantPitch1(int value) => Module.SetControllerValue(94, value, ValueScalingType.Displayed);
+ public void SetConstantPitch1(int value) => ModuleHandle.SetControllerValue(94, value, ValueScalingType.Displayed);
///
/// Original name: 2 Constant pitch
/// Value range: -8192 to 8192
///
- public int GetConstantPitch2() => Module.GetControllerValue(95, ValueScalingType.Displayed);
+ public int GetConstantPitch2() => ModuleHandle.GetControllerValue(95, ValueScalingType.Displayed);
///
/// Original name: 2 Constant pitch
/// Value range: -8192 to 8192
///
- public void SetConstantPitch2(int value) => Module.SetControllerValue(95, value, ValueScalingType.Displayed);
+ public void SetConstantPitch2(int value) => ModuleHandle.SetControllerValue(95, value, ValueScalingType.Displayed);
///
/// Original name: 3 Constant pitch
/// Value range: -8192 to 8192
///
- public int GetConstantPitch3() => Module.GetControllerValue(96, ValueScalingType.Displayed);
+ public int GetConstantPitch3() => ModuleHandle.GetControllerValue(96, ValueScalingType.Displayed);
///
/// Original name: 3 Constant pitch
/// Value range: -8192 to 8192
///
- public void SetConstantPitch3(int value) => Module.SetControllerValue(96, value, ValueScalingType.Displayed);
+ public void SetConstantPitch3(int value) => ModuleHandle.SetControllerValue(96, value, ValueScalingType.Displayed);
///
/// Original name: 4 Constant pitch
/// Value range: -8192 to 8192
///
- public int GetConstantPitch4() => Module.GetControllerValue(97, ValueScalingType.Displayed);
+ public int GetConstantPitch4() => ModuleHandle.GetControllerValue(97, ValueScalingType.Displayed);
///
/// Original name: 4 Constant pitch
/// Value range: -8192 to 8192
///
- public void SetConstantPitch4(int value) => Module.SetControllerValue(97, value, ValueScalingType.Displayed);
+ public void SetConstantPitch4(int value) => ModuleHandle.SetControllerValue(97, value, ValueScalingType.Displayed);
///
/// Original name: 5 Constant pitch
/// Value range: -8192 to 8192
///
- public int GetConstantPitch5() => Module.GetControllerValue(98, ValueScalingType.Displayed);
+ public int GetConstantPitch5() => ModuleHandle.GetControllerValue(98, ValueScalingType.Displayed);
///
/// Original name: 5 Constant pitch
/// Value range: -8192 to 8192
///
- public void SetConstantPitch5(int value) => Module.SetControllerValue(98, value, ValueScalingType.Displayed);
+ public void SetConstantPitch5(int value) => ModuleHandle.SetControllerValue(98, value, ValueScalingType.Displayed);
///
/// Original name: 1 Decay
/// Value range: 0 to 10000
///
- public int GetDecay1() => Module.GetControllerValue(19, ValueScalingType.Displayed);
+ public int GetDecay1() => ModuleHandle.GetControllerValue(19, ValueScalingType.Displayed);
///
/// Original name: 1 Decay
/// Value range: 0 to 10000
///
- public void SetDecay1(int value) => Module.SetControllerValue(19, value, ValueScalingType.Displayed);
+ public void SetDecay1(int value) => ModuleHandle.SetControllerValue(19, value, ValueScalingType.Displayed);
///
/// Original name: 2 Decay
/// Value range: 0 to 10000
///
- public int GetDecay2() => Module.GetControllerValue(20, ValueScalingType.Displayed);
+ public int GetDecay2() => ModuleHandle.GetControllerValue(20, ValueScalingType.Displayed);
///
/// Original name: 2 Decay
/// Value range: 0 to 10000
///
- public void SetDecay2(int value) => Module.SetControllerValue(20, value, ValueScalingType.Displayed);
+ public void SetDecay2(int value) => ModuleHandle.SetControllerValue(20, value, ValueScalingType.Displayed);
///
/// Original name: 3 Decay
/// Value range: 0 to 10000
///
- public int GetDecay3() => Module.GetControllerValue(21, ValueScalingType.Displayed);
+ public int GetDecay3() => ModuleHandle.GetControllerValue(21, ValueScalingType.Displayed);
///
/// Original name: 3 Decay
/// Value range: 0 to 10000
///
- public void SetDecay3(int value) => Module.SetControllerValue(21, value, ValueScalingType.Displayed);
+ public void SetDecay3(int value) => ModuleHandle.SetControllerValue(21, value, ValueScalingType.Displayed);
///
/// Original name: 4 Decay
/// Value range: 0 to 10000
///
- public int GetDecay4() => Module.GetControllerValue(22, ValueScalingType.Displayed);
+ public int GetDecay4() => ModuleHandle.GetControllerValue(22, ValueScalingType.Displayed);
///
/// Original name: 4 Decay
/// Value range: 0 to 10000
///
- public void SetDecay4(int value) => Module.SetControllerValue(22, value, ValueScalingType.Displayed);
+ public void SetDecay4(int value) => ModuleHandle.SetControllerValue(22, value, ValueScalingType.Displayed);
///
/// Original name: 5 Decay
/// Value range: 0 to 10000
///
- public int GetDecay5() => Module.GetControllerValue(23, ValueScalingType.Displayed);
+ public int GetDecay5() => ModuleHandle.GetControllerValue(23, ValueScalingType.Displayed);
///
/// Original name: 5 Decay
/// Value range: 0 to 10000
///
- public void SetDecay5(int value) => Module.SetControllerValue(23, value, ValueScalingType.Displayed);
+ public void SetDecay5(int value) => ModuleHandle.SetControllerValue(23, value, ValueScalingType.Displayed);
///
/// Original name: 1 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetDecayCurve1() => (ADSRCurveType)Module.GetControllerValue(39, ValueScalingType.Displayed);
+ public ADSRCurveType GetDecayCurve1() => (ADSRCurveType)ModuleHandle.GetControllerValue(39, ValueScalingType.Displayed);
///
/// Original name: 1 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetDecayCurve1(ADSRCurveType value) => Module.SetControllerValue(39, (int)value, ValueScalingType.Displayed);
+ public void SetDecayCurve1(ADSRCurveType value) => ModuleHandle.SetControllerValue(39, (int)value, ValueScalingType.Displayed);
///
/// Original name: 2 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetDecayCurve2() => (ADSRCurveType)Module.GetControllerValue(40, ValueScalingType.Displayed);
+ public ADSRCurveType GetDecayCurve2() => (ADSRCurveType)ModuleHandle.GetControllerValue(40, ValueScalingType.Displayed);
///
/// Original name: 2 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetDecayCurve2(ADSRCurveType value) => Module.SetControllerValue(40, (int)value, ValueScalingType.Displayed);
+ public void SetDecayCurve2(ADSRCurveType value) => ModuleHandle.SetControllerValue(40, (int)value, ValueScalingType.Displayed);
///
/// Original name: 3 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetDecayCurve3() => (ADSRCurveType)Module.GetControllerValue(41, ValueScalingType.Displayed);
+ public ADSRCurveType GetDecayCurve3() => (ADSRCurveType)ModuleHandle.GetControllerValue(41, ValueScalingType.Displayed);
///
/// Original name: 3 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetDecayCurve3(ADSRCurveType value) => Module.SetControllerValue(41, (int)value, ValueScalingType.Displayed);
+ public void SetDecayCurve3(ADSRCurveType value) => ModuleHandle.SetControllerValue(41, (int)value, ValueScalingType.Displayed);
///
/// Original name: 4 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetDecayCurve4() => (ADSRCurveType)Module.GetControllerValue(42, ValueScalingType.Displayed);
+ public ADSRCurveType GetDecayCurve4() => (ADSRCurveType)ModuleHandle.GetControllerValue(42, ValueScalingType.Displayed);
///
/// Original name: 4 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetDecayCurve4(ADSRCurveType value) => Module.SetControllerValue(42, (int)value, ValueScalingType.Displayed);
+ public void SetDecayCurve4(ADSRCurveType value) => ModuleHandle.SetControllerValue(42, (int)value, ValueScalingType.Displayed);
///
/// Original name: 5 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetDecayCurve5() => (ADSRCurveType)Module.GetControllerValue(43, ValueScalingType.Displayed);
+ public ADSRCurveType GetDecayCurve5() => (ADSRCurveType)ModuleHandle.GetControllerValue(43, ValueScalingType.Displayed);
///
/// Original name: 5 Decay curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetDecayCurve5(ADSRCurveType value) => Module.SetControllerValue(43, (int)value, ValueScalingType.Displayed);
+ public void SetDecayCurve5(ADSRCurveType value) => ModuleHandle.SetControllerValue(43, (int)value, ValueScalingType.Displayed);
///
/// Original name: Envelope gain
/// Value range: 0 to 8000
///
- public int GetEnvelopeGain() => Module.GetControllerValue(118, ValueScalingType.Displayed);
+ public int GetEnvelopeGain() => ModuleHandle.GetControllerValue(118, ValueScalingType.Displayed);
///
/// Original name: Envelope gain
/// Value range: 0 to 8000
///
- public void SetEnvelopeGain(int value) => Module.SetControllerValue(118, value, ValueScalingType.Displayed);
+ public void SetEnvelopeGain(int value) => ModuleHandle.SetControllerValue(118, value, ValueScalingType.Displayed);
///
/// Original name: 1 Envelope scaling per key
/// Value range: -128 to 128
///
- public int GetEnvelopeScalingPerKey1() => Module.GetControllerValue(59, ValueScalingType.Displayed);
+ public int GetEnvelopeScalingPerKey1() => ModuleHandle.GetControllerValue(59, ValueScalingType.Displayed);
///
/// Original name: 1 Envelope scaling per key
/// Value range: -128 to 128
///
- public void SetEnvelopeScalingPerKey1(int value) => Module.SetControllerValue(59, value, ValueScalingType.Displayed);
+ public void SetEnvelopeScalingPerKey1(int value) => ModuleHandle.SetControllerValue(59, value, ValueScalingType.Displayed);
///
/// Original name: 2 Envelope scaling per key
/// Value range: -128 to 128
///
- public int GetEnvelopeScalingPerKey2() => Module.GetControllerValue(60, ValueScalingType.Displayed);
+ public int GetEnvelopeScalingPerKey2() => ModuleHandle.GetControllerValue(60, ValueScalingType.Displayed);
///
/// Original name: 2 Envelope scaling per key
/// Value range: -128 to 128
///
- public void SetEnvelopeScalingPerKey2(int value) => Module.SetControllerValue(60, value, ValueScalingType.Displayed);
+ public void SetEnvelopeScalingPerKey2(int value) => ModuleHandle.SetControllerValue(60, value, ValueScalingType.Displayed);
///
/// Original name: 3 Envelope scaling per key
/// Value range: -128 to 128
///
- public int GetEnvelopeScalingPerKey3() => Module.GetControllerValue(61, ValueScalingType.Displayed);
+ public int GetEnvelopeScalingPerKey3() => ModuleHandle.GetControllerValue(61, ValueScalingType.Displayed);
///
/// Original name: 3 Envelope scaling per key
/// Value range: -128 to 128
///
- public void SetEnvelopeScalingPerKey3(int value) => Module.SetControllerValue(61, value, ValueScalingType.Displayed);
+ public void SetEnvelopeScalingPerKey3(int value) => ModuleHandle.SetControllerValue(61, value, ValueScalingType.Displayed);
///
/// Original name: 4 Envelope scaling per key
/// Value range: -128 to 128
///
- public int GetEnvelopeScalingPerKey4() => Module.GetControllerValue(62, ValueScalingType.Displayed);
+ public int GetEnvelopeScalingPerKey4() => ModuleHandle.GetControllerValue(62, ValueScalingType.Displayed);
///
/// Original name: 4 Envelope scaling per key
/// Value range: -128 to 128
///
- public void SetEnvelopeScalingPerKey4(int value) => Module.SetControllerValue(62, value, ValueScalingType.Displayed);
+ public void SetEnvelopeScalingPerKey4(int value) => ModuleHandle.SetControllerValue(62, value, ValueScalingType.Displayed);
///
/// Original name: 5 Envelope scaling per key
/// Value range: -128 to 128
///
- public int GetEnvelopeScalingPerKey5() => Module.GetControllerValue(63, ValueScalingType.Displayed);
+ public int GetEnvelopeScalingPerKey5() => ModuleHandle.GetControllerValue(63, ValueScalingType.Displayed);
///
/// Original name: 5 Envelope scaling per key
/// Value range: -128 to 128
///
- public void SetEnvelopeScalingPerKey5(int value) => Module.SetControllerValue(63, value, ValueScalingType.Displayed);
+ public void SetEnvelopeScalingPerKey5(int value) => ModuleHandle.SetControllerValue(63, value, ValueScalingType.Displayed);
///
/// Original name: 1 Feedback
/// Value range: 0 to 32768
///
- public int GetFeedback1() => Module.GetControllerValue(104, ValueScalingType.Displayed);
+ public int GetFeedback1() => ModuleHandle.GetControllerValue(104, ValueScalingType.Displayed);
///
/// Original name: 1 Feedback
/// Value range: 0 to 32768
///
- public void SetFeedback1(int value) => Module.SetControllerValue(104, value, ValueScalingType.Displayed);
+ public void SetFeedback1(int value) => ModuleHandle.SetControllerValue(104, value, ValueScalingType.Displayed);
///
/// Original name: 2 Feedback
/// Value range: 0 to 32768
///
- public int GetFeedback2() => Module.GetControllerValue(105, ValueScalingType.Displayed);
+ public int GetFeedback2() => ModuleHandle.GetControllerValue(105, ValueScalingType.Displayed);
///
/// Original name: 2 Feedback
/// Value range: 0 to 32768
///
- public void SetFeedback2(int value) => Module.SetControllerValue(105, value, ValueScalingType.Displayed);
+ public void SetFeedback2(int value) => ModuleHandle.SetControllerValue(105, value, ValueScalingType.Displayed);
///
/// Original name: 3 Feedback
/// Value range: 0 to 32768
///
- public int GetFeedback3() => Module.GetControllerValue(106, ValueScalingType.Displayed);
+ public int GetFeedback3() => ModuleHandle.GetControllerValue(106, ValueScalingType.Displayed);
///
/// Original name: 3 Feedback
/// Value range: 0 to 32768
///
- public void SetFeedback3(int value) => Module.SetControllerValue(106, value, ValueScalingType.Displayed);
+ public void SetFeedback3(int value) => ModuleHandle.SetControllerValue(106, value, ValueScalingType.Displayed);
///
/// Original name: 4 Feedback
/// Value range: 0 to 32768
///
- public int GetFeedback4() => Module.GetControllerValue(107, ValueScalingType.Displayed);
+ public int GetFeedback4() => ModuleHandle.GetControllerValue(107, ValueScalingType.Displayed);
///
/// Original name: 4 Feedback
/// Value range: 0 to 32768
///
- public void SetFeedback4(int value) => Module.SetControllerValue(107, value, ValueScalingType.Displayed);
+ public void SetFeedback4(int value) => ModuleHandle.SetControllerValue(107, value, ValueScalingType.Displayed);
///
/// Original name: 5 Feedback
/// Value range: 0 to 32768
///
- public int GetFeedback5() => Module.GetControllerValue(108, ValueScalingType.Displayed);
+ public int GetFeedback5() => ModuleHandle.GetControllerValue(108, ValueScalingType.Displayed);
///
/// Original name: 5 Feedback
/// Value range: 0 to 32768
///
- public void SetFeedback5(int value) => Module.SetControllerValue(108, value, ValueScalingType.Displayed);
+ public void SetFeedback5(int value) => ModuleHandle.SetControllerValue(108, value, ValueScalingType.Displayed);
///
/// Original name: 1 Freq multiply
/// Value range: 0 to 32000
///
- public int GetFreqMultiply1() => Module.GetControllerValue(89, ValueScalingType.Displayed);
+ public int GetFreqMultiply1() => ModuleHandle.GetControllerValue(89, ValueScalingType.Displayed);
///
/// Original name: 1 Freq multiply
/// Value range: 0 to 32000
///
- public void SetFreqMultiply1(int value) => Module.SetControllerValue(89, value, ValueScalingType.Displayed);
+ public void SetFreqMultiply1(int value) => ModuleHandle.SetControllerValue(89, value, ValueScalingType.Displayed);
///
/// Original name: 2 Freq multiply
/// Value range: 0 to 32000
///
- public int GetFreqMultiply2() => Module.GetControllerValue(90, ValueScalingType.Displayed);
+ public int GetFreqMultiply2() => ModuleHandle.GetControllerValue(90, ValueScalingType.Displayed);
///
/// Original name: 2 Freq multiply
/// Value range: 0 to 32000
///
- public void SetFreqMultiply2(int value) => Module.SetControllerValue(90, value, ValueScalingType.Displayed);
+ public void SetFreqMultiply2(int value) => ModuleHandle.SetControllerValue(90, value, ValueScalingType.Displayed);
///
/// Original name: 3 Freq multiply
/// Value range: 0 to 32000
///
- public int GetFreqMultiply3() => Module.GetControllerValue(91, ValueScalingType.Displayed);
+ public int GetFreqMultiply3() => ModuleHandle.GetControllerValue(91, ValueScalingType.Displayed);
///
/// Original name: 3 Freq multiply
/// Value range: 0 to 32000
///
- public void SetFreqMultiply3(int value) => Module.SetControllerValue(91, value, ValueScalingType.Displayed);
+ public void SetFreqMultiply3(int value) => ModuleHandle.SetControllerValue(91, value, ValueScalingType.Displayed);
///
/// Original name: 4 Freq multiply
/// Value range: 0 to 32000
///
- public int GetFreqMultiply4() => Module.GetControllerValue(92, ValueScalingType.Displayed);
+ public int GetFreqMultiply4() => ModuleHandle.GetControllerValue(92, ValueScalingType.Displayed);
///
/// Original name: 4 Freq multiply
/// Value range: 0 to 32000
///
- public void SetFreqMultiply4(int value) => Module.SetControllerValue(92, value, ValueScalingType.Displayed);
+ public void SetFreqMultiply4(int value) => ModuleHandle.SetControllerValue(92, value, ValueScalingType.Displayed);
///
/// Original name: 5 Freq multiply
/// Value range: 0 to 32000
///
- public int GetFreqMultiply5() => Module.GetControllerValue(93, ValueScalingType.Displayed);
+ public int GetFreqMultiply5() => ModuleHandle.GetControllerValue(93, ValueScalingType.Displayed);
///
/// Original name: 5 Freq multiply
/// Value range: 0 to 32000
///
- public void SetFreqMultiply5(int value) => Module.SetControllerValue(93, value, ValueScalingType.Displayed);
+ public void SetFreqMultiply5(int value) => ModuleHandle.SetControllerValue(93, value, ValueScalingType.Displayed);
///
/// Original name: Input -> Custom waveform
/// Possible values: Off, SingleCycle, Continuous
///
- public FMXCustomWaveform GetInputCustomWaveform() => (FMXCustomWaveform)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public FMXCustomWaveform GetInputCustomWaveform() => (FMXCustomWaveform)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Input -> Custom waveform
/// Possible values: Off, SingleCycle, Continuous
///
- public void SetInputCustomWaveform(FMXCustomWaveform value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetInputCustomWaveform(FMXCustomWaveform value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Input -> Operator #
/// Value range: 0 to 5
///
- public int GetInputOperatorNum() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetInputOperatorNum() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Input -> Operator #
/// Value range: 0 to 5
///
- public void SetInputOperatorNum(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetInputOperatorNum(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: 1 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public FMXModulationType GetModulationType1() => (FMXModulationType)Module.GetControllerValue(109, ValueScalingType.Displayed);
+ public FMXModulationType GetModulationType1() => (FMXModulationType)ModuleHandle.GetControllerValue(109, ValueScalingType.Displayed);
///
/// Original name: 1 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public void SetModulationType1(FMXModulationType value) => Module.SetControllerValue(109, (int)value, ValueScalingType.Displayed);
+ public void SetModulationType1(FMXModulationType value) => ModuleHandle.SetControllerValue(109, (int)value, ValueScalingType.Displayed);
///
/// Original name: 2 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public FMXModulationType GetModulationType2() => (FMXModulationType)Module.GetControllerValue(110, ValueScalingType.Displayed);
+ public FMXModulationType GetModulationType2() => (FMXModulationType)ModuleHandle.GetControllerValue(110, ValueScalingType.Displayed);
///
/// Original name: 2 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public void SetModulationType2(FMXModulationType value) => Module.SetControllerValue(110, (int)value, ValueScalingType.Displayed);
+ public void SetModulationType2(FMXModulationType value) => ModuleHandle.SetControllerValue(110, (int)value, ValueScalingType.Displayed);
///
/// Original name: 3 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public FMXModulationType GetModulationType3() => (FMXModulationType)Module.GetControllerValue(111, ValueScalingType.Displayed);
+ public FMXModulationType GetModulationType3() => (FMXModulationType)ModuleHandle.GetControllerValue(111, ValueScalingType.Displayed);
///
/// Original name: 3 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public void SetModulationType3(FMXModulationType value) => Module.SetControllerValue(111, (int)value, ValueScalingType.Displayed);
+ public void SetModulationType3(FMXModulationType value) => ModuleHandle.SetControllerValue(111, (int)value, ValueScalingType.Displayed);
///
/// Original name: 4 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public FMXModulationType GetModulationType4() => (FMXModulationType)Module.GetControllerValue(112, ValueScalingType.Displayed);
+ public FMXModulationType GetModulationType4() => (FMXModulationType)ModuleHandle.GetControllerValue(112, ValueScalingType.Displayed);
///
/// Original name: 4 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public void SetModulationType4(FMXModulationType value) => Module.SetControllerValue(112, (int)value, ValueScalingType.Displayed);
+ public void SetModulationType4(FMXModulationType value) => ModuleHandle.SetControllerValue(112, (int)value, ValueScalingType.Displayed);
///
/// Original name: 5 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public FMXModulationType GetModulationType5() => (FMXModulationType)Module.GetControllerValue(113, ValueScalingType.Displayed);
+ public FMXModulationType GetModulationType5() => (FMXModulationType)ModuleHandle.GetControllerValue(113, ValueScalingType.Displayed);
///
/// Original name: 5 Modulation type
/// Possible values: Phase, Frequency, Amplitude, Add, Sub, Min, Max, And, Xor, PhasePlus
///
- public void SetModulationType5(FMXModulationType value) => Module.SetControllerValue(113, (int)value, ValueScalingType.Displayed);
+ public void SetModulationType5(FMXModulationType value) => ModuleHandle.SetControllerValue(113, (int)value, ValueScalingType.Displayed);
///
/// Original name: 1 Noise
/// Value range: 0 to 32768
///
- public int GetNoise1() => Module.GetControllerValue(79, ValueScalingType.Displayed);
+ public int GetNoise1() => ModuleHandle.GetControllerValue(79, ValueScalingType.Displayed);
///
/// Original name: 1 Noise
/// Value range: 0 to 32768
///
- public void SetNoise1(int value) => Module.SetControllerValue(79, value, ValueScalingType.Displayed);
+ public void SetNoise1(int value) => ModuleHandle.SetControllerValue(79, value, ValueScalingType.Displayed);
///
/// Original name: 2 Noise
/// Value range: 0 to 32768
///
- public int GetNoise2() => Module.GetControllerValue(80, ValueScalingType.Displayed);
+ public int GetNoise2() => ModuleHandle.GetControllerValue(80, ValueScalingType.Displayed);
///
/// Original name: 2 Noise
/// Value range: 0 to 32768
///
- public void SetNoise2(int value) => Module.SetControllerValue(80, value, ValueScalingType.Displayed);
+ public void SetNoise2(int value) => ModuleHandle.SetControllerValue(80, value, ValueScalingType.Displayed);
///
/// Original name: 3 Noise
/// Value range: 0 to 32768
///
- public int GetNoise3() => Module.GetControllerValue(81, ValueScalingType.Displayed);
+ public int GetNoise3() => ModuleHandle.GetControllerValue(81, ValueScalingType.Displayed);
///
/// Original name: 3 Noise
/// Value range: 0 to 32768
///
- public void SetNoise3(int value) => Module.SetControllerValue(81, value, ValueScalingType.Displayed);
+ public void SetNoise3(int value) => ModuleHandle.SetControllerValue(81, value, ValueScalingType.Displayed);
///
/// Original name: 4 Noise
/// Value range: 0 to 32768
///
- public int GetNoise4() => Module.GetControllerValue(82, ValueScalingType.Displayed);
+ public int GetNoise4() => ModuleHandle.GetControllerValue(82, ValueScalingType.Displayed);
///
/// Original name: 4 Noise
/// Value range: 0 to 32768
///
- public void SetNoise4(int value) => Module.SetControllerValue(82, value, ValueScalingType.Displayed);
+ public void SetNoise4(int value) => ModuleHandle.SetControllerValue(82, value, ValueScalingType.Displayed);
///
/// Original name: 5 Noise
/// Value range: 0 to 32768
///
- public int GetNoise5() => Module.GetControllerValue(83, ValueScalingType.Displayed);
+ public int GetNoise5() => ModuleHandle.GetControllerValue(83, ValueScalingType.Displayed);
///
/// Original name: 5 Noise
/// Value range: 0 to 32768
///
- public void SetNoise5(int value) => Module.SetControllerValue(83, value, ValueScalingType.Displayed);
+ public void SetNoise5(int value) => ModuleHandle.SetControllerValue(83, value, ValueScalingType.Displayed);
///
/// Original name: Noise filter (32768 - OFF)
/// Value range: 0 to 32768
///
- public int GetNoiseFilter() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetNoiseFilter() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Noise filter (32768 - OFF)
/// Value range: 0 to 32768
///
- public void SetNoiseFilter(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetNoiseFilter(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: 1 Output mode
/// Value range: 0 to 31
///
- public int GetOutputMode1() => Module.GetControllerValue(114, ValueScalingType.Displayed);
+ public int GetOutputMode1() => ModuleHandle.GetControllerValue(114, ValueScalingType.Displayed);
///
/// Original name: 1 Output mode
/// Value range: 0 to 31
///
- public void SetOutputMode1(int value) => Module.SetControllerValue(114, value, ValueScalingType.Displayed);
+ public void SetOutputMode1(int value) => ModuleHandle.SetControllerValue(114, value, ValueScalingType.Displayed);
///
/// Original name: 2 Output mode
/// Value range: 0 to 15
///
- public int GetOutputMode2() => Module.GetControllerValue(115, ValueScalingType.Displayed);
+ public int GetOutputMode2() => ModuleHandle.GetControllerValue(115, ValueScalingType.Displayed);
///
/// Original name: 2 Output mode
/// Value range: 0 to 15
///
- public void SetOutputMode2(int value) => Module.SetControllerValue(115, value, ValueScalingType.Displayed);
+ public void SetOutputMode2(int value) => ModuleHandle.SetControllerValue(115, value, ValueScalingType.Displayed);
///
/// Original name: 3 Output mode
/// Value range: 0 to 7
///
- public int GetOutputMode3() => Module.GetControllerValue(116, ValueScalingType.Displayed);
+ public int GetOutputMode3() => ModuleHandle.GetControllerValue(116, ValueScalingType.Displayed);
///
/// Original name: 3 Output mode
/// Value range: 0 to 7
///
- public void SetOutputMode3(int value) => Module.SetControllerValue(116, value, ValueScalingType.Displayed);
+ public void SetOutputMode3(int value) => ModuleHandle.SetControllerValue(116, value, ValueScalingType.Displayed);
///
/// Original name: 4 Output mode
/// Value range: 0 to 3
///
- public int GetOutputMode4() => Module.GetControllerValue(117, ValueScalingType.Displayed);
+ public int GetOutputMode4() => ModuleHandle.GetControllerValue(117, ValueScalingType.Displayed);
///
/// Original name: 4 Output mode
/// Value range: 0 to 3
///
- public void SetOutputMode4(int value) => Module.SetControllerValue(117, value, ValueScalingType.Displayed);
+ public void SetOutputMode4(int value) => ModuleHandle.SetControllerValue(117, value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: 1 Phase
/// Value range: 0 to 32768
///
- public int GetPhase1() => Module.GetControllerValue(84, ValueScalingType.Displayed);
+ public int GetPhase1() => ModuleHandle.GetControllerValue(84, ValueScalingType.Displayed);
///
/// Original name: 1 Phase
/// Value range: 0 to 32768
///
- public void SetPhase1(int value) => Module.SetControllerValue(84, value, ValueScalingType.Displayed);
+ public void SetPhase1(int value) => ModuleHandle.SetControllerValue(84, value, ValueScalingType.Displayed);
///
/// Original name: 2 Phase
/// Value range: 0 to 32768
///
- public int GetPhase2() => Module.GetControllerValue(85, ValueScalingType.Displayed);
+ public int GetPhase2() => ModuleHandle.GetControllerValue(85, ValueScalingType.Displayed);
///
/// Original name: 2 Phase
/// Value range: 0 to 32768
///
- public void SetPhase2(int value) => Module.SetControllerValue(85, value, ValueScalingType.Displayed);
+ public void SetPhase2(int value) => ModuleHandle.SetControllerValue(85, value, ValueScalingType.Displayed);
///
/// Original name: 3 Phase
/// Value range: 0 to 32768
///
- public int GetPhase3() => Module.GetControllerValue(86, ValueScalingType.Displayed);
+ public int GetPhase3() => ModuleHandle.GetControllerValue(86, ValueScalingType.Displayed);
///
/// Original name: 3 Phase
/// Value range: 0 to 32768
///
- public void SetPhase3(int value) => Module.SetControllerValue(86, value, ValueScalingType.Displayed);
+ public void SetPhase3(int value) => ModuleHandle.SetControllerValue(86, value, ValueScalingType.Displayed);
///
/// Original name: 4 Phase
/// Value range: 0 to 32768
///
- public int GetPhase4() => Module.GetControllerValue(87, ValueScalingType.Displayed);
+ public int GetPhase4() => ModuleHandle.GetControllerValue(87, ValueScalingType.Displayed);
///
/// Original name: 4 Phase
/// Value range: 0 to 32768
///
- public void SetPhase4(int value) => Module.SetControllerValue(87, value, ValueScalingType.Displayed);
+ public void SetPhase4(int value) => ModuleHandle.SetControllerValue(87, value, ValueScalingType.Displayed);
///
/// Original name: 5 Phase
/// Value range: 0 to 32768
///
- public int GetPhase5() => Module.GetControllerValue(88, ValueScalingType.Displayed);
+ public int GetPhase5() => ModuleHandle.GetControllerValue(88, ValueScalingType.Displayed);
///
/// Original name: 5 Phase
/// Value range: 0 to 32768
///
- public void SetPhase5(int value) => Module.SetControllerValue(88, value, ValueScalingType.Displayed);
+ public void SetPhase5(int value) => ModuleHandle.SetControllerValue(88, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public int GetPolyphony() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public void SetPolyphony(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: 1 Release
/// Value range: 0 to 10000
///
- public int GetRelease1() => Module.GetControllerValue(29, ValueScalingType.Displayed);
+ public int GetRelease1() => ModuleHandle.GetControllerValue(29, ValueScalingType.Displayed);
///
/// Original name: 1 Release
/// Value range: 0 to 10000
///
- public void SetRelease1(int value) => Module.SetControllerValue(29, value, ValueScalingType.Displayed);
+ public void SetRelease1(int value) => ModuleHandle.SetControllerValue(29, value, ValueScalingType.Displayed);
///
/// Original name: 2 Release
/// Value range: 0 to 10000
///
- public int GetRelease2() => Module.GetControllerValue(30, ValueScalingType.Displayed);
+ public int GetRelease2() => ModuleHandle.GetControllerValue(30, ValueScalingType.Displayed);
///
/// Original name: 2 Release
/// Value range: 0 to 10000
///
- public void SetRelease2(int value) => Module.SetControllerValue(30, value, ValueScalingType.Displayed);
+ public void SetRelease2(int value) => ModuleHandle.SetControllerValue(30, value, ValueScalingType.Displayed);
///
/// Original name: 3 Release
/// Value range: 0 to 10000
///
- public int GetRelease3() => Module.GetControllerValue(31, ValueScalingType.Displayed);
+ public int GetRelease3() => ModuleHandle.GetControllerValue(31, ValueScalingType.Displayed);
///
/// Original name: 3 Release
/// Value range: 0 to 10000
///
- public void SetRelease3(int value) => Module.SetControllerValue(31, value, ValueScalingType.Displayed);
+ public void SetRelease3(int value) => ModuleHandle.SetControllerValue(31, value, ValueScalingType.Displayed);
///
/// Original name: 4 Release
/// Value range: 0 to 10000
///
- public int GetRelease4() => Module.GetControllerValue(32, ValueScalingType.Displayed);
+ public int GetRelease4() => ModuleHandle.GetControllerValue(32, ValueScalingType.Displayed);
///
/// Original name: 4 Release
/// Value range: 0 to 10000
///
- public void SetRelease4(int value) => Module.SetControllerValue(32, value, ValueScalingType.Displayed);
+ public void SetRelease4(int value) => ModuleHandle.SetControllerValue(32, value, ValueScalingType.Displayed);
///
/// Original name: 5 Release
/// Value range: 0 to 10000
///
- public int GetRelease5() => Module.GetControllerValue(33, ValueScalingType.Displayed);
+ public int GetRelease5() => ModuleHandle.GetControllerValue(33, ValueScalingType.Displayed);
///
/// Original name: 5 Release
/// Value range: 0 to 10000
///
- public void SetRelease5(int value) => Module.SetControllerValue(33, value, ValueScalingType.Displayed);
+ public void SetRelease5(int value) => ModuleHandle.SetControllerValue(33, value, ValueScalingType.Displayed);
///
/// Original name: 1 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetReleaseCurve1() => (ADSRCurveType)Module.GetControllerValue(44, ValueScalingType.Displayed);
+ public ADSRCurveType GetReleaseCurve1() => (ADSRCurveType)ModuleHandle.GetControllerValue(44, ValueScalingType.Displayed);
///
/// Original name: 1 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetReleaseCurve1(ADSRCurveType value) => Module.SetControllerValue(44, (int)value, ValueScalingType.Displayed);
+ public void SetReleaseCurve1(ADSRCurveType value) => ModuleHandle.SetControllerValue(44, (int)value, ValueScalingType.Displayed);
///
/// Original name: 2 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetReleaseCurve2() => (ADSRCurveType)Module.GetControllerValue(45, ValueScalingType.Displayed);
+ public ADSRCurveType GetReleaseCurve2() => (ADSRCurveType)ModuleHandle.GetControllerValue(45, ValueScalingType.Displayed);
///
/// Original name: 2 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetReleaseCurve2(ADSRCurveType value) => Module.SetControllerValue(45, (int)value, ValueScalingType.Displayed);
+ public void SetReleaseCurve2(ADSRCurveType value) => ModuleHandle.SetControllerValue(45, (int)value, ValueScalingType.Displayed);
///
/// Original name: 3 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetReleaseCurve3() => (ADSRCurveType)Module.GetControllerValue(46, ValueScalingType.Displayed);
+ public ADSRCurveType GetReleaseCurve3() => (ADSRCurveType)ModuleHandle.GetControllerValue(46, ValueScalingType.Displayed);
///
/// Original name: 3 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetReleaseCurve3(ADSRCurveType value) => Module.SetControllerValue(46, (int)value, ValueScalingType.Displayed);
+ public void SetReleaseCurve3(ADSRCurveType value) => ModuleHandle.SetControllerValue(46, (int)value, ValueScalingType.Displayed);
///
/// Original name: 4 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetReleaseCurve4() => (ADSRCurveType)Module.GetControllerValue(47, ValueScalingType.Displayed);
+ public ADSRCurveType GetReleaseCurve4() => (ADSRCurveType)ModuleHandle.GetControllerValue(47, ValueScalingType.Displayed);
///
/// Original name: 4 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetReleaseCurve4(ADSRCurveType value) => Module.SetControllerValue(47, (int)value, ValueScalingType.Displayed);
+ public void SetReleaseCurve4(ADSRCurveType value) => ModuleHandle.SetControllerValue(47, (int)value, ValueScalingType.Displayed);
///
/// Original name: 5 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public ADSRCurveType GetReleaseCurve5() => (ADSRCurveType)Module.GetControllerValue(48, ValueScalingType.Displayed);
+ public ADSRCurveType GetReleaseCurve5() => (ADSRCurveType)ModuleHandle.GetControllerValue(48, ValueScalingType.Displayed);
///
/// Original name: 5 Release curve
/// Possible values: Linear, Exp1, Exp2, Nexp1, Nexp2, Sin, Rect, SmoothRect, Bit2, Bit3, Bit4, Bit5
///
- public void SetReleaseCurve5(ADSRCurveType value) => Module.SetControllerValue(48, (int)value, ValueScalingType.Displayed);
+ public void SetReleaseCurve5(ADSRCurveType value) => ModuleHandle.SetControllerValue(48, (int)value, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Possible values: Hz8000, Hz11025, Hz16000, Hz22050, Hz32000, Hz44100, Native
///
- public FMXSampleRate GetSampleRate() => (FMXSampleRate)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public FMXSampleRate GetSampleRate() => (FMXSampleRate)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Possible values: Hz8000, Hz11025, Hz16000, Hz22050, Hz32000, Hz44100, Native
///
- public void SetSampleRate(FMXSampleRate value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetSampleRate(FMXSampleRate value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: 1 Self-modulation
/// Value range: 0 to 32768
///
- public int GetSelfModulation1() => Module.GetControllerValue(99, ValueScalingType.Displayed);
+ public int GetSelfModulation1() => ModuleHandle.GetControllerValue(99, ValueScalingType.Displayed);
///
/// Original name: 1 Self-modulation
/// Value range: 0 to 32768
///
- public void SetSelfModulation1(int value) => Module.SetControllerValue(99, value, ValueScalingType.Displayed);
+ public void SetSelfModulation1(int value) => ModuleHandle.SetControllerValue(99, value, ValueScalingType.Displayed);
///
/// Original name: 2 Self-modulation
/// Value range: 0 to 32768
///
- public int GetSelfModulation2() => Module.GetControllerValue(100, ValueScalingType.Displayed);
+ public int GetSelfModulation2() => ModuleHandle.GetControllerValue(100, ValueScalingType.Displayed);
///
/// Original name: 2 Self-modulation
/// Value range: 0 to 32768
///
- public void SetSelfModulation2(int value) => Module.SetControllerValue(100, value, ValueScalingType.Displayed);
+ public void SetSelfModulation2(int value) => ModuleHandle.SetControllerValue(100, value, ValueScalingType.Displayed);
///
/// Original name: 3 Self-modulation
/// Value range: 0 to 32768
///
- public int GetSelfModulation3() => Module.GetControllerValue(101, ValueScalingType.Displayed);
+ public int GetSelfModulation3() => ModuleHandle.GetControllerValue(101, ValueScalingType.Displayed);
///
/// Original name: 3 Self-modulation
/// Value range: 0 to 32768
///
- public void SetSelfModulation3(int value) => Module.SetControllerValue(101, value, ValueScalingType.Displayed);
+ public void SetSelfModulation3(int value) => ModuleHandle.SetControllerValue(101, value, ValueScalingType.Displayed);
///
/// Original name: 4 Self-modulation
/// Value range: 0 to 32768
///
- public int GetSelfModulation4() => Module.GetControllerValue(102, ValueScalingType.Displayed);
+ public int GetSelfModulation4() => ModuleHandle.GetControllerValue(102, ValueScalingType.Displayed);
///
/// Original name: 4 Self-modulation
/// Value range: 0 to 32768
///
- public void SetSelfModulation4(int value) => Module.SetControllerValue(102, value, ValueScalingType.Displayed);
+ public void SetSelfModulation4(int value) => ModuleHandle.SetControllerValue(102, value, ValueScalingType.Displayed);
///
/// Original name: 5 Self-modulation
/// Value range: 0 to 32768
///
- public int GetSelfModulation5() => Module.GetControllerValue(103, ValueScalingType.Displayed);
+ public int GetSelfModulation5() => ModuleHandle.GetControllerValue(103, ValueScalingType.Displayed);
///
/// Original name: 5 Self-modulation
/// Value range: 0 to 32768
///
- public void SetSelfModulation5(int value) => Module.SetControllerValue(103, value, ValueScalingType.Displayed);
+ public void SetSelfModulation5(int value) => ModuleHandle.SetControllerValue(103, value, ValueScalingType.Displayed);
///
/// Original name: 1 Sustain
/// Possible values: Off, On, Repeat
///
- public ADSRSustainMode GetSustain1() => (ADSRSustainMode)Module.GetControllerValue(49, ValueScalingType.Displayed);
+ public ADSRSustainMode GetSustain1() => (ADSRSustainMode)ModuleHandle.GetControllerValue(49, ValueScalingType.Displayed);
///
/// Original name: 1 Sustain
/// Possible values: Off, On, Repeat
///
- public void SetSustain1(ADSRSustainMode value) => Module.SetControllerValue(49, (int)value, ValueScalingType.Displayed);
+ public void SetSustain1(ADSRSustainMode value) => ModuleHandle.SetControllerValue(49, (int)value, ValueScalingType.Displayed);
///
/// Original name: 2 Sustain
/// Possible values: Off, On, Repeat
///
- public ADSRSustainMode GetSustain2() => (ADSRSustainMode)Module.GetControllerValue(50, ValueScalingType.Displayed);
+ public ADSRSustainMode GetSustain2() => (ADSRSustainMode)ModuleHandle.GetControllerValue(50, ValueScalingType.Displayed);
///
/// Original name: 2 Sustain
/// Possible values: Off, On, Repeat
///
- public void SetSustain2(ADSRSustainMode value) => Module.SetControllerValue(50, (int)value, ValueScalingType.Displayed);
+ public void SetSustain2(ADSRSustainMode value) => ModuleHandle.SetControllerValue(50, (int)value, ValueScalingType.Displayed);
///
/// Original name: 3 Sustain
/// Possible values: Off, On, Repeat
///
- public ADSRSustainMode GetSustain3() => (ADSRSustainMode)Module.GetControllerValue(51, ValueScalingType.Displayed);
+ public ADSRSustainMode GetSustain3() => (ADSRSustainMode)ModuleHandle.GetControllerValue(51, ValueScalingType.Displayed);
///
/// Original name: 3 Sustain
/// Possible values: Off, On, Repeat
///
- public void SetSustain3(ADSRSustainMode value) => Module.SetControllerValue(51, (int)value, ValueScalingType.Displayed);
+ public void SetSustain3(ADSRSustainMode value) => ModuleHandle.SetControllerValue(51, (int)value, ValueScalingType.Displayed);
///
/// Original name: 4 Sustain
/// Possible values: Off, On, Repeat
///
- public ADSRSustainMode GetSustain4() => (ADSRSustainMode)Module.GetControllerValue(52, ValueScalingType.Displayed);
+ public ADSRSustainMode GetSustain4() => (ADSRSustainMode)ModuleHandle.GetControllerValue(52, ValueScalingType.Displayed);
///
/// Original name: 4 Sustain
/// Possible values: Off, On, Repeat
///
- public void SetSustain4(ADSRSustainMode value) => Module.SetControllerValue(52, (int)value, ValueScalingType.Displayed);
+ public void SetSustain4(ADSRSustainMode value) => ModuleHandle.SetControllerValue(52, (int)value, ValueScalingType.Displayed);
///
/// Original name: 5 Sustain
/// Possible values: Off, On, Repeat
///
- public ADSRSustainMode GetSustain5() => (ADSRSustainMode)Module.GetControllerValue(53, ValueScalingType.Displayed);
+ public ADSRSustainMode GetSustain5() => (ADSRSustainMode)ModuleHandle.GetControllerValue(53, ValueScalingType.Displayed);
///
/// Original name: 5 Sustain
/// Possible values: Off, On, Repeat
///
- public void SetSustain5(ADSRSustainMode value) => Module.SetControllerValue(53, (int)value, ValueScalingType.Displayed);
+ public void SetSustain5(ADSRSustainMode value) => ModuleHandle.SetControllerValue(53, (int)value, ValueScalingType.Displayed);
///
/// Original name: 1 Sustain level
/// Value range: 0 to 32768
///
- public int GetSustainLevel1() => Module.GetControllerValue(24, ValueScalingType.Displayed);
+ public int GetSustainLevel1() => ModuleHandle.GetControllerValue(24, ValueScalingType.Displayed);
///
/// Original name: 1 Sustain level
/// Value range: 0 to 32768
///
- public void SetSustainLevel1(int value) => Module.SetControllerValue(24, value, ValueScalingType.Displayed);
+ public void SetSustainLevel1(int value) => ModuleHandle.SetControllerValue(24, value, ValueScalingType.Displayed);
///
/// Original name: 2 Sustain level
/// Value range: 0 to 32768
///
- public int GetSustainLevel2() => Module.GetControllerValue(25, ValueScalingType.Displayed);
+ public int GetSustainLevel2() => ModuleHandle.GetControllerValue(25, ValueScalingType.Displayed);
///
/// Original name: 2 Sustain level
/// Value range: 0 to 32768
///
- public void SetSustainLevel2(int value) => Module.SetControllerValue(25, value, ValueScalingType.Displayed);
+ public void SetSustainLevel2(int value) => ModuleHandle.SetControllerValue(25, value, ValueScalingType.Displayed);
///
/// Original name: 3 Sustain level
/// Value range: 0 to 32768
///
- public int GetSustainLevel3() => Module.GetControllerValue(26, ValueScalingType.Displayed);
+ public int GetSustainLevel3() => ModuleHandle.GetControllerValue(26, ValueScalingType.Displayed);
///
/// Original name: 3 Sustain level
/// Value range: 0 to 32768
///
- public void SetSustainLevel3(int value) => Module.SetControllerValue(26, value, ValueScalingType.Displayed);
+ public void SetSustainLevel3(int value) => ModuleHandle.SetControllerValue(26, value, ValueScalingType.Displayed);
///
/// Original name: 4 Sustain level
/// Value range: 0 to 32768
///
- public int GetSustainLevel4() => Module.GetControllerValue(27, ValueScalingType.Displayed);
+ public int GetSustainLevel4() => ModuleHandle.GetControllerValue(27, ValueScalingType.Displayed);
///
/// Original name: 4 Sustain level
/// Value range: 0 to 32768
///
- public void SetSustainLevel4(int value) => Module.SetControllerValue(27, value, ValueScalingType.Displayed);
+ public void SetSustainLevel4(int value) => ModuleHandle.SetControllerValue(27, value, ValueScalingType.Displayed);
///
/// Original name: 5 Sustain level
/// Value range: 0 to 32768
///
- public int GetSustainLevel5() => Module.GetControllerValue(28, ValueScalingType.Displayed);
+ public int GetSustainLevel5() => ModuleHandle.GetControllerValue(28, ValueScalingType.Displayed);
///
/// Original name: 5 Sustain level
/// Value range: 0 to 32768
///
- public void SetSustainLevel5(int value) => Module.SetControllerValue(28, value, ValueScalingType.Displayed);
+ public void SetSustainLevel5(int value) => ModuleHandle.SetControllerValue(28, value, ValueScalingType.Displayed);
///
/// Original name: 1 Sustain pedal
/// Possible values: Off, On
///
- public Toggle GetSustainPedal1() => (Toggle)Module.GetControllerValue(54, ValueScalingType.Displayed);
+ public Toggle GetSustainPedal1() => (Toggle)ModuleHandle.GetControllerValue(54, ValueScalingType.Displayed);
///
/// Original name: 1 Sustain pedal
/// Possible values: Off, On
///
- public void SetSustainPedal1(Toggle value) => Module.SetControllerValue(54, (int)value, ValueScalingType.Displayed);
+ public void SetSustainPedal1(Toggle value) => ModuleHandle.SetControllerValue(54, (int)value, ValueScalingType.Displayed);
///
/// Original name: 2 Sustain pedal
/// Possible values: Off, On
///
- public Toggle GetSustainPedal2() => (Toggle)Module.GetControllerValue(55, ValueScalingType.Displayed);
+ public Toggle GetSustainPedal2() => (Toggle)ModuleHandle.GetControllerValue(55, ValueScalingType.Displayed);
///
/// Original name: 2 Sustain pedal
/// Possible values: Off, On
///
- public void SetSustainPedal2(Toggle value) => Module.SetControllerValue(55, (int)value, ValueScalingType.Displayed);
+ public void SetSustainPedal2(Toggle value) => ModuleHandle.SetControllerValue(55, (int)value, ValueScalingType.Displayed);
///
/// Original name: 3 Sustain pedal
/// Possible values: Off, On
///
- public Toggle GetSustainPedal3() => (Toggle)Module.GetControllerValue(56, ValueScalingType.Displayed);
+ public Toggle GetSustainPedal3() => (Toggle)ModuleHandle.GetControllerValue(56, ValueScalingType.Displayed);
///
/// Original name: 3 Sustain pedal
/// Possible values: Off, On
///
- public void SetSustainPedal3(Toggle value) => Module.SetControllerValue(56, (int)value, ValueScalingType.Displayed);
+ public void SetSustainPedal3(Toggle value) => ModuleHandle.SetControllerValue(56, (int)value, ValueScalingType.Displayed);
///
/// Original name: 4 Sustain pedal
/// Possible values: Off, On
///
- public Toggle GetSustainPedal4() => (Toggle)Module.GetControllerValue(57, ValueScalingType.Displayed);
+ public Toggle GetSustainPedal4() => (Toggle)ModuleHandle.GetControllerValue(57, ValueScalingType.Displayed);
///
/// Original name: 4 Sustain pedal
/// Possible values: Off, On
///
- public void SetSustainPedal4(Toggle value) => Module.SetControllerValue(57, (int)value, ValueScalingType.Displayed);
+ public void SetSustainPedal4(Toggle value) => ModuleHandle.SetControllerValue(57, (int)value, ValueScalingType.Displayed);
///
/// Original name: 5 Sustain pedal
/// Possible values: Off, On
///
- public Toggle GetSustainPedal5() => (Toggle)Module.GetControllerValue(58, ValueScalingType.Displayed);
+ public Toggle GetSustainPedal5() => (Toggle)ModuleHandle.GetControllerValue(58, ValueScalingType.Displayed);
///
/// Original name: 5 Sustain pedal
/// Possible values: Off, On
///
- public void SetSustainPedal5(Toggle value) => Module.SetControllerValue(58, (int)value, ValueScalingType.Displayed);
+ public void SetSustainPedal5(Toggle value) => ModuleHandle.SetControllerValue(58, (int)value, ValueScalingType.Displayed);
///
/// Original name: 1 Velocity sensitivity
/// Value range: -128 to 128
///
- public int GetVelocitySensitivity1() => Module.GetControllerValue(69, ValueScalingType.Displayed);
+ public int GetVelocitySensitivity1() => ModuleHandle.GetControllerValue(69, ValueScalingType.Displayed);
///
/// Original name: 1 Velocity sensitivity
/// Value range: -128 to 128
///
- public void SetVelocitySensitivity1(int value) => Module.SetControllerValue(69, value, ValueScalingType.Displayed);
+ public void SetVelocitySensitivity1(int value) => ModuleHandle.SetControllerValue(69, value, ValueScalingType.Displayed);
///
/// Original name: 2 Velocity sensitivity
/// Value range: -128 to 128
///
- public int GetVelocitySensitivity2() => Module.GetControllerValue(70, ValueScalingType.Displayed);
+ public int GetVelocitySensitivity2() => ModuleHandle.GetControllerValue(70, ValueScalingType.Displayed);
///
/// Original name: 2 Velocity sensitivity
/// Value range: -128 to 128
///
- public void SetVelocitySensitivity2(int value) => Module.SetControllerValue(70, value, ValueScalingType.Displayed);
+ public void SetVelocitySensitivity2(int value) => ModuleHandle.SetControllerValue(70, value, ValueScalingType.Displayed);
///
/// Original name: 3 Velocity sensitivity
/// Value range: -128 to 128
///
- public int GetVelocitySensitivity3() => Module.GetControllerValue(71, ValueScalingType.Displayed);
+ public int GetVelocitySensitivity3() => ModuleHandle.GetControllerValue(71, ValueScalingType.Displayed);
///
/// Original name: 3 Velocity sensitivity
/// Value range: -128 to 128
///
- public void SetVelocitySensitivity3(int value) => Module.SetControllerValue(71, value, ValueScalingType.Displayed);
+ public void SetVelocitySensitivity3(int value) => ModuleHandle.SetControllerValue(71, value, ValueScalingType.Displayed);
///
/// Original name: 4 Velocity sensitivity
/// Value range: -128 to 128
///
- public int GetVelocitySensitivity4() => Module.GetControllerValue(72, ValueScalingType.Displayed);
+ public int GetVelocitySensitivity4() => ModuleHandle.GetControllerValue(72, ValueScalingType.Displayed);
///
/// Original name: 4 Velocity sensitivity
/// Value range: -128 to 128
///
- public void SetVelocitySensitivity4(int value) => Module.SetControllerValue(72, value, ValueScalingType.Displayed);
+ public void SetVelocitySensitivity4(int value) => ModuleHandle.SetControllerValue(72, value, ValueScalingType.Displayed);
///
/// Original name: 5 Velocity sensitivity
/// Value range: -128 to 128
///
- public int GetVelocitySensitivity5() => Module.GetControllerValue(73, ValueScalingType.Displayed);
+ public int GetVelocitySensitivity5() => ModuleHandle.GetControllerValue(73, ValueScalingType.Displayed);
///
/// Original name: 5 Velocity sensitivity
/// Value range: -128 to 128
///
- public void SetVelocitySensitivity5(int value) => Module.SetControllerValue(73, value, ValueScalingType.Displayed);
+ public void SetVelocitySensitivity5(int value) => ModuleHandle.SetControllerValue(73, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 32768
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: 1 Volume
/// Value range: 0 to 32768
///
- public int GetVolume1() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetVolume1() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: 1 Volume
/// Value range: 0 to 32768
///
- public void SetVolume1(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetVolume1(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: 2 Volume
/// Value range: 0 to 32768
///
- public int GetVolume2() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetVolume2() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: 2 Volume
/// Value range: 0 to 32768
///
- public void SetVolume2(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetVolume2(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: 3 Volume
/// Value range: 0 to 32768
///
- public int GetVolume3() => Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public int GetVolume3() => ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: 3 Volume
/// Value range: 0 to 32768
///
- public void SetVolume3(int value) => Module.SetControllerValue(11, value, ValueScalingType.Displayed);
+ public void SetVolume3(int value) => ModuleHandle.SetControllerValue(11, value, ValueScalingType.Displayed);
///
/// Original name: 4 Volume
/// Value range: 0 to 32768
///
- public int GetVolume4() => Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public int GetVolume4() => ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: 4 Volume
/// Value range: 0 to 32768
///
- public void SetVolume4(int value) => Module.SetControllerValue(12, value, ValueScalingType.Displayed);
+ public void SetVolume4(int value) => ModuleHandle.SetControllerValue(12, value, ValueScalingType.Displayed);
///
/// Original name: 5 Volume
/// Value range: 0 to 32768
///
- public int GetVolume5() => Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public int GetVolume5() => ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: 5 Volume
/// Value range: 0 to 32768
///
- public void SetVolume5(int value) => Module.SetControllerValue(13, value, ValueScalingType.Displayed);
+ public void SetVolume5(int value) => ModuleHandle.SetControllerValue(13, value, ValueScalingType.Displayed);
///
/// Original name: 1 Volume scaling per key
/// Value range: -128 to 128
///
- public int GetVolumeScalingPerKey1() => Module.GetControllerValue(64, ValueScalingType.Displayed);
+ public int GetVolumeScalingPerKey1() => ModuleHandle.GetControllerValue(64, ValueScalingType.Displayed);
///
/// Original name: 1 Volume scaling per key
/// Value range: -128 to 128
///
- public void SetVolumeScalingPerKey1(int value) => Module.SetControllerValue(64, value, ValueScalingType.Displayed);
+ public void SetVolumeScalingPerKey1(int value) => ModuleHandle.SetControllerValue(64, value, ValueScalingType.Displayed);
///
/// Original name: 2 Volume scaling per key
/// Value range: -128 to 128
///
- public int GetVolumeScalingPerKey2() => Module.GetControllerValue(65, ValueScalingType.Displayed);
+ public int GetVolumeScalingPerKey2() => ModuleHandle.GetControllerValue(65, ValueScalingType.Displayed);
///
/// Original name: 2 Volume scaling per key
/// Value range: -128 to 128
///
- public void SetVolumeScalingPerKey2(int value) => Module.SetControllerValue(65, value, ValueScalingType.Displayed);
+ public void SetVolumeScalingPerKey2(int value) => ModuleHandle.SetControllerValue(65, value, ValueScalingType.Displayed);
///
/// Original name: 3 Volume scaling per key
/// Value range: -128 to 128
///
- public int GetVolumeScalingPerKey3() => Module.GetControllerValue(66, ValueScalingType.Displayed);
+ public int GetVolumeScalingPerKey3() => ModuleHandle.GetControllerValue(66, ValueScalingType.Displayed);
///
/// Original name: 3 Volume scaling per key
/// Value range: -128 to 128
///
- public void SetVolumeScalingPerKey3(int value) => Module.SetControllerValue(66, value, ValueScalingType.Displayed);
+ public void SetVolumeScalingPerKey3(int value) => ModuleHandle.SetControllerValue(66, value, ValueScalingType.Displayed);
///
/// Original name: 4 Volume scaling per key
/// Value range: -128 to 128
///
- public int GetVolumeScalingPerKey4() => Module.GetControllerValue(67, ValueScalingType.Displayed);
+ public int GetVolumeScalingPerKey4() => ModuleHandle.GetControllerValue(67, ValueScalingType.Displayed);
///
/// Original name: 4 Volume scaling per key
/// Value range: -128 to 128
///
- public void SetVolumeScalingPerKey4(int value) => Module.SetControllerValue(67, value, ValueScalingType.Displayed);
+ public void SetVolumeScalingPerKey4(int value) => ModuleHandle.SetControllerValue(67, value, ValueScalingType.Displayed);
///
/// Original name: 5 Volume scaling per key
/// Value range: -128 to 128
///
- public int GetVolumeScalingPerKey5() => Module.GetControllerValue(68, ValueScalingType.Displayed);
+ public int GetVolumeScalingPerKey5() => ModuleHandle.GetControllerValue(68, ValueScalingType.Displayed);
///
/// Original name: 5 Volume scaling per key
/// Value range: -128 to 128
///
- public void SetVolumeScalingPerKey5(int value) => Module.SetControllerValue(68, value, ValueScalingType.Displayed);
+ public void SetVolumeScalingPerKey5(int value) => ModuleHandle.SetControllerValue(68, value, ValueScalingType.Displayed);
///
/// Original name: 1 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public FMXWaveform GetWaveform1() => (FMXWaveform)Module.GetControllerValue(74, ValueScalingType.Displayed);
+ public FMXWaveform GetWaveform1() => (FMXWaveform)ModuleHandle.GetControllerValue(74, ValueScalingType.Displayed);
///
/// Original name: 1 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public void SetWaveform1(FMXWaveform value) => Module.SetControllerValue(74, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform1(FMXWaveform value) => ModuleHandle.SetControllerValue(74, (int)value, ValueScalingType.Displayed);
///
/// Original name: 2 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public FMXWaveform GetWaveform2() => (FMXWaveform)Module.GetControllerValue(75, ValueScalingType.Displayed);
+ public FMXWaveform GetWaveform2() => (FMXWaveform)ModuleHandle.GetControllerValue(75, ValueScalingType.Displayed);
///
/// Original name: 2 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public void SetWaveform2(FMXWaveform value) => Module.SetControllerValue(75, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform2(FMXWaveform value) => ModuleHandle.SetControllerValue(75, (int)value, ValueScalingType.Displayed);
///
/// Original name: 3 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public FMXWaveform GetWaveform3() => (FMXWaveform)Module.GetControllerValue(76, ValueScalingType.Displayed);
+ public FMXWaveform GetWaveform3() => (FMXWaveform)ModuleHandle.GetControllerValue(76, ValueScalingType.Displayed);
///
/// Original name: 3 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public void SetWaveform3(FMXWaveform value) => Module.SetControllerValue(76, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform3(FMXWaveform value) => ModuleHandle.SetControllerValue(76, (int)value, ValueScalingType.Displayed);
///
/// Original name: 4 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public FMXWaveform GetWaveform4() => (FMXWaveform)Module.GetControllerValue(77, ValueScalingType.Displayed);
+ public FMXWaveform GetWaveform4() => (FMXWaveform)ModuleHandle.GetControllerValue(77, ValueScalingType.Displayed);
///
/// Original name: 4 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public void SetWaveform4(FMXWaveform value) => Module.SetControllerValue(77, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform4(FMXWaveform value) => ModuleHandle.SetControllerValue(77, (int)value, ValueScalingType.Displayed);
///
/// Original name: 5 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public FMXWaveform GetWaveform5() => (FMXWaveform)Module.GetControllerValue(78, ValueScalingType.Displayed);
+ public FMXWaveform GetWaveform5() => (FMXWaveform)ModuleHandle.GetControllerValue(78, ValueScalingType.Displayed);
///
/// Original name: 5 Waveform
/// Possible values: Custom, Triangle, Triangle3, Saw, Saw3, Square, Sin, Hsin, Asin, Sin3
///
- public void SetWaveform5(FMXWaveform value) => Module.SetControllerValue(78, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform5(FMXWaveform value) => ModuleHandle.SetControllerValue(78, (int)value, ValueScalingType.Displayed);
#endregion controllers
@@ -5197,7 +5197,7 @@ public void ReadCustomWaveform(float[] buffer)
if (buffer.Length < 256)
throw new System.ArgumentException("Buffer must be at least of size 256");
- Module.ReadCurve(0, buffer);
+ ModuleHandle.ReadCurve(0, buffer);
}
///
@@ -5210,7 +5210,7 @@ public void WriteCustomWaveform(float[] buffer)
if (buffer.Length < 256)
throw new System.ArgumentException("Buffer must be at least of size 256");
- Module.WriteCurve(0, buffer);
+ ModuleHandle.WriteCurve(0, buffer);
}
#endregion curves
@@ -5219,11 +5219,11 @@ public void WriteCustomWaveform(float[] buffer)
public struct GeneratorModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public GeneratorModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -5233,132 +5233,132 @@ public GeneratorModuleHandle(ModuleHandle module)
/// Original name: Attack
/// Value range: 0 to 512
///
- public int GetAttack() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetAttack() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Attack
/// Value range: 0 to 512
///
- public void SetAttack(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetAttack(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Duty cycle
/// Value range: 0 to 1022
///
- public int GetDutyCycle() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetDutyCycle() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Duty cycle
/// Value range: 0 to 1022
///
- public void SetDutyCycle(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetDutyCycle(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: Freq.modulation by input
/// Value range: 0 to 256
///
- public int GetFreqModulationByInput() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetFreqModulationByInput() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Freq.modulation by input
/// Value range: 0 to 256
///
- public void SetFreqModulationByInput(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetFreqModulationByInput(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Stereo, Mono
///
- public Channels GetMode() => (Channels)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Channels GetMode() => (Channels)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Stereo, Mono
///
- public void SetMode(Channels value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetMode(Channels value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 16
///
- public int GetPolyphony() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 16
///
- public void SetPolyphony(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 512
///
- public int GetRelease() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetRelease() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 512
///
- public void SetRelease(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetRelease(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On
///
- public Toggle GetSustain() => (Toggle)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public Toggle GetSustain() => (Toggle)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On
///
- public void SetSustain(Toggle value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetSustain(Toggle value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Triangle, Saw, Square, NoiseSampler, Drawn, Sin, Hsin, Asin, Rsin
///
- public GeneratorWaveform GetWaveform() => (GeneratorWaveform)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public GeneratorWaveform GetWaveform() => (GeneratorWaveform)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Triangle, Saw, Square, NoiseSampler, Drawn, Sin, Hsin, Asin, Rsin
///
- public void SetWaveform(GeneratorWaveform value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform(GeneratorWaveform value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
#endregion controllers
}
public struct GlideModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public GlideModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -5368,96 +5368,96 @@ public GlideModuleHandle(ModuleHandle module)
/// Original name: Pitch
/// Value range: -600 to 600
///
- public int GetPitch() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetPitch() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Pitch
/// Value range: -600 to 600
///
- public void SetPitch(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetPitch(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Pitch scale
/// Value range: 0 to 200
///
- public int GetPitchScale() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetPitchScale() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Pitch scale
/// Value range: 0 to 200
///
- public void SetPitchScale(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetPitchScale(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Possible values: Off, On
///
- public Toggle GetPolyphony() => (Toggle)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public Toggle GetPolyphony() => (Toggle)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Possible values: Off, On
///
- public void SetPolyphony(Toggle value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetPolyphony(Toggle value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: Reset
/// Possible values: Off, On
///
- public Toggle GetReset() => (Toggle)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Toggle GetReset() => (Toggle)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Reset
/// Possible values: Off, On
///
- public void SetReset(Toggle value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetReset(Toggle value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Reset on 1st note
/// Possible values: Off, On
///
- public Toggle GetResetOnFirstNote() => (Toggle)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public Toggle GetResetOnFirstNote() => (Toggle)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Reset on 1st note
/// Possible values: Off, On
///
- public void SetResetOnFirstNote(Toggle value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetResetOnFirstNote(Toggle value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 1000
///
- public int GetResponse() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetResponse() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 1000
///
- public void SetResponse(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetResponse(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Value range: 1 to 32768
///
- public int GetSampleRate() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetSampleRate() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Value range: 1 to 32768
///
- public void SetSampleRate(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetSampleRate(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct GPIOModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public GPIOModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -5467,96 +5467,96 @@ public GPIOModuleHandle(ModuleHandle module)
/// Original name: In
/// Possible values: Off, On
///
- public Toggle GetIn() => (Toggle)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public Toggle GetIn() => (Toggle)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: In
/// Possible values: Off, On
///
- public void SetIn(Toggle value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetIn(Toggle value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: In amplitude
/// Value range: 0 to 100
///
- public int GetInAmplitude() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetInAmplitude() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: In amplitude
/// Value range: 0 to 100
///
- public void SetInAmplitude(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetInAmplitude(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: In note
/// Value range: 0 to 128
///
- public int GetInNote() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetInNote() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: In note
/// Value range: 0 to 128
///
- public void SetInNote(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetInNote(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: In pin
/// Value range: 0 to 256
///
- public int GetInPin() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetInPin() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: In pin
/// Value range: 0 to 256
///
- public void SetInPin(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetInPin(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Out
/// Possible values: Off, On
///
- public Toggle GetOut() => (Toggle)Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public Toggle GetOut() => (Toggle)ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Out
/// Possible values: Off, On
///
- public void SetOut(Toggle value) => Module.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
+ public void SetOut(Toggle value) => ModuleHandle.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
///
/// Original name: Out pin
/// Value range: 0 to 256
///
- public int GetOutPin() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetOutPin() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Out pin
/// Value range: 0 to 256
///
- public void SetOutPin(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetOutPin(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Out threshold
/// Value range: 0 to 100
///
- public int GetOutThreshold() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetOutThreshold() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Out threshold
/// Value range: 0 to 100
///
- public void SetOutThreshold(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetOutThreshold(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct InputModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public InputModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -5566,36 +5566,36 @@ public InputModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public ChannelsInverted GetChannels() => (ChannelsInverted)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public ChannelsInverted GetChannels() => (ChannelsInverted)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public void SetChannels(ChannelsInverted value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(ChannelsInverted value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 1024
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 1024
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct KickerModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public KickerModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -5605,120 +5605,120 @@ public KickerModuleHandle(ModuleHandle module)
/// Original name: Acceleration
/// Value range: 0 to 1024
///
- public int GetAcceleration() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetAcceleration() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Acceleration
/// Value range: 0 to 1024
///
- public void SetAcceleration(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetAcceleration(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Attack
/// Value range: 0 to 512
///
- public int GetAttack() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetAttack() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Attack
/// Value range: 0 to 512
///
- public void SetAttack(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetAttack(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Boost
/// Value range: 0 to 1024
///
- public int GetBoost() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetBoost() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Boost
/// Value range: 0 to 1024
///
- public void SetBoost(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetBoost(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: No click
/// Possible values: Off, On
///
- public Toggle GetNoClick() => (Toggle)Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public Toggle GetNoClick() => (Toggle)ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: No click
/// Possible values: Off, On
///
- public void SetNoClick(Toggle value) => Module.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
+ public void SetNoClick(Toggle value) => ModuleHandle.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 4
///
- public int GetPolyphony() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 4
///
- public void SetPolyphony(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 512
///
- public int GetRelease() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetRelease() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 512
///
- public void SetRelease(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetRelease(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Triangle, Square, Sin
///
- public KickerWaveform GetWaveform() => (KickerWaveform)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public KickerWaveform GetWaveform() => (KickerWaveform)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Triangle, Square, Sin
///
- public void SetWaveform(KickerWaveform value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform(KickerWaveform value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
#endregion controllers
}
public struct LFOModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public LFOModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -5728,168 +5728,168 @@ public LFOModuleHandle(ModuleHandle module)
/// Original name: Amplitude
/// Value range: 0 to 256
///
- public int GetAmplitude() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetAmplitude() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Amplitude
/// Value range: 0 to 256
///
- public void SetAmplitude(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetAmplitude(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Duty cycle
/// Value range: 0 to 256
///
- public int GetDutyCycle() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetDutyCycle() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Duty cycle
/// Value range: 0 to 256
///
- public void SetDutyCycle(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetDutyCycle(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 1 to 256
///
- public int GetFreq() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetFreq() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 1 to 256
///
- public void SetFreq(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetFreq(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Freq scale
/// Value range: 0 to 200
///
- public int GetFreqScale() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetFreqScale() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Freq scale
/// Value range: 0 to 200
///
- public void SetFreqScale(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetFreqScale(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: Frequency unit
/// Possible values: HzDividedBy64, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public LFOFrequencyUnit GetFrequencyUnit() => (LFOFrequencyUnit)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public LFOFrequencyUnit GetFrequencyUnit() => (LFOFrequencyUnit)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Frequency unit
/// Possible values: HzDividedBy64, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public void SetFrequencyUnit(LFOFrequencyUnit value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetFrequencyUnit(LFOFrequencyUnit value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Generator
/// Possible values: Off, On
///
- public Toggle GetGenerator() => (Toggle)Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public Toggle GetGenerator() => (Toggle)ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Generator
/// Possible values: Off, On
///
- public void SetGenerator(Toggle value) => Module.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
+ public void SetGenerator(Toggle value) => ModuleHandle.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: Amplitude, Panning
///
- public LFOType GetLfoType() => (LFOType)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public LFOType GetLfoType() => (LFOType)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Type
/// Possible values: Amplitude, Panning
///
- public void SetLfoType(LFOType value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetLfoType(LFOType value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Set phase
/// Value range: 0 to 256
///
- public int GetSetPhase() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetSetPhase() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Set phase
/// Value range: 0 to 256
///
- public void SetSetPhase(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetSetPhase(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Sine quality
/// Possible values: Auto, Low, Middle, High
///
- public LFOSineQuality GetSineQuality() => (LFOSineQuality)Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public LFOSineQuality GetSineQuality() => (LFOSineQuality)ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: Sine quality
/// Possible values: Auto, Low, Middle, High
///
- public void SetSineQuality(LFOSineQuality value) => Module.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
+ public void SetSineQuality(LFOSineQuality value) => ModuleHandle.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
///
/// Original name: Smooth transitions
/// Possible values: Off, Waveform
///
- public LFOSmoothTransitions GetSmoothTransitions() => (LFOSmoothTransitions)Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public LFOSmoothTransitions GetSmoothTransitions() => (LFOSmoothTransitions)ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: Smooth transitions
/// Possible values: Off, Waveform
///
- public void SetSmoothTransitions(LFOSmoothTransitions value) => Module.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
+ public void SetSmoothTransitions(LFOSmoothTransitions value) => ModuleHandle.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Sin, Square, Sin2, Saw, Saw2, Random, Triangle, RandomInterpolated
///
- public LFOWaveform GetWaveform() => (LFOWaveform)Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public LFOWaveform GetWaveform() => (LFOWaveform)ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Waveform
/// Possible values: Sin, Square, Sin2, Saw, Saw2, Random, Triangle, RandomInterpolated
///
- public void SetWaveform(LFOWaveform value) => Module.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
+ public void SetWaveform(LFOWaveform value) => ModuleHandle.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
#endregion controllers
}
public struct LoopModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public LoopModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -5899,120 +5899,120 @@ public LoopModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public ChannelsInverted GetChannels() => (ChannelsInverted)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public ChannelsInverted GetChannels() => (ChannelsInverted)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public void SetChannels(ChannelsInverted value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(ChannelsInverted value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: Length
/// Value range: 0 to 256
///
- public int GetDelay() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetDelay() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Length
/// Value range: 0 to 256
///
- public void SetDelay(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetDelay(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Length unit
/// Possible values: LineDivBy128, Line, HalfLine, OneThirdLine, Tick, Millisecond, Hz
///
- public LoopTimeUnit GetLengthUnit() => (LoopTimeUnit)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public LoopTimeUnit GetLengthUnit() => (LoopTimeUnit)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Length unit
/// Possible values: LineDivBy128, Line, HalfLine, OneThirdLine, Tick, Millisecond, Hz
///
- public void SetLengthUnit(LoopTimeUnit value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetLengthUnit(LoopTimeUnit value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Max buffer size
/// Value range: 1 to 240
/// Max buffer size in seconds
///
- public int GetMaxBufferSize() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetMaxBufferSize() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Max buffer size
/// Value range: 1 to 240
/// Max buffer size in seconds
///
- public void SetMaxBufferSize(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetMaxBufferSize(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Normal, PingPong
///
- public LoopMode GetMode() => (LoopMode)Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public LoopMode GetMode() => (LoopMode)ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: Normal, PingPong
///
- public void SetMode(LoopMode value) => Module.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
+ public void SetMode(LoopMode value) => ModuleHandle.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
///
/// Original name: On NoteON
/// Possible values: Restart, RestartCurrentIteration
///
- public LoopOnNoteOn GetOnNoteOn() => (LoopOnNoteOn)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public LoopOnNoteOn GetOnNoteOn() => (LoopOnNoteOn)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: On NoteON
/// Possible values: Restart, RestartCurrentIteration
///
- public void SetOnNoteOn(LoopOnNoteOn value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetOnNoteOn(LoopOnNoteOn value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Repeat (128=endless)
/// Value range: 0 to 128
///
- public int GetRepeats() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetRepeats() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Repeat (128=endless)
/// Value range: 0 to 128
///
- public void SetRepeats(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetRepeats(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct MetaModuleModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public MetaModuleModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
#region module type-specific methods
///
- public void LoadFile(string path) => Module.LoadIntoMetaModule(path);
+ public void LoadFile(string path) => ModuleHandle.LoadIntoMetaModule(path);
///
- public void LoadFile(byte[] data) => Module.LoadIntoMetaModule(data);
+ public void LoadFile(byte[] data) => ModuleHandle.LoadIntoMetaModule(data);
#endregion module type-specific methods
@@ -6022,72 +6022,72 @@ public MetaModuleModuleHandle(ModuleHandle module)
/// Original name: BPM (Beats Per Minute)
/// Value range: 1 to 1000
///
- public int GetBPM() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetBPM() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: BPM (Beats Per Minute)
/// Value range: 1 to 1000
///
- public void SetBPM(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetBPM(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Input module
/// Value range: 1 to 256
///
- public int GetInputModule() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetInputModule() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Input module
/// Value range: 1 to 256
///
- public void SetInputModule(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetInputModule(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Play patterns
/// Possible values: Off, OnRepeat, OnNoRepeat, OnRepeatEndless, OnNoRepeatEndless
///
- public MetaModulePatternMode GetPlayPatterns() => (MetaModulePatternMode)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public MetaModulePatternMode GetPlayPatterns() => (MetaModulePatternMode)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Play patterns
/// Possible values: Off, OnRepeat, OnNoRepeat, OnRepeatEndless, OnNoRepeatEndless
///
- public void SetPlayPatterns(MetaModulePatternMode value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetPlayPatterns(MetaModulePatternMode value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: TPL (Ticks Per Line)
/// Value range: 1 to 31
///
- public int GetTPL() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetTPL() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: TPL (Ticks Per Line)
/// Value range: 1 to 31
///
- public void SetTPL(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetTPL(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 1024
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 1024
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct ModulatorModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public ModulatorModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -6097,48 +6097,48 @@ public ModulatorModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: Modulation type
/// Possible values: Amplitude, Phase, PhaseAbsolute
///
- public ModulationType GetModulationType() => (ModulationType)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public ModulationType GetModulationType() => (ModulationType)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Modulation type
/// Possible values: Amplitude, Phase, PhaseAbsolute
///
- public void SetModulationType(ModulationType value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetModulationType(ModulationType value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct MultiControlModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public MultiControlModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -6148,73 +6148,73 @@ public MultiControlModuleHandle(ModuleHandle module)
/// Original name: Gain
/// Value range: 0 to 1024
///
- public int GetGain() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetGain() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: 0 to 1024
///
- public void SetGain(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetGain(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: OUT offset
/// Value range: -16384 to 16384
///
- public int GetOUTOffset() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetOUTOffset() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: OUT offset
/// Value range: -16384 to 16384
///
- public void SetOUTOffset(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetOUTOffset(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Quantization
/// Value range: 0 to 32768
///
- public int GetQuantization() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetQuantization() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Quantization
/// Value range: 0 to 32768
///
- public void SetQuantization(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetQuantization(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 1000
///
- public int GetResponse() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetResponse() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Response
/// Value range: 0 to 1000
///
- public void SetResponse(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetResponse(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Value range: 1 to 32768
///
- public int GetSampleRate() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetSampleRate() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Value range: 1 to 32768
///
- public void SetSampleRate(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetSampleRate(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Value
/// Value range: 0 to 32768
///
- public int GetValue() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetValue() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Value
/// Value range: 0 to 32768
///
- public void SetValue(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetValue(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
@@ -6230,7 +6230,7 @@ public void ReadCurve(float[] buffer)
if (buffer.Length < 257)
throw new System.ArgumentException("Buffer must be at least of size 257");
- Module.ReadCurve(0, buffer);
+ ModuleHandle.ReadCurve(0, buffer);
}
///
@@ -6243,7 +6243,7 @@ public void WriteCurve(float[] buffer)
if (buffer.Length < 257)
throw new System.ArgumentException("Buffer must be at least of size 257");
- Module.WriteCurve(0, buffer);
+ ModuleHandle.WriteCurve(0, buffer);
}
#endregion curves
@@ -6251,11 +6251,11 @@ public void WriteCurve(float[] buffer)
public struct MultiSynthModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public MultiSynthModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -6265,97 +6265,97 @@ public MultiSynthModuleHandle(ModuleHandle module)
/// Original name: Curve2 influence
/// Value range: 0 to 256
///
- public int GetCurve2Influence() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetCurve2Influence() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Curve2 influence
/// Value range: 0 to 256
///
- public void SetCurve2Influence(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetCurve2Influence(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Finetune
/// Value range: -256 to 256
///
- public int GetFinetune() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetFinetune() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Finetune
/// Value range: -256 to 256
///
- public void SetFinetune(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetFinetune(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Phase
/// Value range: 0 to 32768
///
- public int GetPhase() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetPhase() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Phase
/// Value range: 0 to 32768
///
- public void SetPhase(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetPhase(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Random phase
/// Value range: 0 to 32768
///
- public int GetRandomPhase() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetRandomPhase() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Random phase
/// Value range: 0 to 32768
///
- public void SetRandomPhase(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetRandomPhase(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Random pitch
/// Value range: 0 to 4096
///
- public int GetRandomPitch() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetRandomPitch() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Random pitch
/// Value range: 0 to 4096
///
- public void SetRandomPitch(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetRandomPitch(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Random velocity
/// Value range: 0 to 32768
///
- public int GetRandomVelocity() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetRandomVelocity() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Random velocity
/// Value range: 0 to 32768
///
- public void SetRandomVelocity(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetRandomVelocity(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Transpose
/// Value range: -128 to 128
///
- public int GetTranspose() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetTranspose() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Transpose
/// Value range: -128 to 128
///
- public void SetTranspose(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetTranspose(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Velocity
/// Value range: 0 to 256
///
- public int GetVelocity() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetVelocity() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Velocity
/// Value range: 0 to 256
///
- public void SetVelocity(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetVelocity(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
#endregion controllers
@@ -6371,7 +6371,7 @@ public void ReadNoteVelocityCurve(float[] buffer)
if (buffer.Length < 128)
throw new System.ArgumentException("Buffer must be at least of size 128");
- Module.ReadCurve(0, buffer);
+ ModuleHandle.ReadCurve(0, buffer);
}
///
@@ -6384,7 +6384,7 @@ public void WriteNoteVelocityCurve(float[] buffer)
if (buffer.Length < 128)
throw new System.ArgumentException("Buffer must be at least of size 128");
- Module.WriteCurve(0, buffer);
+ ModuleHandle.WriteCurve(0, buffer);
}
///
@@ -6397,7 +6397,7 @@ public void ReadVelocityToVelocityCurve(float[] buffer)
if (buffer.Length < 257)
throw new System.ArgumentException("Buffer must be at least of size 257");
- Module.ReadCurve(1, buffer);
+ ModuleHandle.ReadCurve(1, buffer);
}
///
@@ -6410,7 +6410,7 @@ public void WriteVelocityToVelocityCurve(float[] buffer)
if (buffer.Length < 257)
throw new System.ArgumentException("Buffer must be at least of size 257");
- Module.WriteCurve(1, buffer);
+ ModuleHandle.WriteCurve(1, buffer);
}
#endregion curves
@@ -6418,22 +6418,22 @@ public void WriteVelocityToVelocityCurve(float[] buffer)
public struct OutputModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public OutputModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
}
public struct PitchDetectorModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public PitchDetectorModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -6443,156 +6443,156 @@ public PitchDetectorModuleHandle(ModuleHandle module)
/// Original name: Alg1 Sensitivity (absolute threshold)
/// Value range: 0 to 100
///
- public int GetAlg1Sensitivity() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetAlg1Sensitivity() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Alg1 Sensitivity (absolute threshold)
/// Value range: 0 to 100
///
- public void SetAlg1Sensitivity(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetAlg1Sensitivity(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: Alg1-2 Buffer (ms)
/// Possible values: Ms5, Ms10, Ms21, Ms42, Ms85
///
- public PitchDetectorBufferSize GetAlgBufferMs() => (PitchDetectorBufferSize)Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public PitchDetectorBufferSize GetAlgBufferMs() => (PitchDetectorBufferSize)ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Alg1-2 Buffer (ms)
/// Possible values: Ms5, Ms10, Ms21, Ms42, Ms85
///
- public void SetAlgBufferMs(PitchDetectorBufferSize value) => Module.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
+ public void SetAlgBufferMs(PitchDetectorBufferSize value) => ModuleHandle.SetControllerValue(8, (int)value, ValueScalingType.Displayed);
///
/// Original name: Alg1-2 Buf overlap
/// Value range: 0 to 100
///
- public int GetAlgBufOverlap() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetAlgBufOverlap() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Alg1-2 Buf overlap
/// Value range: 0 to 100
///
- public void SetAlgBufOverlap(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetAlgBufOverlap(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: Algorithm
/// Possible values: FastZeroCrossing, Autocorrelation, Cepstrum
///
- public PitchDetectorAlgorithm GetAlgorithm() => (PitchDetectorAlgorithm)Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public PitchDetectorAlgorithm GetAlgorithm() => (PitchDetectorAlgorithm)ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Algorithm
/// Possible values: FastZeroCrossing, Autocorrelation, Cepstrum
///
- public void SetAlgorithm(PitchDetectorAlgorithm value) => Module.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
+ public void SetAlgorithm(PitchDetectorAlgorithm value) => ModuleHandle.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
///
/// Original name: Alg1-2 Sample rate (Hz)
/// Possible values: Hz12000, Hz24000, Hz44100
///
- public PitchDetectorAlgSampleRate GetAlgSampleRateHz() => (PitchDetectorAlgSampleRate)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public PitchDetectorAlgSampleRate GetAlgSampleRateHz() => (PitchDetectorAlgSampleRate)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Alg1-2 Sample rate (Hz)
/// Possible values: Hz12000, Hz24000, Hz44100
///
- public void SetAlgSampleRateHz(PitchDetectorAlgSampleRate value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetAlgSampleRateHz(PitchDetectorAlgSampleRate value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Detector finetune
/// Value range: -256 to 256
///
- public int GetDetectorFinetune() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetDetectorFinetune() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Detector finetune
/// Value range: -256 to 256
///
- public void SetDetectorFinetune(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetDetectorFinetune(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: 0 to 256
///
- public int GetGain() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetGain() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: 0 to 256
///
- public void SetGain(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetGain(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: LP filter freq (0 - OFF)
/// Value range: 0 to 4000
///
- public int GetLPFilterFreq() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetLPFilterFreq() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: LP filter freq (0 - OFF)
/// Value range: 0 to 4000
///
- public void SetLPFilterFreq(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetLPFilterFreq(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: LP filter roll-off
/// Possible values: dB12, dB24, dB36, dB48
///
- public FilterRollOff GetLPFilterRollOff() => (FilterRollOff)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public FilterRollOff GetLPFilterRollOff() => (FilterRollOff)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: LP filter roll-off
/// Possible values: dB12, dB24, dB36, dB48
///
- public void SetLPFilterRollOff(FilterRollOff value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetLPFilterRollOff(FilterRollOff value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Microtones
/// Possible values: Off, On
///
- public Toggle GetMicrotones() => (Toggle)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public Toggle GetMicrotones() => (Toggle)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Microtones
/// Possible values: Off, On
///
- public void SetMicrotones(Toggle value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetMicrotones(Toggle value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: Record notes
/// Possible values: Off, On
///
- public Toggle GetRecordNotes() => (Toggle)Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public Toggle GetRecordNotes() => (Toggle)ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: Record notes
/// Possible values: Off, On
///
- public void SetRecordNotes(Toggle value) => Module.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
+ public void SetRecordNotes(Toggle value) => ModuleHandle.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
///
/// Original name: Threshold
/// Value range: 0 to 10000
///
- public int GetThreshold() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetThreshold() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Threshold
/// Value range: 0 to 10000
///
- public void SetThreshold(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetThreshold(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct PitchShifterModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public PitchShifterModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -6602,96 +6602,96 @@ public PitchShifterModuleHandle(ModuleHandle module)
/// Original name: Bypass if pitch=0
/// Possible values: Off, SlowTransition, FastTransition
///
- public PitchShifterBypassMode GetBypassIfPitchZero() => (PitchShifterBypassMode)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public PitchShifterBypassMode GetBypassIfPitchZero() => (PitchShifterBypassMode)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Bypass if pitch=0
/// Possible values: Off, SlowTransition, FastTransition
///
- public void SetBypassIfPitchZero(PitchShifterBypassMode value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetBypassIfPitchZero(PitchShifterBypassMode value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public int GetFeedback() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetFeedback() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public void SetFeedback(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetFeedback(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Grain size
/// Value range: 0 to 256
///
- public int GetGrainSize() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetGrainSize() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Grain size
/// Value range: 0 to 256
///
- public void SetGrainSize(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetGrainSize(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public Quality GetMode() => (Quality)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public Quality GetMode() => (Quality)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public void SetMode(Quality value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetMode(Quality value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Pitch
/// Value range: -600 to 600
///
- public int GetPitch() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetPitch() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Pitch
/// Value range: -600 to 600
///
- public void SetPitch(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetPitch(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Pitch scale
/// Value range: 0 to 200
///
- public int GetPitchScale() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetPitchScale() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Pitch scale
/// Value range: 0 to 200
///
- public void SetPitchScale(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetPitchScale(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct PitchToControlModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public PitchToControlModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -6701,96 +6701,96 @@ public PitchToControlModuleHandle(ModuleHandle module)
/// Original name: First note
/// Value range: 0 to 256
///
- public int GetFirstNote() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetFirstNote() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: First note
/// Value range: 0 to 256
///
- public void SetFirstNote(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetFirstNote(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: FrequencyHz, Pitch
///
- public PitchToControlMode GetMode() => (PitchToControlMode)Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public PitchToControlMode GetMode() => (PitchToControlMode)ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: FrequencyHz, Pitch
///
- public void SetMode(PitchToControlMode value) => Module.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
+ public void SetMode(PitchToControlMode value) => ModuleHandle.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
///
/// Original name: On NoteOFF
/// Possible values: DoNothing, PitchDown, PitchUp
///
- public PitchToControlOnNoteOff GetOnNoteOff() => (PitchToControlOnNoteOff)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public PitchToControlOnNoteOff GetOnNoteOff() => (PitchToControlOnNoteOff)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: On NoteOFF
/// Possible values: DoNothing, PitchDown, PitchUp
///
- public void SetOnNoteOff(PitchToControlOnNoteOff value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetOnNoteOff(PitchToControlOnNoteOff value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: OUT controller
/// Value range: 0 to 255
///
- public int GetOUTController() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetOUTController() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: OUT controller
/// Value range: 0 to 255
///
- public void SetOUTController(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetOUTController(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: OUT max
/// Value range: 0 to 32768
///
- public int GetOUTMax() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetOUTMax() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: OUT max
/// Value range: 0 to 32768
///
- public void SetOUTMax(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetOUTMax(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: OUT min
/// Value range: 0 to 32768
///
- public int GetOUTMin() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetOUTMin() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: OUT min
/// Value range: 0 to 32768
///
- public void SetOUTMin(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetOUTMin(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Range (number of semitones)
/// Value range: 0 to 256
///
- public int GetRangeNumberOfSemitones() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetRangeNumberOfSemitones() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Range (number of semitones)
/// Value range: 0 to 256
///
- public void SetRangeNumberOfSemitones(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetRangeNumberOfSemitones(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct ReverbModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public ReverbModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -6800,142 +6800,142 @@ public ReverbModuleHandle(ModuleHandle module)
/// Original name: All-pass filter
/// Possible values: Off, On
///
- public Toggle GetAllPassFilter() => (Toggle)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public Toggle GetAllPassFilter() => (Toggle)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: All-pass filter
/// Possible values: Off, On
///
- public void SetAllPassFilter(Toggle value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetAllPassFilter(Toggle value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Damp
/// Value range: 0 to 256
///
- public int GetDamp() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetDamp() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Damp
/// Value range: 0 to 256
///
- public void SetDamp(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetDamp(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 256
///
- public int GetDry() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetDry() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Dry
/// Value range: 0 to 256
///
- public void SetDry(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetDry(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public int GetFeedback() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetFeedback() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Feedback
/// Value range: 0 to 256
///
- public void SetFeedback(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetFeedback(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Freeze
/// Possible values: Off, On
///
- public Toggle GetFreeze() => (Toggle)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public Toggle GetFreeze() => (Toggle)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Freeze
/// Possible values: Off, On
///
- public void SetFreeze(Toggle value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetFreeze(Toggle value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public Quality GetMode() => (Quality)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Quality GetMode() => (Quality)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public void SetMode(Quality value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetMode(Quality value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Random seed
/// Value range: 0 to 32768
///
- public int GetRandomSeed() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetRandomSeed() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Random seed
/// Value range: 0 to 32768
///
- public void SetRandomSeed(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetRandomSeed(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: Room size
/// Value range: 0 to 128
///
- public int GetRoomSize() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetRoomSize() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Room size
/// Value range: 0 to 128
///
- public void SetRoomSize(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetRoomSize(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Stereo width
/// Value range: 0 to 256
///
- public int GetStereoWidth() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetStereoWidth() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Stereo width
/// Value range: 0 to 256
///
- public void SetStereoWidth(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetStereoWidth(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 256
///
- public int GetWet() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetWet() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Wet
/// Value range: 0 to 256
///
- public void SetWet(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetWet(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct SamplerModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public SamplerModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
#region module type-specific methods
///
- public void LoadSample(byte[] data, int sampleSlot = -1) => Module.LoadSamplerSample(data, sampleSlot);
+ public void LoadSample(byte[] data, int sampleSlot = -1) => ModuleHandle.LoadSamplerSample(data, sampleSlot);
///
- public void LoadSample(string path, int sampleSlot = -1) => Module.LoadSamplerSample(path, sampleSlot);
+ public void LoadSample(string path, int sampleSlot = -1) => ModuleHandle.LoadSamplerSample(path, sampleSlot);
#endregion module type-specific methods
@@ -6945,84 +6945,84 @@ public SamplerModuleHandle(ModuleHandle module)
/// Original name: Envelope interpolation
/// Possible values: Off, Linear
///
- public SamplerEnvelopeInterpolation GetEnvelopeInterpolation() => (SamplerEnvelopeInterpolation)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public SamplerEnvelopeInterpolation GetEnvelopeInterpolation() => (SamplerEnvelopeInterpolation)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Envelope interpolation
/// Possible values: Off, Linear
///
- public void SetEnvelopeInterpolation(SamplerEnvelopeInterpolation value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetEnvelopeInterpolation(SamplerEnvelopeInterpolation value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public int GetPolyphony() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public void SetPolyphony(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Rec threshold
/// Value range: 0 to 10000
///
- public int GetRecThreshold() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetRecThreshold() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Rec threshold
/// Value range: 0 to 10000
///
- public void SetRecThreshold(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetRecThreshold(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Sample interpolation
/// Possible values: Off, Linear, Spline
///
- public SamplerInterpolation GetSampleInterpolation() => (SamplerInterpolation)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public SamplerInterpolation GetSampleInterpolation() => (SamplerInterpolation)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Sample interpolation
/// Possible values: Off, Linear, Spline
///
- public void SetSampleInterpolation(SamplerInterpolation value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetSampleInterpolation(SamplerInterpolation value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct SoundToControlModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public SoundToControlModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -7032,120 +7032,120 @@ public SoundToControlModuleHandle(ModuleHandle module)
/// Original name: Absolute
/// Possible values: Off, On
///
- public Toggle GetAbsolute() => (Toggle)Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public Toggle GetAbsolute() => (Toggle)ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Absolute
/// Possible values: Off, On
///
- public void SetAbsolute(Toggle value) => Module.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
+ public void SetAbsolute(Toggle value) => ModuleHandle.SetControllerValue(2, (int)value, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public ChannelsInverted GetChannels() => (ChannelsInverted)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public ChannelsInverted GetChannels() => (ChannelsInverted)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Mono, Stereo
///
- public void SetChannels(ChannelsInverted value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(ChannelsInverted value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: 0 to 1024
///
- public int GetGain() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetGain() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Gain
/// Value range: 0 to 1024
///
- public void SetGain(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetGain(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: LQ, HQ
///
- public SoundToControlMode GetMode() => (SoundToControlMode)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public SoundToControlMode GetMode() => (SoundToControlMode)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: LQ, HQ
///
- public void SetMode(SoundToControlMode value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetMode(SoundToControlMode value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: OUT controller
/// Value range: 0 to 255
///
- public int GetOUTController() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetOUTController() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: OUT controller
/// Value range: 0 to 255
///
- public void SetOUTController(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetOUTController(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: OUT max
/// Value range: 0 to 32768
///
- public int GetOutMax() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetOutMax() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: OUT max
/// Value range: 0 to 32768
///
- public void SetOutMax(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetOutMax(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: OUT min
/// Value range: 0 to 32768
///
- public int GetOutMin() => Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public int GetOutMin() => ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: OUT min
/// Value range: 0 to 32768
///
- public void SetOutMin(int value) => Module.SetControllerValue(6, value, ValueScalingType.Displayed);
+ public void SetOutMin(int value) => ModuleHandle.SetControllerValue(6, value, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Value range: 1 to 32768
///
- public int GetSampleRate() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetSampleRate() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Sample rate
/// Value range: 1 to 32768
///
- public void SetSampleRate(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetSampleRate(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Smooth
/// Value range: 0 to 256
///
- public int GetSmooth() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetSmooth() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Smooth
/// Value range: 0 to 256
///
- public void SetSmooth(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetSmooth(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct SpectraVoiceModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public SpectraVoiceModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -7155,168 +7155,168 @@ public SpectraVoiceModuleHandle(ModuleHandle module)
/// Original name: Attack
/// Value range: 0 to 512
///
- public int GetAttack() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetAttack() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Attack
/// Value range: 0 to 512
///
- public void SetAttack(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetAttack(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Harmonic
/// Value range: 0 to 15
///
- public int GetHarmonic() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetHarmonic() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Harmonic
/// Value range: 0 to 15
///
- public void SetHarmonic(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetHarmonic(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: H.freq
/// Value range: 0 to 22050
///
- public int GetHarmonicFreq() => Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public int GetHarmonicFreq() => ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: H.freq
/// Value range: 0 to 22050
///
- public void SetHarmonicFreq(int value) => Module.SetControllerValue(9, value, ValueScalingType.Displayed);
+ public void SetHarmonicFreq(int value) => ModuleHandle.SetControllerValue(9, value, ValueScalingType.Displayed);
///
/// Original name: H.type
/// Possible values: Hsin, Rect, Org1, Org2, Org3, Org4, Sin, Random, Triangle1, Triangle2, Overtones1, Overtones2, Overtones3, Overtones4, Overtones1Plus, Overtones2Plus, Overtones3Plus, Overtones4Plus, Metal
///
- public SpectraVoiceHarmonicType GetHarmonicType() => (SpectraVoiceHarmonicType)Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public SpectraVoiceHarmonicType GetHarmonicType() => (SpectraVoiceHarmonicType)ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: H.type
/// Possible values: Hsin, Rect, Org1, Org2, Org3, Org4, Sin, Random, Triangle1, Triangle2, Overtones1, Overtones2, Overtones3, Overtones4, Overtones1Plus, Overtones2Plus, Overtones3Plus, Overtones4Plus, Metal
///
- public void SetHarmonicType(SpectraVoiceHarmonicType value) => Module.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
+ public void SetHarmonicType(SpectraVoiceHarmonicType value) => ModuleHandle.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
///
/// Original name: H.volume
/// Value range: 0 to 255
///
- public int GetHarmonicVolume() => Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public int GetHarmonicVolume() => ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: H.volume
/// Value range: 0 to 255
///
- public void SetHarmonicVolume(int value) => Module.SetControllerValue(10, value, ValueScalingType.Displayed);
+ public void SetHarmonicVolume(int value) => ModuleHandle.SetControllerValue(10, value, ValueScalingType.Displayed);
///
/// Original name: H.width
/// Value range: 0 to 255
///
- public int GetHarmonicWidth() => Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public int GetHarmonicWidth() => ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: H.width
/// Value range: 0 to 255
///
- public void SetHarmonicWidth(int value) => Module.SetControllerValue(11, value, ValueScalingType.Displayed);
+ public void SetHarmonicWidth(int value) => ModuleHandle.SetControllerValue(11, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono, HQSpline
///
- public SpectraVoiceMode GetMode() => (SpectraVoiceMode)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public SpectraVoiceMode GetMode() => (SpectraVoiceMode)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono, HQSpline
///
- public void SetMode(SpectraVoiceMode value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetMode(SpectraVoiceMode value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public int GetPanning() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetPanning() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Panning
/// Value range: -128 to 128
///
- public void SetPanning(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetPanning(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public int GetPolyphony() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 32
///
- public void SetPolyphony(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 512
///
- public int GetRelease() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetRelease() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Release
/// Value range: 0 to 512
///
- public void SetRelease(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetRelease(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Spectrum resolution
/// Possible values: Size4096, Size8192, Size16384, Size32768, Size65536, Size131072
///
- public SpectraVoiceResolution GetSpectrumResolution() => (SpectraVoiceResolution)Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public SpectraVoiceResolution GetSpectrumResolution() => (SpectraVoiceResolution)ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Spectrum resolution
/// Possible values: Size4096, Size8192, Size16384, Size32768, Size65536, Size131072
///
- public void SetSpectrumResolution(SpectraVoiceResolution value) => Module.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
+ public void SetSpectrumResolution(SpectraVoiceResolution value) => ModuleHandle.SetControllerValue(7, (int)value, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On
///
- public Toggle GetSustain() => (Toggle)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Toggle GetSustain() => (Toggle)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Sustain
/// Possible values: Off, On
///
- public void SetSustain(Toggle value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetSustain(Toggle value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct VelocityToControlModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public VelocityToControlModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -7326,72 +7326,72 @@ public VelocityToControlModuleHandle(ModuleHandle module)
/// Original name: On NoteOFF
/// Possible values: DoNothing, VelocityDown, VelocityUp
///
- public VelocityToControlOnNoteOff GetOnNoteOff() => (VelocityToControlOnNoteOff)Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public VelocityToControlOnNoteOff GetOnNoteOff() => (VelocityToControlOnNoteOff)ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: On NoteOFF
/// Possible values: DoNothing, VelocityDown, VelocityUp
///
- public void SetOnNoteOff(VelocityToControlOnNoteOff value) => Module.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
+ public void SetOnNoteOff(VelocityToControlOnNoteOff value) => ModuleHandle.SetControllerValue(0, (int)value, ValueScalingType.Displayed);
///
/// Original name: OUT controller
/// Value range: 0 to 255
///
- public int GetOutController() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetOutController() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: OUT controller
/// Value range: 0 to 255
///
- public void SetOutController(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetOutController(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: OUT max
/// Value range: 0 to 32768
///
- public int GetOutMax() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetOutMax() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: OUT max
/// Value range: 0 to 32768
///
- public void SetOutMax(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetOutMax(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: OUT min
/// Value range: 0 to 32768
///
- public int GetOutMin() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetOutMin() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: OUT min
/// Value range: 0 to 32768
///
- public void SetOutMin(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetOutMin(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: OUT offset
/// Value range: -16384 to 16384
///
- public int GetOutOffset() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetOutOffset() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: OUT offset
/// Value range: -16384 to 16384
///
- public void SetOutOffset(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetOutOffset(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct VibratoModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public VibratoModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -7401,96 +7401,96 @@ public VibratoModuleHandle(ModuleHandle module)
/// Original name: Amplitude
/// Value range: 0 to 256
///
- public int GetAmplitude() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetAmplitude() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Amplitude
/// Value range: 0 to 256
///
- public void SetAmplitude(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetAmplitude(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
///
/// Original name: Exponential amplitude
/// Possible values: Off, On
///
- public Toggle GetExponentialAmplitude() => (Toggle)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Toggle GetExponentialAmplitude() => (Toggle)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Exponential amplitude
/// Possible values: Off, On
///
- public void SetExponentialAmplitude(Toggle value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetExponentialAmplitude(Toggle value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 1 to 2048
///
- public int GetFreq() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetFreq() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Freq
/// Value range: 1 to 2048
///
- public void SetFreq(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetFreq(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Frequency unit
/// Possible values: HzDividedBy64, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public VibratoFrequencyUnit GetFrequencyUnit() => (VibratoFrequencyUnit)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public VibratoFrequencyUnit GetFrequencyUnit() => (VibratoFrequencyUnit)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Frequency unit
/// Possible values: HzDividedBy64, Millisecond, Hz, Tick, Line, HalfLine, OneThirdLine
///
- public void SetFrequencyUnit(VibratoFrequencyUnit value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetFrequencyUnit(VibratoFrequencyUnit value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Set phase
/// Value range: 0 to 256
///
- public int GetSetPhase() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetSetPhase() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Set phase
/// Value range: 0 to 256
///
- public void SetSetPhase(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetSetPhase(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 256
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct VocalFilterModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public VocalFilterModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -7500,190 +7500,190 @@ public VocalFilterModuleHandle(ModuleHandle module)
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public Channels GetChannels() => (Channels)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Channels GetChannels() => (Channels)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Channels
/// Possible values: Stereo, Mono
///
- public void SetChannels(Channels value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetChannels(Channels value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Formants
/// Value range: 1 to 5
///
- public int GetFormants() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetFormants() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Formants
/// Value range: 1 to 5
///
- public void SetFormants(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetFormants(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Formant width
/// Value range: 0 to 256
///
- public int GetFormantWidth() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetFormantWidth() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Formant width
/// Value range: 0 to 256
///
- public void SetFormantWidth(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetFormantWidth(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Intensity
/// Value range: 0 to 256
///
- public int GetIntensity() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetIntensity() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Intensity
/// Value range: 0 to 256
///
- public void SetIntensity(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetIntensity(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Random frequency
/// Value range: 0 to 1024
///
- public int GetRandomFrequency() => Module.GetControllerValue(7, ValueScalingType.Displayed);
+ public int GetRandomFrequency() => ModuleHandle.GetControllerValue(7, ValueScalingType.Displayed);
///
/// Original name: Random frequency
/// Value range: 0 to 1024
///
- public void SetRandomFrequency(int value) => Module.SetControllerValue(7, value, ValueScalingType.Displayed);
+ public void SetRandomFrequency(int value) => ModuleHandle.SetControllerValue(7, value, ValueScalingType.Displayed);
///
/// Original name: Random seed
/// Value range: 0 to 32768
///
- public int GetRandomSeed() => Module.GetControllerValue(8, ValueScalingType.Displayed);
+ public int GetRandomSeed() => ModuleHandle.GetControllerValue(8, ValueScalingType.Displayed);
///
/// Original name: Random seed
/// Value range: 0 to 32768
///
- public void SetRandomSeed(int value) => Module.SetControllerValue(8, value, ValueScalingType.Displayed);
+ public void SetRandomSeed(int value) => ModuleHandle.SetControllerValue(8, value, ValueScalingType.Displayed);
///
/// Original name: Voice type
/// Possible values: Soprano, Alto, Tenor, Bass
///
- public VocalFilterVoiceType GetVoiceType() => (VocalFilterVoiceType)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public VocalFilterVoiceType GetVoiceType() => (VocalFilterVoiceType)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Voice type
/// Possible values: Soprano, Alto, Tenor, Bass
///
- public void SetVoiceType(VocalFilterVoiceType value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetVoiceType(VocalFilterVoiceType value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Vowel (a,e,i,o,u)
/// Value range: 0 to 256
///
- public int GetVowel() => Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public int GetVowel() => ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Vowel (a,e,i,o,u)
/// Value range: 0 to 256
///
- public void SetVowel(int value) => Module.SetControllerValue(4, value, ValueScalingType.Displayed);
+ public void SetVowel(int value) => ModuleHandle.SetControllerValue(4, value, ValueScalingType.Displayed);
///
/// Original name: Vowel1
/// Possible values: A, E, I, O, U
///
- public VocalFilterVowel GetVowel1() => (VocalFilterVowel)Module.GetControllerValue(9, ValueScalingType.Displayed);
+ public VocalFilterVowel GetVowel1() => (VocalFilterVowel)ModuleHandle.GetControllerValue(9, ValueScalingType.Displayed);
///
/// Original name: Vowel1
/// Possible values: A, E, I, O, U
///
- public void SetVowel1(VocalFilterVowel value) => Module.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
+ public void SetVowel1(VocalFilterVowel value) => ModuleHandle.SetControllerValue(9, (int)value, ValueScalingType.Displayed);
///
/// Original name: Vowel2
/// Possible values: A, E, I, O, U
///
- public VocalFilterVowel GetVowel2() => (VocalFilterVowel)Module.GetControllerValue(10, ValueScalingType.Displayed);
+ public VocalFilterVowel GetVowel2() => (VocalFilterVowel)ModuleHandle.GetControllerValue(10, ValueScalingType.Displayed);
///
/// Original name: Vowel2
/// Possible values: A, E, I, O, U
///
- public void SetVowel2(VocalFilterVowel value) => Module.SetControllerValue(10, (int)value, ValueScalingType.Displayed);
+ public void SetVowel2(VocalFilterVowel value) => ModuleHandle.SetControllerValue(10, (int)value, ValueScalingType.Displayed);
///
/// Original name: Vowel3
/// Possible values: A, E, I, O, U
///
- public VocalFilterVowel GetVowel3() => (VocalFilterVowel)Module.GetControllerValue(11, ValueScalingType.Displayed);
+ public VocalFilterVowel GetVowel3() => (VocalFilterVowel)ModuleHandle.GetControllerValue(11, ValueScalingType.Displayed);
///
/// Original name: Vowel3
/// Possible values: A, E, I, O, U
///
- public void SetVowel3(VocalFilterVowel value) => Module.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
+ public void SetVowel3(VocalFilterVowel value) => ModuleHandle.SetControllerValue(11, (int)value, ValueScalingType.Displayed);
///
/// Original name: Vowel4
/// Possible values: A, E, I, O, U
///
- public VocalFilterVowel GetVowel4() => (VocalFilterVowel)Module.GetControllerValue(12, ValueScalingType.Displayed);
+ public VocalFilterVowel GetVowel4() => (VocalFilterVowel)ModuleHandle.GetControllerValue(12, ValueScalingType.Displayed);
///
/// Original name: Vowel4
/// Possible values: A, E, I, O, U
///
- public void SetVowel4(VocalFilterVowel value) => Module.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
+ public void SetVowel4(VocalFilterVowel value) => ModuleHandle.SetControllerValue(12, (int)value, ValueScalingType.Displayed);
///
/// Original name: Vowel5
/// Possible values: A, E, I, O, U
///
- public VocalFilterVowel GetVowel5() => (VocalFilterVowel)Module.GetControllerValue(13, ValueScalingType.Displayed);
+ public VocalFilterVowel GetVowel5() => (VocalFilterVowel)ModuleHandle.GetControllerValue(13, ValueScalingType.Displayed);
///
/// Original name: Vowel5
/// Possible values: A, E, I, O, U
///
- public void SetVowel5(VocalFilterVowel value) => Module.SetControllerValue(13, (int)value, ValueScalingType.Displayed);
+ public void SetVowel5(VocalFilterVowel value) => ModuleHandle.SetControllerValue(13, (int)value, ValueScalingType.Displayed);
#endregion controllers
}
public struct VorbisPlayerModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public VorbisPlayerModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
#region module type-specific methods
///
- public void LoadVorbis(string path) => Module.LoadIntoVorbisPLayer(path);
+ public void LoadVorbis(string path) => ModuleHandle.LoadIntoVorbisPLayer(path);
///
- public void LoadIntoVorbisPLayer(byte[] data) => Module.LoadIntoVorbisPLayer(data);
+ public void LoadIntoVorbisPLayer(byte[] data) => ModuleHandle.LoadIntoVorbisPLayer(data);
#endregion module type-specific methods
@@ -7693,96 +7693,96 @@ public VorbisPlayerModuleHandle(ModuleHandle module)
/// Original name: Finetune
/// Value range: -128 to 128
///
- public int GetFinetune() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetFinetune() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Finetune
/// Value range: -128 to 128
///
- public void SetFinetune(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetFinetune(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Interpolation
/// Possible values: Off, On
///
- public Toggle GetInterpolation() => (Toggle)Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public Toggle GetInterpolation() => (Toggle)ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Interpolation
/// Possible values: Off, On
///
- public void SetInterpolation(Toggle value) => Module.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
+ public void SetInterpolation(Toggle value) => ModuleHandle.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
///
/// Original name: Original speed
/// Possible values: Off, On
///
- public Toggle GetOriginalSpeed() => (Toggle)Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public Toggle GetOriginalSpeed() => (Toggle)ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Original speed
/// Possible values: Off, On
///
- public void SetOriginalSpeed(Toggle value) => Module.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
+ public void SetOriginalSpeed(Toggle value) => ModuleHandle.SetControllerValue(1, (int)value, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 4
///
- public int GetPolyphony() => Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public int GetPolyphony() => ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: Polyphony
/// Value range: 1 to 4
///
- public void SetPolyphony(int value) => Module.SetControllerValue(5, value, ValueScalingType.Displayed);
+ public void SetPolyphony(int value) => ModuleHandle.SetControllerValue(5, value, ValueScalingType.Displayed);
///
/// Original name: Repeat
/// Possible values: Off, On
///
- public Toggle GetRepeat() => (Toggle)Module.GetControllerValue(6, ValueScalingType.Displayed);
+ public Toggle GetRepeat() => (Toggle)ModuleHandle.GetControllerValue(6, ValueScalingType.Displayed);
///
/// Original name: Repeat
/// Possible values: Off, On
///
- public void SetRepeat(Toggle value) => Module.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
+ public void SetRepeat(Toggle value) => ModuleHandle.SetControllerValue(6, (int)value, ValueScalingType.Displayed);
///
/// Original name: Transpose
/// Value range: -128 to 128
///
- public int GetTranspose() => Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public int GetTranspose() => ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Transpose
/// Value range: -128 to 128
///
- public void SetTranspose(int value) => Module.SetControllerValue(3, value, ValueScalingType.Displayed);
+ public void SetTranspose(int value) => ModuleHandle.SetControllerValue(3, value, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public int GetVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Volume
/// Value range: 0 to 512
///
- public void SetVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
#endregion controllers
}
public struct WaveShaperModuleHandle : IModuleHandleWrapper
{
- public ModuleHandle Module { get; private set; }
+ public ModuleHandle ModuleHandle { get; private set; }
public WaveShaperModuleHandle(ModuleHandle module)
{
- Module = module;
+ ModuleHandle = module;
}
@@ -7792,73 +7792,73 @@ public WaveShaperModuleHandle(ModuleHandle module)
/// Original name: DC blocker
/// Possible values: Off, On
///
- public Toggle GetDCBlocker() => (Toggle)Module.GetControllerValue(5, ValueScalingType.Displayed);
+ public Toggle GetDCBlocker() => (Toggle)ModuleHandle.GetControllerValue(5, ValueScalingType.Displayed);
///
/// Original name: DC blocker
/// Possible values: Off, On
///
- public void SetDCBlocker(Toggle value) => Module.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
+ public void SetDCBlocker(Toggle value) => ModuleHandle.SetControllerValue(5, (int)value, ValueScalingType.Displayed);
///
/// Original name: Input volume
/// Value range: 0 to 512
///
- public int GetInputVolume() => Module.GetControllerValue(0, ValueScalingType.Displayed);
+ public int GetInputVolume() => ModuleHandle.GetControllerValue(0, ValueScalingType.Displayed);
///
/// Original name: Input volume
/// Value range: 0 to 512
///
- public void SetInputVolume(int value) => Module.SetControllerValue(0, value, ValueScalingType.Displayed);
+ public void SetInputVolume(int value) => ModuleHandle.SetControllerValue(0, value, ValueScalingType.Displayed);
///
/// Original name: Mix
/// Value range: 0 to 256
///
- public int GetMix() => Module.GetControllerValue(1, ValueScalingType.Displayed);
+ public int GetMix() => ModuleHandle.GetControllerValue(1, ValueScalingType.Displayed);
///
/// Original name: Mix
/// Value range: 0 to 256
///
- public void SetMix(int value) => Module.SetControllerValue(1, value, ValueScalingType.Displayed);
+ public void SetMix(int value) => ModuleHandle.SetControllerValue(1, value, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public Quality GetMode() => (Quality)Module.GetControllerValue(4, ValueScalingType.Displayed);
+ public Quality GetMode() => (Quality)ModuleHandle.GetControllerValue(4, ValueScalingType.Displayed);
///
/// Original name: Mode
/// Possible values: HQ, HQMono, LQ, LQMono
///
- public void SetMode(Quality value) => Module.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
+ public void SetMode(Quality value) => ModuleHandle.SetControllerValue(4, (int)value, ValueScalingType.Displayed);
///
/// Original name: Output volume
/// Value range: 0 to 512
///
- public int GetOutputVolume() => Module.GetControllerValue(2, ValueScalingType.Displayed);
+ public int GetOutputVolume() => ModuleHandle.GetControllerValue(2, ValueScalingType.Displayed);
///
/// Original name: Output volume
/// Value range: 0 to 512
///
- public void SetOutputVolume(int value) => Module.SetControllerValue(2, value, ValueScalingType.Displayed);
+ public void SetOutputVolume(int value) => ModuleHandle.SetControllerValue(2, value, ValueScalingType.Displayed);
///
/// Original name: Symmetric
/// Possible values: Off, On
///
- public Toggle GetSymmetric() => (Toggle)Module.GetControllerValue(3, ValueScalingType.Displayed);
+ public Toggle GetSymmetric() => (Toggle)ModuleHandle.GetControllerValue(3, ValueScalingType.Displayed);
///
/// Original name: Symmetric
/// Possible values: Off, On
///
- public void SetSymmetric(Toggle value) => Module.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
+ public void SetSymmetric(Toggle value) => ModuleHandle.SetControllerValue(3, (int)value, ValueScalingType.Displayed);
#endregion controllers
@@ -7874,7 +7874,7 @@ public void ReadCurve(float[] buffer)
if (buffer.Length < 256)
throw new System.ArgumentException("Buffer must be at least of size 256");
- Module.ReadCurve(0, buffer);
+ ModuleHandle.ReadCurve(0, buffer);
}
///
@@ -7887,7 +7887,7 @@ public void WriteCurve(float[] buffer)
if (buffer.Length < 256)
throw new System.ArgumentException("Buffer must be at least of size 256");
- Module.WriteCurve(0, buffer);
+ ModuleHandle.WriteCurve(0, buffer);
}
#endregion curves
diff --git a/SunSharp/ObjectWrapper/PatternHandle.cs b/SunSharp/ObjectWrapper/PatternHandle.cs
index 8a88e41..ceae3fb 100644
--- a/SunSharp/ObjectWrapper/PatternHandle.cs
+++ b/SunSharp/ObjectWrapper/PatternHandle.cs
@@ -1,7 +1,4 @@
using SunSharp.ThinWrapper;
-using System;
-using System.Diagnostics;
-using System.Xml.Linq;
namespace SunSharp.ObjectWrapper
{
@@ -29,7 +26,7 @@ public PatternHandle(Timeline timeline, int id)
public bool GetExists() => _lib.GetPatternExists(_slotId, _id);
- public string GetName() => _lib.GetPatternName(_slotId, _id);
+ public string? GetName() => _lib.GetPatternName(_slotId, _id);
public void SetName(string name)
{
@@ -66,34 +63,35 @@ public void Resize(int? tracks = null, int? lines = null)
_slot.RunInLock(() => lib.SetPatternSize(slotId, id, tracks, lines));
}
- public PatternEvent[] GetData()
+ public PatternEvent[]? GetData()
{
- int slotId = _slotId;
- int id = _id;
+ var slotId = _slotId;
+ var id = _id;
var lib = _lib;
- return _slot.RunInLock(() =>
- {
- return lib.GetPatternData(slotId, id);
- });
+ return _slot.RunInLock(() => lib.GetPatternData(slotId, id));
}
- public PatternEvent[,] GetData2D()
+ public PatternEvent[,]? GetData2D()
{
- int slotId = _slotId;
- int id = _id;
+ var slotId = _slotId;
+ var id = _id;
var lib = _lib;
- var (data, tracks, lines) = _slot.RunInLock(() => {
- var _data = lib.GetPatternData(slotId, id);
- int _tracks = lib.GetPatternTracks(slotId, id);
- var _lines = lib.GetPatternLines(slotId, id);
- return (_data, _tracks, _lines);
+ var (data, tracks, lines) = _slot.RunInLock(() =>
+ {
+ var data = lib.GetPatternData(slotId, id);
+ var tracks = lib.GetPatternTracks(slotId, id);
+ var lines = lib.GetPatternLines(slotId, id);
+ return (_data: data, _tracks: tracks, _lines: lines);
});
+ if (data == null)
+ return null;
+
var newData = new PatternEvent[lines, tracks];
- for (int l = 0; l < lines; l++)
- for (int t = 0; t < tracks; t++)
- newData[l, t] = data[l * tracks + t];
+ for (var l = 0; l < lines; l++)
+ for (var t = 0; t < tracks; t++)
+ newData[l, t] = data[l * tracks + t];
return newData;
}
@@ -103,10 +101,7 @@ public void SetData(PatternEvent[] data)
var slotId = _slotId;
var id = _id;
var lib = _lib;
- _slot.RunInLock(() =>
- {
- lib.SetPatternData(slotId, id, data);
- });
+ _slot.RunInLock(() => { lib.SetPatternData(slotId, id, data); });
}
public void SetData2D(PatternEvent[,] data)
@@ -120,23 +115,17 @@ public void SetData2D(PatternEvent[,] data)
var newData = new PatternEvent[inputLines * inputTracks];
for (int l = 0; l < inputLines; l++)
- for (int t = 0; t < inputTracks; t++)
- newData[l * inputTracks + t] = data[l, t];
+ for (int t = 0; t < inputTracks; t++)
+ newData[l * inputTracks + t] = data[l, t];
- _slot.RunInLock(() =>
- {
- lib.SetPatternData(slotId, id, newData);
- });
+ _slot.RunInLock(() => { lib.SetPatternData(slotId, id, newData); });
}
public void SetMute(int id, bool mute)
{
var lib = _lib;
var slotId = _id;
- _slot.RunInLock(() =>
- {
- lib.SetPatternMute(slotId, id, mute);
- });
+ _slot.RunInLock(() => { lib.SetPatternMute(slotId, id, mute); });
}
public bool GetMute(int id)
@@ -156,10 +145,7 @@ public void SetEvent(int track, int line, PatternEvent @event)
var lib = _lib;
var slotId = _id;
var id = _id;
- _slot.RunInLock(() =>
- {
- lib.SetPatternEvent(slotId, id, track, line, @event);
- });
+ _slot.RunInLock(() => { lib.SetPatternEvent(slotId, id, track, line, @event); });
}
public void SetEvent(int track, int line, int NN, int VV, int MM, int CCEE, int XXYY)
@@ -167,10 +153,7 @@ public void SetEvent(int track, int line, int NN, int VV, int MM, int CCEE, int
var lib = _lib;
var slotId = _id;
var id = _id;
- _slot.RunInLock(() =>
- {
- lib.SetPatternEvent(slotId, id, track, line, NN, VV, MM, CCEE, XXYY);
- });
+ _slot.RunInLock(() => { lib.SetPatternEvent(slotId, id, track, line, NN, VV, MM, CCEE, XXYY); });
}
public int GetEventValue(int track, int line, Column column)
@@ -178,10 +161,7 @@ public int GetEventValue(int track, int line, Column column)
var lib = _lib;
var slotId = _id;
var id = _id;
- return _slot.RunInLock(() =>
- {
- return lib.GetPatternEventValue(slotId, id, track, line, column);
- });
+ return _slot.RunInLock(() => { return lib.GetPatternEventValue(slotId, id, track, line, column); });
}
}
}
diff --git a/SunSharp/ObjectWrapper/Slot.cs b/SunSharp/ObjectWrapper/Slot.cs
index ceeef22..e932c96 100644
--- a/SunSharp/ObjectWrapper/Slot.cs
+++ b/SunSharp/ObjectWrapper/Slot.cs
@@ -1,5 +1,5 @@
-using SunSharp.ThinWrapper;
-using System;
+using System;
+using SunSharp.ThinWrapper;
namespace SunSharp.ObjectWrapper
{
@@ -8,51 +8,43 @@ namespace SunSharp.ObjectWrapper
///
public class Slot
{
- private readonly int _id;
- private readonly ISunVoxLib _lib;
- private readonly SunVox _sunVox;
private readonly Slots _slots;
- private readonly VirtualPattern _virtualPattern;
- private readonly Timeline _timeline;
- private readonly Synthesizer _synthesizer;
- private readonly object _lock;
- public int Id => _id;
+ public int Id { get; }
///
/// Virtual, 16-track pattern for sending events to the engine.
///
- public VirtualPattern VirtualPattern => _virtualPattern;
+ public VirtualPattern VirtualPattern { get; }
///
/// Project timeline, containing all the existing patterns.
///
- public Timeline Timeline => _timeline;
+ public Timeline Timeline { get; }
///
/// Project synthesizer, containing all the existing modules.
///
- public Synthesizer Synthesizer => _synthesizer;
+ public Synthesizer Synthesizer { get; }
- public SunVox SunVox => _sunVox;
+ public SunVox SunVox { get; }
///
/// Underlying library instance.
///
- public ISunVoxLib Library => _lib;
+ public ISunVoxLib Library { get; }
public bool IsOpen { get; private set; }
internal Slot(int id, Slots slots, SunVox sunVox)
{
- _id = id;
- _lock = new object();
+ Id = id;
_slots = slots;
- _sunVox = sunVox;
- _lib = sunVox.Library;
- _virtualPattern = new VirtualPattern(this);
- _timeline = new Timeline(this);
- _synthesizer = new Synthesizer(this);
+ SunVox = sunVox;
+ Library = sunVox.Library;
+ VirtualPattern = new VirtualPattern(this);
+ Timeline = new Timeline(this);
+ Synthesizer = new Synthesizer(this);
}
#region locks
@@ -66,7 +58,7 @@ public void RunInLock(Action action)
if (!IsOpen)
throw new InvalidOperationException("Slot is closed.");
- _lib.RunInLock(_id, action);
+ Library.RunInLock(Id, action);
}
///
@@ -75,12 +67,12 @@ public T RunInLock(Func function)
if (!IsOpen)
throw new InvalidOperationException("Slot is closed.");
- return _lib.RunInLock(_id, function);
+ return Library.RunInLock(Id, function);
}
- protected void Lock() => _lib.LockSlot(_id);
+ protected void Lock() => Library.LockSlot(Id);
- protected void Unlock() => _lib.UnlockSlot(_id);
+ protected void Unlock() => Library.UnlockSlot(Id);
#endregion locks
@@ -92,9 +84,9 @@ public void Open()
{
if (!IsOpen)
{
- _lib.OpenSlot(Id);
+ Library.OpenSlot(Id);
IsOpen = true;
- RunInLock(() => _virtualPattern.ResetEventTiming());
+ RunInLock(() => VirtualPattern.ResetEventTiming());
}
});
}
@@ -106,7 +98,7 @@ public void Close()
if (IsOpen)
{
IsOpen = false;
- _lib.CloseSlot(_id);
+ Library.CloseSlot(Id);
}
});
}
@@ -119,19 +111,19 @@ public void Close()
/// Load a project from file.
///
///
- public void Load(string path) => RunInLock(() => _lib.Load(_id, path));
+ public void Load(string path) => RunInLock(() => Library.Load(Id, path));
///
/// load a project from memory.
///
///
- public void Load(byte[] data) => RunInLock(() => _lib.Load(_id, data));
+ public void Load(byte[] data) => RunInLock(() => Library.Load(Id, data));
///
/// Save a project to file.
///
///
- public void Save(string path) => RunInLock(() => _lib.Save(_id, path));
+ public void Save(string path) => RunInLock(() => Library.Save(Id, path));
#endregion loading, saving
@@ -139,57 +131,57 @@ public void Close()
public void Play()
{
- RunInLock(() => _lib.Play(_id));
+ RunInLock(() => Library.Play(Id));
}
public void PlayFromBeginning()
{
- RunInLock(() => _lib.PlayFromBeginning(_id));
+ RunInLock(() => Library.PlayFromBeginning(Id));
}
public void Stop()
{
- RunInLock(() => _lib.Stop(_id));
+ RunInLock(() => Library.Stop(Id));
}
public void ResumeOnSyncEffect()
{
- RunInLock(() => _lib.ResumeOnSyncEffect(_id));
+ RunInLock(() => Library.ResumeOnSyncEffect(Id));
}
public void PauseAudio()
{
- RunInLock(() => _lib.Pause(_id));
+ RunInLock(() => Library.Pause(Id));
}
public void ResumeAudio()
{
- RunInLock(() => _lib.Resume(_id));
+ RunInLock(() => Library.Resume(Id));
}
public void SetAutostop(bool enable)
{
- RunInLock(() => _lib.SetAutostop(_id, enable));
+ RunInLock(() => Library.SetAutoStop(Id, enable));
}
public bool GetAutostop()
{
- return _lib.GetAutostop(_id);
+ return Library.GetAutostop(Id);
}
public bool IsPlaying()
{
- return _lib.IsPlaying(_id);
+ return Library.IsPlaying(Id);
}
public void Rewind(int lineNumber)
{
- RunInLock(() => _lib.Rewind(_id, lineNumber));
+ RunInLock(() => Library.Rewind(Id, lineNumber));
}
public int GetCurrentLine()
{
- return _lib.GetCurrentLine(_id);
+ return Library.GetCurrentLine(Id);
}
///
@@ -197,12 +189,12 @@ public int GetCurrentLine()
///
public int GetCurrentLineHundreds()
{
- return _lib.GetCurrentLine2(_id);
+ return Library.GetCurrentLine2(Id);
}
public int GetCurrentSignalLevel(AudioChannel channel = AudioChannel.Mono)
{
- return _lib.GetCurrentSignalLevel(_id, (int)channel);
+ return Library.GetCurrentSignalLevel(Id, (int)channel);
}
#endregion playing, stopping
@@ -211,54 +203,54 @@ public int GetCurrentSignalLevel(AudioChannel channel = AudioChannel.Mono)
public int GetVolume()
{
- return _lib.Volume(_id, -1);
+ return Library.Volume(Id, -1);
}
public void SetVolume(int value)
{
- _lib.Volume(_id, value);
+ Library.Volume(Id, value);
}
public int GetSongBpm()
{
- return _lib.GetSongBpm(_id);
+ return Library.GetSongBpm(Id);
}
public void SetSongBpm(int value)
{
var xxyy = (ushort)Math.Min(Math.Max(0, value), 800);
- _virtualPattern.SendEventImmediately(0, new PatternEvent(Effect.SetBpm, xxyy));
+ VirtualPattern.SendEventImmediately(0, new PatternEvent(Effect.SetBpm, xxyy));
}
public int GetSongTpl()
{
- return _lib.GetSongTpl(_id);
+ return Library.GetSongTpl(Id);
}
public void SetSongTpl(int value)
{
var xxyy = (ushort)Math.Min(Math.Max(1, value), 31);
- _virtualPattern.SendEventImmediately(0, new PatternEvent(Effect.SetPlayingSpeed, xxyy));
+ VirtualPattern.SendEventImmediately(0, new PatternEvent(Effect.SetPlayingSpeed, xxyy));
}
public int GetSongLengthInLines()
{
- return _lib.GetSongLengthInLines(_id);
+ return Library.GetSongLengthInLines(Id);
}
public int GetSongLengthInFrames()
{
- return _lib.GetSongLengthInFrames(_id);
+ return Library.GetSongLengthInFrames(Id);
}
- public string GetSongName()
+ public string? GetSongName()
{
- return _lib.GetSongName(_id);
+ return Library.GetSongName(Id);
}
public void SetSongName(string name)
{
- _lib.SetSongName(_id, name);
+ Library.SetSongName(Id, name);
}
///
@@ -272,7 +264,7 @@ public void SetSongName(string name)
///
public uint[] GetTimeMap(int startLine, int length, TimeMapType type)
{
- return _lib.GetTimeMap(_id, startLine, length, type);
+ return Library.GetTimeMap(Id, startLine, length, type);
}
#endregion song properties
diff --git a/SunSharp/ObjectWrapper/Slots.cs b/SunSharp/ObjectWrapper/Slots.cs
index f63a887..303f318 100644
--- a/SunSharp/ObjectWrapper/Slots.cs
+++ b/SunSharp/ObjectWrapper/Slots.cs
@@ -60,17 +60,15 @@ public T RunInOpeningLock(Func func)
///
/// Try to get and open a new slot.
///
- ///
- /// if failed to find an unused slot.
- public bool TryOpenNewSlot(out Slot slot)
+ /// if opening a closed slot failed. Otherwise, an open slot is returned.
+ public Slot? TryOpenNewSlot()
{
- slot = RunInOpeningLock(() =>
+ return RunInOpeningLock(() =>
{
- var _slot = _slots.FirstOrDefault(s => !s.IsOpen);
- _slot?.Open();
- return _slot;
+ var slot = _slots.FirstOrDefault(s => !s.IsOpen);
+ slot?.Open();
+ return slot;
});
- return slot != null;
}
public IEnumerator GetEnumerator() => ((IEnumerable)_slots).GetEnumerator();
diff --git a/SunSharp/ObjectWrapper/SunVox.cs b/SunSharp/ObjectWrapper/SunVox.cs
index 412c1ba..3a14679 100644
--- a/SunSharp/ObjectWrapper/SunVox.cs
+++ b/SunSharp/ObjectWrapper/SunVox.cs
@@ -1,6 +1,6 @@
-using SunSharp.ThinWrapper;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
+using SunSharp.ThinWrapper;
namespace SunSharp.ObjectWrapper
{
@@ -10,26 +10,23 @@ namespace SunSharp.ObjectWrapper
///
public class SunVox : System.IDisposable
{
- private readonly int _sampleRate;
private readonly ISunVoxLib _lib;
- private readonly Slots _slots;
private readonly OutputType? _outputType;
- private readonly Version _version;
- private readonly bool _singleThreaded;
- private readonly AudioChannels _channels;
///
/// The underlying library. Direct use is potentially dangerous and may break existing abstractions.
///
public ISunVoxLib Library => _lib;
- public Slots Slots => _slots;
+ public Slots Slots { get; }
+
public bool NeedsUserCallback => OutputType != null;
- public bool SingleThreaded => _singleThreaded;
+ public bool SingleThreaded { get; }
+
public OutputType? OutputType => _outputType;
- public Version Version => _version;
- public int SampleRate => _sampleRate;
- public AudioChannels Channels => _channels;
+ public Version Version { get; }
+ public int SampleRate { get; }
+ public AudioChannels Channels { get; }
///
/// Create an instance of the engine with own audio stream and threading.
@@ -42,7 +39,7 @@ public class SunVox : System.IDisposable
/// Leave for the value to be assigned by the engine.
/// Limit information sent to Standard Output.
public SunVox(ISunVoxLib lib, AudioChannels channels = AudioChannels.Stereo, uint? bufferSize = null,
- string deviceIn = null, string deviceOut = null, string driver = null, bool noDebugOutput = true)
+ string? deviceIn = null, string? deviceOut = null, string? driver = null, bool noDebugOutput = true)
{
var flags = InitFlags.Default;
if (noDebugOutput)
@@ -56,12 +53,12 @@ public SunVox(ISunVoxLib lib, AudioChannels channels = AudioChannels.Stereo, uin
var configuration = @params.Any() ? string.Join("|", @params) : null;
_lib = lib;
- _version = _lib.Init(sampleRate: -1, config: configuration, channels: channels, flags: flags);
- _sampleRate = _lib.GetSampleRate();
- _singleThreaded = false;
+ Version = _lib.Init(sampleRate: -1, config: configuration, channels: channels, flags: flags);
+ SampleRate = _lib.GetSampleRate();
+ SingleThreaded = false;
_outputType = null;
- _channels = channels;
- _slots = new Slots(this);
+ Channels = channels;
+ Slots = new Slots(this);
}
///
@@ -74,7 +71,8 @@ public SunVox(ISunVoxLib lib, AudioChannels channels = AudioChannels.Stereo, uin
/// Use to promise that audio callback and other methods will be called from one thread.
/// Limit information sent to Standard Output.
///
- public SunVox(ISunVoxLib lib, int sampleRate, OutputType outputType, AudioChannels channels = AudioChannels.Stereo,
+ public SunVox(ISunVoxLib lib, int sampleRate, OutputType outputType,
+ AudioChannels channels = AudioChannels.Stereo,
bool singleThreaded = false, bool noDebugOutput = true)
{
var flags = InitFlags.UserAudioCallback;
@@ -96,12 +94,12 @@ public SunVox(ISunVoxLib lib, int sampleRate, OutputType outputType, AudioChanne
throw new System.ArgumentException($"Invalid value: {sampleRate}", nameof(sampleRate));
_lib = lib;
- _version = _lib.Init(sampleRate: sampleRate, channels: channels, flags: flags);
- _sampleRate = _lib.GetSampleRate();
- _singleThreaded = false;
- _channels = channels;
+ Version = _lib.Init(sampleRate: sampleRate, channels: channels, flags: flags);
+ SampleRate = _lib.GetSampleRate();
+ SingleThreaded = false;
+ Channels = channels;
_outputType = outputType;
- _slots = new Slots(this);
+ Slots = new Slots(this);
}
#region disposable
@@ -149,12 +147,13 @@ private void AudioGuard(bool @float)
if (_outputType == null)
throw new System.InvalidOperationException("SunVox was not initialized in user callback mode.");
- if ((_outputType == ObjectWrapper.OutputType.Float32) == !@float)
- {
- var expected = @float ? ObjectWrapper.OutputType.Float32 : ObjectWrapper.OutputType.Int16;
- var msg = $"SunVox was initialized with output type \"{OutputType}\", but callback was called expecting output type \"{expected}\"";
- throw new System.InvalidOperationException(msg);
- }
+ if (_outputType == ObjectWrapper.OutputType.Float32 != !@float)
+ return;
+
+ var expected = @float ? ObjectWrapper.OutputType.Float32 : ObjectWrapper.OutputType.Int16;
+ var msg =
+ $"SunVox was initialized with output type \"{OutputType}\", but callback was called expecting output type \"{expected}\"";
+ throw new System.InvalidOperationException(msg);
}
///
@@ -167,14 +166,14 @@ private void AudioGuard(bool @float)
public bool AudioCallback(float[] outputBuffer, int latency, uint outTime)
{
AudioGuard(true);
- return _lib.AudioCallback(outputBuffer, _channels, latency, outTime);
+ return _lib.AudioCallback(outputBuffer, Channels, latency, outTime);
}
///
public bool AudioCallback(short[] outputBuffer, int latency, uint outTime)
{
AudioGuard(false);
- return _lib.AudioCallback(outputBuffer, _channels, latency, outTime);
+ return _lib.AudioCallback(outputBuffer, Channels, latency, outTime);
}
///
@@ -187,31 +186,35 @@ public bool AudioCallback(short[] outputBuffer, int latency, uint outTime)
/// Input data channels.
/// Audio latency (in frames).
/// Buffer output time (in system ticks).
- public bool AudioCallback(float[] outputBuffer, float[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public bool AudioCallback(float[] outputBuffer, float[] inputBuffer, AudioChannels inputChannels, int latency,
+ uint outTime)
{
AudioGuard(true);
- return _lib.AudioCallback(outputBuffer, _channels, inputBuffer, inputChannels, latency, outTime);
+ return _lib.AudioCallback(outputBuffer, Channels, inputBuffer, inputChannels, latency, outTime);
}
///
- public bool AudioCallback(float[] outputBuffer, short[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public bool AudioCallback(float[] outputBuffer, short[] inputBuffer, AudioChannels inputChannels, int latency,
+ uint outTime)
{
AudioGuard(true);
- return _lib.AudioCallback(outputBuffer, _channels, inputBuffer, inputChannels, latency, outTime);
+ return _lib.AudioCallback(outputBuffer, Channels, inputBuffer, inputChannels, latency, outTime);
}
///
- public bool AudioCallback(short[] outputBuffer, float[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public bool AudioCallback(short[] outputBuffer, float[] inputBuffer, AudioChannels inputChannels, int latency,
+ uint outTime)
{
AudioGuard(false);
- return _lib.AudioCallback(outputBuffer, _channels, inputBuffer, inputChannels, latency, outTime);
+ return _lib.AudioCallback(outputBuffer, Channels, inputBuffer, inputChannels, latency, outTime);
}
///
- public bool AudioCallback(short[] outputBuffer, short[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public bool AudioCallback(short[] outputBuffer, short[] inputBuffer, AudioChannels inputChannels, int latency,
+ uint outTime)
{
AudioGuard(false);
- return _lib.AudioCallback(outputBuffer, _channels, inputBuffer, inputChannels, latency, outTime);
+ return _lib.AudioCallback(outputBuffer, Channels, inputBuffer, inputChannels, latency, outTime);
}
#endregion audio I/O
diff --git a/SunSharp/ObjectWrapper/Synthesizer.cs b/SunSharp/ObjectWrapper/Synthesizer.cs
index ab5542e..9face70 100644
--- a/SunSharp/ObjectWrapper/Synthesizer.cs
+++ b/SunSharp/ObjectWrapper/Synthesizer.cs
@@ -1,6 +1,6 @@
-using SunSharp.ThinWrapper;
-using System.Collections;
+using System.Collections;
using System.Collections.Generic;
+using SunSharp.ThinWrapper;
namespace SunSharp.ObjectWrapper
{
@@ -99,33 +99,26 @@ public ModuleHandle LoadModule(string path, int x = 0, int y = 0, int z = 0)
public void RemoveModule(int moduleId)
{
- _slot.RunInLock(() =>
- {
- _lib.RemoveModule(_id, moduleId);
- });
+ _slot.RunInLock(() => { _lib.RemoveModule(_id, moduleId); });
}
public void RemoveModule(ModuleHandle module) => RemoveModule(module.Id);
public void ConnectModule(int sourceId, int destinationId)
{
- _slot.RunInLock(() =>
- {
- _lib.ConnectModule(_id, sourceId, destinationId);
- });
+ _slot.RunInLock(() => { _lib.ConnectModule(_id, sourceId, destinationId); });
}
- public void ConnectModule(ModuleHandle source, ModuleHandle destination) => ConnectModule(source.Id, destination.Id);
+ public void ConnectModule(ModuleHandle source, ModuleHandle destination) =>
+ ConnectModule(source.Id, destination.Id);
public void DisconnectModule(int sourceId, int destinationId)
{
- _slot.RunInLock(() =>
- {
- _lib.DisconnectModule(_id, sourceId, destinationId);
- });
+ _slot.RunInLock(() => { _lib.DisconnectModule(_id, sourceId, destinationId); });
}
- public void DisconnectModule(ModuleHandle source, ModuleHandle destination) => DisconnectModule(source.Id, destination.Id);
+ public void DisconnectModule(ModuleHandle source, ModuleHandle destination) =>
+ DisconnectModule(source.Id, destination.Id);
public IEnumerator GetEnumerator()
{
diff --git a/SunSharp/ObjectWrapper/Timeline.cs b/SunSharp/ObjectWrapper/Timeline.cs
index 598c041..20e2597 100644
--- a/SunSharp/ObjectWrapper/Timeline.cs
+++ b/SunSharp/ObjectWrapper/Timeline.cs
@@ -1,6 +1,6 @@
-using SunSharp.ThinWrapper;
-using System.Collections;
+using System.Collections;
using System.Collections.Generic;
+using SunSharp.ThinWrapper;
namespace SunSharp.ObjectWrapper
{
@@ -55,7 +55,8 @@ public bool TryGetPattern(int id, out PatternHandle pattern)
public PatternHandle CreatePattern(string name, int lines, int tracks, int x, int y, int? iconSeed = null)
{
- return Slot.RunInLock(() => {
+ return Slot.RunInLock(() =>
+ {
var id = _lib.CreatePattern(_id, null, x, y, tracks, lines, iconSeed, name);
return new PatternHandle(this, id);
});
@@ -65,14 +66,14 @@ public PatternHandle ClonePattern(PatternHandle original, int x, int y)
{
return Slot.RunInLock(() =>
{
- var id = _lib.CreatePattern(_id, original.Id, x, y, -1, -1, null, null);
+ var id = _lib.CreatePattern(_id, original.Id, x, y, -1, -1, null, original.GetName());
return new PatternHandle(this, id);
});
}
public IEnumerator GetEnumerator()
{
- for (int i = 0; i < GetUpperPatternCount(); i++)
+ for (var i = 0; i < GetUpperPatternCount(); i++)
if (TryGetPattern(i, out var p))
yield return p;
}
diff --git a/SunSharp/ObjectWrapper/VirtualPattern.cs b/SunSharp/ObjectWrapper/VirtualPattern.cs
index 5f88783..268f814 100644
--- a/SunSharp/ObjectWrapper/VirtualPattern.cs
+++ b/SunSharp/ObjectWrapper/VirtualPattern.cs
@@ -9,8 +9,8 @@ public class VirtualPattern
private readonly ISunVoxLib _lib;
private readonly Slot _slot;
private readonly int _id;
- private int? lastSetTimeStamp;
- private object _lock;
+ private int? _lastSetTimeStamp;
+ private readonly object _lock;
internal VirtualPattern(Slot slot)
{
@@ -34,10 +34,10 @@ public void SendEventImmediately(int track, PatternEvent e)
{
lock (_lock)
{
- if (lastSetTimeStamp != null)
+ if (_lastSetTimeStamp != null)
{
- var previous = lastSetTimeStamp;
- _lib.SetSendEventTimestamp(_id, true);
+ var previous = _lastSetTimeStamp;
+ _lib.SetSendEventTimestamp(_id, reset: true);
_lib.SendEvent(_id, track, e);
_lib.SetSendEventTimestamp(_id, false, previous.Value);
}
@@ -58,7 +58,7 @@ public void SetEventTiming(int timestamp)
lock (_lock)
{
_lib.SetSendEventTimestamp(_id, false, timestamp);
- lastSetTimeStamp = timestamp;
+ _lastSetTimeStamp = timestamp;
}
}
@@ -71,7 +71,7 @@ public void ResetEventTiming()
lock (_lock)
{
_lib.SetSendEventTimestamp(_id, true);
- lastSetTimeStamp = null;
+ _lastSetTimeStamp = null;
}
}
@@ -93,11 +93,11 @@ public void SendEvent(int track, PatternEvent @event)
///
///
///
- public void SendEvent(int track, int NN = 0, int VV = 0, int MM = 0, int CCEE = 0, int XXYY = 0)
+ public void SendEvent(int track, int nn = 0, int vv = 0, int mm = 0, int ccee = 0, int xxyy = 0)
{
lock (_lock)
{
- _lib.SendEvent(_id, track, NN, VV, MM, CCEE, XXYY);
+ _lib.SendEvent(_id, track, nn, vv, mm, ccee, xxyy);
}
}
}
diff --git a/SunSharp/PatternEvent.cs b/SunSharp/PatternEvent.cs
index bdb4ffe..e6f3f80 100644
--- a/SunSharp/PatternEvent.cs
+++ b/SunSharp/PatternEvent.cs
@@ -4,152 +4,76 @@
namespace SunSharp
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
- public readonly struct ImmutablePatternEvent : IEquatable, IEquatable
+ public struct PatternEvent : IEquatable
{
- [FieldOffset(0)] private readonly ulong _data;
- [FieldOffset(0)] private readonly byte _nn;
- [FieldOffset(1)] private readonly byte _vv;
- [FieldOffset(2)] private readonly ushort _mm;
- [FieldOffset(4)] private readonly ushort _ccee;
- [FieldOffset(4)] private readonly byte _ee;
- [FieldOffset(5)] private readonly byte _cc;
- [FieldOffset(6)] private readonly ushort _xxyy;
- [FieldOffset(6)] private readonly byte _yy;
- [FieldOffset(7)] private readonly byte _xx;
-
- public ulong Data => _data;
- public byte NN => _nn;
- public Note Note => (Note)_nn;
- public byte VV => _vv;
- public ushort MM => _mm;
- public ushort CCEE => _ccee;
- public byte CC => _cc;
- public byte EE => _ee;
- public Effect Effect => (Effect)EE;
- public ushort XXYY => _xxyy;
- public byte YY => _yy;
- public byte XX => _xx;
-
- public ImmutablePatternEvent(ulong value) : this()
- {
- _data = value;
- }
+ [field: FieldOffset(0)] public ulong Data { get; set; }
- public ImmutablePatternEvent(PatternEvent @event) : this(@event.Data)
- {
- }
+ [field: FieldOffset(0)] public byte NN { get; set; }
- public ImmutablePatternEvent(byte nn, byte vv, ushort mm, ushort ccee, ushort xxyy) : this()
- {
- _nn = nn;
- _vv = vv;
- _mm = mm;
- _ccee = ccee;
- _xxyy = xxyy;
- }
+ [field: FieldOffset(1)] public byte VV { get; set; }
- public ImmutablePatternEvent(Note note, byte velocity, ushort module, byte controller, Effect effect, ushort xxyy) : this()
- {
- _nn = (byte)note;
- _vv = velocity;
- _mm = module;
- _cc = controller;
- _ee = (byte)effect;
- _xxyy = xxyy;
- }
+ [field: FieldOffset(2)] public ushort MM { get; set; }
- public static implicit operator ImmutablePatternEvent(ulong value)
- {
- return new ImmutablePatternEvent(value);
- }
+ [field: FieldOffset(4)] public ushort CCEE { get; set; }
- public static implicit operator ulong(ImmutablePatternEvent ev)
- {
- return ev.Data;
- }
+ [field: FieldOffset(5)] public byte CC { get; set; }
- public override string ToString() => $"{(Note)NN}{VV:X2}{MM:X4}{CC:X2}{EE:X2}{XX:X2}{YY:X2}";
+ [field: FieldOffset(4)] public byte EE { get; set; }
+
+ [field: FieldOffset(6)] public ushort XXYY { get; set; }
- public static bool operator ==(ImmutablePatternEvent a, ImmutablePatternEvent b) => a._data == b._data;
+ [field: FieldOffset(6)] public byte YY { get; set; }
- public static bool operator !=(ImmutablePatternEvent a, ImmutablePatternEvent b) => a._data != b._data;
+ [field: FieldOffset(7)] public byte XX { get; set; }
- public override bool Equals(object obj)
+ public Effect Effect
{
- if (obj is ImmutablePatternEvent readOnlyEvent) return readOnlyEvent._data == _data;
- if (obj is PatternEvent @event) return @event.Data == _data;
- return false;
+ get => (Effect)EE;
+ set => EE = (byte)value;
}
- public bool Equals(PatternEvent other) => this == other;
-
- public override int GetHashCode() => -1945990370 + _data.GetHashCode();
-
- public bool Equals(ImmutablePatternEvent other) => _data == other.Data;
- }
-
- [StructLayout(LayoutKind.Explicit, Size = 8)]
- public struct PatternEvent : IEquatable, IEquatable
- {
- [FieldOffset(0)] private ulong _data;
- [FieldOffset(0)] private byte _nn;
- [FieldOffset(1)] private byte _vv;
- [FieldOffset(2)] private ushort _mm;
- [FieldOffset(4)] private ushort _ccee;
- [FieldOffset(4)] private byte _ee;
- [FieldOffset(5)] private byte _cc;
- [FieldOffset(6)] private ushort _xxyy;
- [FieldOffset(6)] private byte _yy;
- [FieldOffset(7)] private byte _xx;
-
- public ulong Data { get => _data; set => _data = value; }
- public byte NN { get => _nn; set => _nn = value; }
- public Note Note { get => (Note)_nn; set => _nn = (byte)value; }
- public byte VV { get => _vv; set => _vv = value; }
- public ushort MM { get => _mm; set => _mm = value; }
- public ushort CCEE { get => _ccee; set => _ccee = value; }
- public byte CC { get => _cc; set => _cc = value; }
- public byte EE { get => _ee; set => _ee = value; }
- public Effect Effect { get => (Effect)_ee; set => _ee = (byte)value; }
- public ushort XXYY { get => _xxyy; set => _xxyy = value; }
- public byte YY { get => _yy; set => _yy = value; }
- public byte XX { get => _xx; set => _xx = value; }
+ public Note Note
+ {
+ get => (Note)NN;
+ set => NN = (byte)value;
+ }
public PatternEvent(ulong value) : this()
{
- _data = value;
+ Data = value;
}
public PatternEvent(Note note, byte velocity, ushort module) : this()
{
- _nn = note;
- _vv = velocity;
- _mm = module;
+ NN = note;
+ VV = velocity;
+ MM = module;
}
public PatternEvent(Effect effect, ushort xxyy) : this()
{
- _ee = (byte)effect;
- _xxyy = xxyy;
+ EE = (byte)effect;
+ XXYY = xxyy;
}
public PatternEvent(byte nn, byte vv, ushort mm, ushort ccee, ushort xxyy) : this()
{
- _nn = nn;
- _vv = vv;
- _mm = mm;
- _ccee = ccee;
- _xxyy = xxyy;
+ NN = nn;
+ VV = vv;
+ MM = mm;
+ CCEE = ccee;
+ XXYY = xxyy;
}
- public PatternEvent(Note note, byte velocity, ushort module, byte controller, Effect effect, ushort xxyy) : this()
+ public PatternEvent(Note note, byte velocity, ushort module, byte controller, Effect effect,
+ ushort xxyy) : this()
{
- _nn = (byte)note;
- _vv = velocity;
- _mm = module;
- _cc = controller;
- _ee = (byte)effect;
- _xxyy = xxyy;
+ NN = note;
+ VV = velocity;
+ MM = module;
+ CC = controller;
+ EE = (byte)effect;
+ XXYY = xxyy;
}
public static implicit operator PatternEvent(ulong value)
@@ -162,23 +86,16 @@ public static implicit operator ulong(PatternEvent @event)
return @event.Data;
}
- public static implicit operator ImmutablePatternEvent(PatternEvent @event)
- {
- return new ImmutablePatternEvent(@event._data);
- }
-
public override string ToString() => $"{(Note)NN}{VV:X2}{MM:X4}{CC:X2}{EE:X2}{XX:X2}{YY:X2}";
- public static bool operator ==(PatternEvent a, PatternEvent b) => a._data == b._data;
+ public static bool operator ==(PatternEvent a, PatternEvent b) => a.Data == b.Data;
- public static bool operator !=(PatternEvent a, PatternEvent b) => a._data != b._data;
+ public static bool operator !=(PatternEvent a, PatternEvent b) => a.Data != b.Data;
public override bool Equals(object obj) => obj is PatternEvent e && this == e;
public bool Equals(PatternEvent other) => this == other;
- public override int GetHashCode() => -1945990370 + _data.GetHashCode();
-
- public bool Equals(ImmutablePatternEvent other) => _data == other.Data;
+ public override int GetHashCode() => -1945990370 + Data.GetHashCode();
}
}
diff --git a/SunSharp/SunSharp.csproj b/SunSharp/SunSharp.csproj
index 7d7367e..a39e0b5 100644
--- a/SunSharp/SunSharp.csproj
+++ b/SunSharp/SunSharp.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
True
SunSharp
Sotakebk
@@ -24,14 +24,19 @@
README.md
MIT
snupkg
+ enable
- 4
+ 9999
+
+ $(WarningsAsErrors);NU1605;Nullable
- 4
+ 9999
+
+ $(WarningsAsErrors);NU1605;Nullable
diff --git a/SunSharp/ThinWrapper/SunVoxException.cs b/SunSharp/ThinWrapper/SunVoxException.cs
index b732f19..c94e51e 100644
--- a/SunSharp/ThinWrapper/SunVoxException.cs
+++ b/SunSharp/ThinWrapper/SunVoxException.cs
@@ -5,16 +5,16 @@ namespace SunSharp.ThinWrapper
public sealed class SunVoxException : Exception
{
private readonly uint _code;
- private readonly string _method;
+ private readonly string? _method;
public override string Message => $"Error code: {_code:X}, method: {_method ?? "unknown"}.";
- public SunVoxException(uint code, string method = null)
+ public SunVoxException(uint code, string? method = null)
{
_code = code;
_method = method;
}
- public SunVoxException(int code, string method = null) : this((uint)code, method)
+ public SunVoxException(int code, string? method = null) : this((uint)code, method)
{
}
}
diff --git a/SunSharp/ThinWrapper/SunVoxLibExtensions.cs b/SunSharp/ThinWrapper/SunVoxLibExtensions.cs
index 46513dd..e2646fb 100644
--- a/SunSharp/ThinWrapper/SunVoxLibExtensions.cs
+++ b/SunSharp/ThinWrapper/SunVoxLibExtensions.cs
@@ -9,33 +9,33 @@ public static class SunVoxLibExtensions
private static short ToShortBitwise(uint value)
{
- if ((value & 0x8000) != 0) // sign byte
- {
- int val = (int)value;
- return (short)(val - 0x10000);
- }
- return (short)value;
+ if ((value & 0x8000) == 0)
+ return (short)value;
+
+ var val = (int)value;
+ return (short)(val - 0x10000);
}
private static int[] CopyIntArraySkipNegativeOnes(IntPtr ptr, int count)
{
- int c = 0;
- for (int i = 0; i < count; i++)
+ var nonZeroValues = 0;
+ for (var i = 0; i < count; i++)
{
if (Marshal.ReadInt32(ptr, i * sizeof(int)) != -1)
- c++;
+ nonZeroValues++;
}
- var arr = new int[c];
- c = 0;
- for (int i = 0; i < count; i++)
+ var arr = new int[nonZeroValues];
+
+ var index = 0;
+ for (var i = 0; i < count; i++)
{
var value = Marshal.ReadInt32(ptr, i * sizeof(int));
- if (value != -1)
- {
- arr[c] = value;
- c++;
- }
+ if (value == -1)
+ continue;
+
+ arr[index] = value;
+ index++;
}
return arr;
@@ -58,13 +58,13 @@ public static (short x, short y) PositionToXY(uint xy)
}
///
- /// Get finetune and relative note value from one finetune value received from .
+ /// Get fine-tune and relative note value from packed fine-tune value received from .
///
- public static (short finetune, short relativeNote) SplitFinetune(uint moduleFinetune)
+ public static (short fineTune, short relativeNote) SplitFineTune(uint packedFineTune)
{
- uint out_finetune = moduleFinetune & 0xFFFF;
- uint out_relative_note = (moduleFinetune >> 16) & 0xFFFF;
- return (ToShortBitwise(out_finetune), ToShortBitwise(out_relative_note));
+ var outFineTune = packedFineTune & 0xFFFF;
+ var outRelativeNote = (packedFineTune >> 16) & 0xFFFF;
+ return (ToShortBitwise(outFineTune), ToShortBitwise(outRelativeNote));
}
public static float FrequencyFromPitch(float pitch)
@@ -95,17 +95,18 @@ public static double PitchFromFrequency(double frequency)
#region audio rendering
- private static bool AudioCallbackInternal(this ISunVoxLib lib, T[] outputBuffer, AudioChannels channels, int latency, uint outTime)
+ private static bool AudioCallbackInternal(this ISunVoxLib lib, T[] outputBuffer, AudioChannels channels,
+ int latency, uint outTime)
{
if (channels == AudioChannels.Stereo && (outputBuffer.Length & 1) != 0)
throw new ArgumentException("Buffer size is not a multiple of two.");
- int frames = outputBuffer.Length;
+ var frames = outputBuffer.Length;
if (channels == AudioChannels.Stereo)
frames /= 2;
var outHandle = GCHandle.Alloc(outputBuffer, GCHandleType.Pinned);
- IntPtr ptr = outHandle.AddrOfPinnedObject();
+ var ptr = outHandle.AddrOfPinnedObject();
int ret;
try
{
@@ -115,13 +116,16 @@ private static bool AudioCallbackInternal(this ISunVoxLib lib, T[] outputBuff
{
outHandle.Free();
}
+
if (ret != 0 && ret != 1)
throw new SunVoxException(ret, nameof(lib.sv_audio_callback));
- return (ret == 1);
+ return ret == 1;
}
- private static bool AudioCallbackInternal(this ISunVoxLib lib, T[] outputBuffer, AudioChannels outputChannels, V[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime, int inputType)
+ private static bool AudioCallbackInternal(this ISunVoxLib lib, T[] outputBuffer,
+ AudioChannels outputChannels, V[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime,
+ int inputType)
{
if (outputChannels == AudioChannels.Stereo && (outputBuffer.Length & 1) != 0)
throw new ArgumentException("Output buffer size is not a multiple of two.");
@@ -129,32 +133,34 @@ private static bool AudioCallbackInternal(this ISunVoxLib lib, T[] outputB
if (inputChannels == AudioChannels.Stereo && (inputBuffer.Length & 1) != 0)
throw new ArgumentException("Input buffer size is not a multiple of two.");
- int inputFrames = inputBuffer.Length;
+ var inputFrames = inputBuffer.Length;
if (inputChannels == AudioChannels.Stereo)
inputFrames /= 2;
- int outputFrmaes = outputBuffer.Length;
+ var outputFrames = outputBuffer.Length;
if (outputChannels == AudioChannels.Stereo)
- outputFrmaes /= 2;
+ outputFrames /= 2;
- if (inputFrames != outputFrmaes)
- throw new ArgumentException($"Input and output frame count is different (input: {inputFrames} vs {outputFrmaes}).");
+ if (inputFrames != outputFrames)
+ throw new ArgumentException(
+ $"Input and output frame count is different (input: {inputFrames} vs {outputFrames}).");
var outHandle = GCHandle.Alloc(outputBuffer, GCHandleType.Pinned);
var inHandle = GCHandle.Alloc(inputBuffer, GCHandleType.Pinned);
- IntPtr outPtr = outHandle.AddrOfPinnedObject();
- IntPtr inPtr = inHandle.AddrOfPinnedObject();
+ var outPtr = outHandle.AddrOfPinnedObject();
+ var inPtr = inHandle.AddrOfPinnedObject();
int ret;
try
{
- int frames =
- ret = lib.sv_audio_callback2(outPtr, outputFrmaes, latency, outTime, inputType, (int)inputChannels, inPtr);
+ ret = lib.sv_audio_callback2(outPtr, outputFrames, latency, outTime, inputType, (int)inputChannels,
+ inPtr);
}
finally
{
inHandle.Free();
outHandle.Free();
}
+
if (ret != 0 && ret != 1)
throw new SunVoxException(ret, nameof(lib.sv_audio_callback2));
@@ -171,13 +177,15 @@ private static bool AudioCallbackInternal(this ISunVoxLib lib, T[] outputB
/// Audio latency (in frames).
/// Buffer output time (in system ticks).
/// if buffer was filled with zeros.
- public static bool AudioCallback(this ISunVoxLib lib, float[] outputBuffer, AudioChannels channels, int latency, uint outTime)
+ public static bool AudioCallback(this ISunVoxLib lib, float[] outputBuffer, AudioChannels channels, int latency,
+ uint outTime)
{
return AudioCallbackInternal(lib, outputBuffer, channels, latency, outTime);
}
///
- public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, AudioChannels channels, int latency, uint outTime)
+ public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, AudioChannels channels, int latency,
+ uint outTime)
{
return AudioCallbackInternal(lib, outputBuffer, channels, latency, outTime);
}
@@ -195,27 +203,35 @@ public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, Audi
/// Audio latency (in frames).
/// Buffer output time (in system ticks).
/// if buffer was filled with zeros.
- public static bool AudioCallback(this ISunVoxLib lib, float[] outputBuffer, AudioChannels outputChannels, float[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public static bool AudioCallback(this ISunVoxLib lib, float[] outputBuffer, AudioChannels outputChannels,
+ float[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
{
- return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency, outTime, 1);
+ return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency,
+ outTime, 1);
}
///
- public static bool AudioCallback(this ISunVoxLib lib, float[] outputBuffer, AudioChannels outputChannels, short[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public static bool AudioCallback(this ISunVoxLib lib, float[] outputBuffer, AudioChannels outputChannels,
+ short[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
{
- return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency, outTime, 0);
+ return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency,
+ outTime, 0);
}
///
- public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, AudioChannels outputChannels, float[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, AudioChannels outputChannels,
+ float[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
{
- return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency, outTime, 1);
+ return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency,
+ outTime, 1);
}
///
- public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, AudioChannels outputChannels, short[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
+ public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, AudioChannels outputChannels,
+ short[] inputBuffer, AudioChannels inputChannels, int latency, uint outTime)
{
- return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency, outTime, 0);
+ return AudioCallbackInternal(lib, outputBuffer, outputChannels, inputBuffer, inputChannels, latency,
+ outTime, 0);
}
#endregion audio rendering
@@ -232,7 +248,8 @@ public static bool AudioCallback(this ISunVoxLib lib, short[] outputBuffer, Audi
/// Initialization flags.
/// The version of underlying library.
///
- public static Version Init(this ISunVoxLib lib, int sampleRate, string config = null, AudioChannels channels = AudioChannels.Stereo, InitFlags flags = InitFlags.Default)
+ public static Version Init(this ISunVoxLib lib, int sampleRate, string? config = null,
+ AudioChannels channels = AudioChannels.Stereo, InitFlags flags = InitFlags.Default)
{
var ptr = Marshal.StringToHGlobalAnsi(config);
try
@@ -265,11 +282,9 @@ public static void Deinit(this ISunVoxLib lib)
///
/// Character count to be read.
///
- public static string GetLog(this ISunVoxLib lib, int size)
+ public static string? GetLog(this ISunVoxLib lib, int size)
{
var ptr = lib.sv_get_log(size);
- if (ptr == IntPtr.Zero)
- return null;
try
{
return Marshal.PtrToStringAnsi(ptr);
@@ -282,18 +297,12 @@ public static string GetLog(this ISunVoxLib lib, int size)
public static uint GetTicks(this ISunVoxLib lib)
{
- var ret = lib.sv_get_ticks();
- if (ret < 0)
- throw new SunVoxException(ret, nameof(lib.sv_get_ticks));
- return ret;
+ return lib.sv_get_ticks();
}
public static uint GetTicksPerSecond(this ISunVoxLib lib)
{
- var ret = lib.sv_get_ticks_per_second();
- if (ret < 0)
- throw new SunVoxException(ret, nameof(lib.sv_get_ticks_per_second));
- return ret;
+ return lib.sv_get_ticks_per_second();
}
public static int GetSampleRate(this ISunVoxLib lib)
@@ -382,12 +391,9 @@ public static int GetSongLengthInLines(this ISunVoxLib lib, int slot)
return (int)ret;
}
- public static string GetSongName(this ISunVoxLib lib, int slot)
+ public static string? GetSongName(this ISunVoxLib lib, int slot)
{
var ptr = lib.sv_get_song_name(slot);
- if (ptr == IntPtr.Zero)
- return null;
-
return Marshal.PtrToStringAnsi(ptr);
}
@@ -426,6 +432,7 @@ public static void Save(this ISunVoxLib lib, int slot, string path)
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_save));
}
@@ -435,16 +442,17 @@ public static void SendEvent(this ISunVoxLib lib, int slot, int track, PatternEv
SendEvent(lib, slot, track, @event.NN, @event.VV, @event.MM, @event.CCEE, @event.XXYY);
}
- public static void SendEvent(this ISunVoxLib lib, int slot, int track, int NN = 0, int VV = 0, int MM = 0, int CCEE = 0, int XXYY = 0)
+ public static void SendEvent(this ISunVoxLib lib, int slot, int track, int nn = 0, int vv = 0, int mm = 0,
+ int ccee = 0, int xxyy = 0)
{
- int ret = lib.sv_send_event(slot, track, NN, VV, MM, CCEE, XXYY);
+ var ret = lib.sv_send_event(slot, track, nn, vv, mm, ccee, xxyy);
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_send_event));
}
- public static void SetAutostop(this ISunVoxLib lib, int slot, bool autostop)
+ public static void SetAutoStop(this ISunVoxLib lib, int slot, bool autoStop)
{
- var ret = lib.sv_set_autostop(slot, autostop ? 1 : 0);
+ var ret = lib.sv_set_autostop(slot, autoStop ? 1 : 0);
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_set_autostop));
}
@@ -505,6 +513,7 @@ public static uint[] GetTimeMap(this ISunVoxLib lib, int slot, int startLine, in
{
handle.Free();
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_get_time_map));
return arr;
@@ -526,6 +535,7 @@ public static void Load(this ISunVoxLib lib, int slot, string path)
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_load));
}
@@ -546,6 +556,7 @@ public static void Load(this ISunVoxLib lib, int slot, byte[] data)
{
handle.Free();
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_load));
}
@@ -594,7 +605,7 @@ public static void UnlockSlot(this ISunVoxLib lib, int slot)
///
public static void RunInLock(this ISunVoxLib lib, int slot, Action action)
{
- bool entered = false;
+ var entered = false;
try
{
lib.LockSlot(slot);
@@ -704,13 +715,14 @@ public static int FindModule(this ISunVoxLib lib, int slot, string name)
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret < -1)
throw new SunVoxException(ret, nameof(lib.sv_find_module));
return ret;
}
- public static (byte R, byte G, byte B) GetModuleColor(this ISunVoxLib lib, int slot, int module)
+ public static (byte r, byte g, byte b) GetModuleColor(this ISunVoxLib lib, int slot, int module)
{
var ret = lib.sv_get_module_color(slot, module);
var red = (byte)((ret) & 0xFF);
@@ -719,37 +731,37 @@ public static (byte R, byte G, byte B) GetModuleColor(this ISunVoxLib lib, int s
return (red, green, blue);
}
- public static void SetModuleColor(this ISunVoxLib lib, int slot, int module, byte R, byte G, byte B)
+ public static void SetModuleColor(this ISunVoxLib lib, int slot, int module, byte r, byte g, byte b)
{
- var color = R & (G << 8) & (B << 16);
+ var color = r & (g << 8) & (b << 16);
var ret = lib.sv_set_module_color(slot, module, color);
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_set_module_color));
}
- public static string GetModuleControllerName(this ISunVoxLib lib, int slot, int module, int controller)
+ public static string? GetModuleControllerName(this ISunVoxLib lib, int slot, int module, int controller)
{
var ptr = lib.sv_get_module_ctl_name(slot, module, controller);
- if (ptr == IntPtr.Zero)
- return null;
-
return Marshal.PtrToStringAnsi(ptr);
}
///
/// Get module controller value.
///
- public static int GetModuleControllerValue(this ISunVoxLib lib, int slot, int module, int controller, ValueScalingType scaling)
+ public static int GetModuleControllerValue(this ISunVoxLib lib, int slot, int module, int controller,
+ ValueScalingType scaling)
{
return lib.sv_get_module_ctl_value(slot, module, controller, (int)scaling);
}
- public static int GetModuleControllerMinValue(this ISunVoxLib lib, int slot, int module, int controller, ValueScalingType scaling)
+ public static int GetModuleControllerMinValue(this ISunVoxLib lib, int slot, int module, int controller,
+ ValueScalingType scaling)
{
return lib.sv_get_module_ctl_min(slot, module, controller, (int)scaling);
}
- public static int GetModuleControllerMaxValue(this ISunVoxLib lib, int slot, int module, int controller, ValueScalingType scaling)
+ public static int GetModuleControllerMaxValue(this ISunVoxLib lib, int slot, int module, int controller,
+ ValueScalingType scaling)
{
return lib.sv_get_module_ctl_max(slot, module, controller, (int)scaling);
}
@@ -776,21 +788,23 @@ public static int GetModuleControllerGroup(this ISunVoxLib lib, int slot, int mo
///
/// Send the value to the specified module controller. (sv_send_event() will be used internally, which may introduce latency).
///
- public static void SetModuleControllerValue(this ISunVoxLib lib, int slot, int module, int controller, int value, ValueScalingType scaling)
+ public static void SetModuleControllerValue(this ISunVoxLib lib, int slot, int module, int controller,
+ int value, ValueScalingType scaling)
{
var ret = lib.sv_set_module_ctl_value(slot, module, controller, value, (int)scaling);
if (ret != 0)
throw new SunVoxException(0, nameof(lib.sv_set_module_ctl_value));
}
- public static (int finetune, int relativeNote) GetModuleFinetune(this ISunVoxLib lib, int slot, int module)
+ public static FineTunePair GetModuleFineTune(this ISunVoxLib lib, int slot, int module)
{
- return SplitFinetune(lib.sv_get_module_finetune(slot, module));
+ var (fineTune, relativeNote) = SplitFineTune(lib.sv_get_module_finetune(slot, module));
+ return new FineTunePair(fineTune, relativeNote);
}
- public static void SetModuleFinetune(this ISunVoxLib lib, int slot, int module, int finetune)
+ public static void SetModuleFineTune(this ISunVoxLib lib, int slot, int module, int fineTune)
{
- var ret = lib.sv_set_module_finetune(slot, module, finetune);
+ var ret = lib.sv_set_module_finetune(slot, module, fineTune);
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_set_module_finetune));
}
@@ -834,12 +848,9 @@ public static int[] GetModuleInputs(this ISunVoxLib lib, int slot, int module)
}
}
- public static string GetModuleName(this ISunVoxLib lib, int slot, int module)
+ public static string? GetModuleName(this ISunVoxLib lib, int slot, int module)
{
var ptr = lib.sv_get_module_name(slot, module);
- if (ptr == IntPtr.Zero)
- return null;
-
return Marshal.PtrToStringAnsi(ptr);
}
@@ -858,12 +869,9 @@ public static void SetModuleName(this ISunVoxLib lib, int slot, int module, stri
}
}
- public static string GetModuleType(this ISunVoxLib lib, int slot, int module)
+ public static string? GetModuleType(this ISunVoxLib lib, int slot, int module)
{
var ptr = lib.sv_get_module_type(slot, module);
- if (ptr == IntPtr.Zero)
- return null;
-
return Marshal.PtrToStringAnsi(ptr);
}
@@ -895,7 +903,7 @@ public static int[] GetModuleOutputs(this ISunVoxLib lib, int slot, int module)
public static int ReadModuleScope(this ISunVoxLib lib, int slot, int module, int channel, short[] buffer)
{
var handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
- IntPtr ptr = handle.AddrOfPinnedObject();
+ var ptr = handle.AddrOfPinnedObject();
try
{
return (int)lib.sv_get_module_scope2(slot, module, channel, ptr, (uint)buffer.Length);
@@ -955,6 +963,7 @@ public static int LoadModule(this ISunVoxLib lib, int slot, string path, int x =
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret < 0)
throw new SunVoxException(ret, nameof(lib.sv_load_module));
return ret;
@@ -977,6 +986,7 @@ public static int LoadModule(this ISunVoxLib lib, int slot, byte[] data, int x =
{
handle.Free();
}
+
if (ret < 0)
throw new SunVoxException(ret, nameof(lib.sv_load_module_from_memory));
return ret;
@@ -994,6 +1004,7 @@ public static int WriteModuleCurve(this ISunVoxLib lib, int slot, int module, in
{
handle.Free();
}
+
if (ret < 0)
throw new SunVoxException(ret, nameof(lib.sv_module_curve));
return ret;
@@ -1011,6 +1022,7 @@ public static int ReadModuleCurve(this ISunVoxLib lib, int slot, int module, int
{
handle.Free();
}
+
if (ret < 0)
throw new SunVoxException(ret, nameof(lib.sv_module_curve));
return ret;
@@ -1022,7 +1034,8 @@ public static int ReadModuleCurve(this ISunVoxLib lib, int slot, int module, int
///
/// ID of newly created module.
///
- public static int CreateModule(this ISunVoxLib lib, int slot, string type, string name, int x = 0, int y = 0, int z = 0)
+ public static int CreateModule(this ISunVoxLib lib, int slot, string type, string name, int x = 0, int y = 0,
+ int z = 0)
{
var typeptr = Marshal.StringToHGlobalAnsi(type);
var nameptr = Marshal.StringToHGlobalAnsi(name);
@@ -1036,6 +1049,7 @@ public static int CreateModule(this ISunVoxLib lib, int slot, string type, strin
Marshal.FreeHGlobal(typeptr);
Marshal.FreeHGlobal(nameptr);
}
+
if (ret < 0)
throw new SunVoxException(ret, nameof(lib.sv_new_module));
return ret;
@@ -1058,7 +1072,8 @@ public static void RemoveModule(this ISunVoxLib lib, int slot, int module)
/// Set to -1 to apply the sample to all sample slots.
///
///
- public static void LoadSamplerSample(this ISunVoxLib lib, int slot, int module, string path, int sampleSlot = -1)
+ public static void LoadSamplerSample(this ISunVoxLib lib, int slot, int module, string path,
+ int sampleSlot = -1)
{
var ptr = Marshal.StringToHGlobalAnsi(path);
int ret;
@@ -1070,6 +1085,7 @@ public static void LoadSamplerSample(this ISunVoxLib lib, int slot, int module,
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_sampler_load));
}
@@ -1079,18 +1095,21 @@ public static void LoadSamplerSample(this ISunVoxLib lib, int slot, int module,
/// Set to -1 to apply the sample to all sample slots.
///
///
- public static void LoadSamplerSample(this ISunVoxLib lib, int slot, int module, byte[] data, int sampleSlot = -1)
+ public static void LoadSamplerSample(this ISunVoxLib lib, int slot, int module, byte[] data,
+ int sampleSlot = -1)
{
var handle = GCHandle.Alloc(data, GCHandleType.Pinned);
int ret;
try
{
- ret = lib.sv_sampler_load_from_memory(slot, module, handle.AddrOfPinnedObject(), (uint)data.Length, sampleSlot);
+ ret = lib.sv_sampler_load_from_memory(slot, module, handle.AddrOfPinnedObject(), (uint)data.Length,
+ sampleSlot);
}
finally
{
handle.Free();
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_sampler_load_from_memory));
}
@@ -1111,6 +1130,7 @@ public static void LoadIntoMetaModule(this ISunVoxLib lib, int slot, int module,
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_metamodule_load));
}
@@ -1131,6 +1151,7 @@ public static void LoadIntoMetaModule(this ISunVoxLib lib, int slot, int module,
{
handle.Free();
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_metamodule_load_from_memory));
}
@@ -1151,6 +1172,7 @@ public static void LoadIntoVorbisPLayer(this ISunVoxLib lib, int slot, int modul
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_vplayer_load));
}
@@ -1171,6 +1193,7 @@ public static void LoadIntoVorbisPLayer(this ISunVoxLib lib, int slot, int modul
{
handle.Free();
}
+
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_vplayer_load_from_memory));
}
@@ -1183,18 +1206,20 @@ public static void LoadIntoVorbisPLayer(this ISunVoxLib lib, int slot, int modul
/// Use or an alternative!
///
///
- public static int CreatePattern(this ISunVoxLib lib, int slot, int? patternToClone, int x, int y, int tracks, int lines, int? iconSeed, string name)
+ public static int CreatePattern(this ISunVoxLib lib, int slot, int? patternToClone, int x, int y, int tracks,
+ int lines, int? iconSeed, string? name)
{
var ptr = Marshal.StringToHGlobalAnsi(name);
int ret;
try
{
- ret = lib.sv_new_pattern(slot, patternToClone ?? -1, x, y, tracks, lines, iconSeed ?? 0, ptr); ;
+ ret = lib.sv_new_pattern(slot, patternToClone ?? -1, x, y, tracks, lines, iconSeed ?? 0, ptr);
}
finally
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret < 0)
throw new SunVoxException(ret, nameof(lib.sv_new_pattern));
return ret;
@@ -1240,13 +1265,15 @@ public static int FindPattern(this ISunVoxLib lib, int slot, string name)
{
Marshal.FreeHGlobal(ptr);
}
+
if (ret < -1)
throw new SunVoxException(ret, nameof(lib.sv_find_pattern));
return ret;
}
- public static int GetPatternEventValue(this ISunVoxLib lib, int slot, int pattern, int track, int line, Column column)
+ public static int GetPatternEventValue(this ISunVoxLib lib, int slot, int pattern, int track, int line,
+ Column column)
{
var ret = lib.sv_get_pattern_event(slot, pattern, track, line, (int)column);
if (ret < 0)
@@ -1254,12 +1281,9 @@ public static int GetPatternEventValue(this ISunVoxLib lib, int slot, int patter
return ret;
}
- public static string GetPatternName(this ISunVoxLib lib, int slot, int pattern)
+ public static string? GetPatternName(this ISunVoxLib lib, int slot, int pattern)
{
var ptr = lib.sv_get_pattern_name(slot, pattern);
- if (ptr == IntPtr.Zero)
- return null;
-
return Marshal.PtrToStringAnsi(ptr);
}
@@ -1306,7 +1330,8 @@ public static int GetPatternTracks(this ISunVoxLib lib, int slot, int pattern)
///
/// Use or an alternative!
///
- public static void SetPatternSize(this ISunVoxLib lib, int slot, int pattern, int? tracks = null, int? lines = null)
+ public static void SetPatternSize(this ISunVoxLib lib, int slot, int pattern, int? tracks = null,
+ int? lines = null)
{
var ret = lib.sv_set_pattern_size(slot, pattern, tracks ?? -1, lines ?? -1);
if (ret < 0)
@@ -1342,13 +1367,13 @@ public static void SetPatternPosition(this ISunVoxLib lib, int slot, int pattern
///
/// Use or an alternative!
///
- public static PatternEvent[] GetPatternData(this ISunVoxLib lib, int slot, int pattern)
+ public static PatternEvent[]? GetPatternData(this ISunVoxLib lib, int slot, int pattern)
{
if (!GetPatternExists(lib, slot, pattern))
return null;
- int lines = GetPatternLines(lib, slot, pattern);
- int tracks = GetPatternTracks(lib, slot, pattern);
+ var lines = GetPatternLines(lib, slot, pattern);
+ var tracks = GetPatternTracks(lib, slot, pattern);
var ptr = lib.sv_get_pattern_data(slot, pattern);
if (ptr == IntPtr.Zero)
@@ -1356,7 +1381,7 @@ public static PatternEvent[] GetPatternData(this ISunVoxLib lib, int slot, int p
try
{
var arr = new PatternEvent[lines * tracks];
- for (int i = 0; i < lines * tracks; i++)
+ for (var i = 0; i < lines * tracks; i++)
arr[i] = (ulong)Marshal.ReadInt64(ptr, i * sizeof(ulong));
return arr;
}
@@ -1376,13 +1401,12 @@ public static void SetPatternData(this ISunVoxLib lib, int slot, int pattern, Pa
if (ptr == IntPtr.Zero)
throw new SunVoxException(ptr.ToInt32(), nameof(lib.sv_get_pattern_data));
- int lines = GetPatternLines(lib, slot, pattern);
- int tracks = GetPatternTracks(lib, slot, pattern);
+ var lines = GetPatternLines(lib, slot, pattern);
+ var tracks = GetPatternTracks(lib, slot, pattern);
var minSize = Math.Min(lines * tracks, data.Length);
- // TODO CHANGEME when raising .NET version, use memory copy between IntPtr and IntPtr?
- for (int i = 0; i < data.Length; i++)
+ for (var i = 0; i < minSize; i++)
{
Marshal.WriteInt64(ptr + i * sizeof(ulong), unchecked((long)data[i].Data));
}
@@ -1400,14 +1424,16 @@ public static bool SetPatternMute(this ISunVoxLib lib, int slot, int pattern, bo
return ret == 1;
}
- public static void SetPatternEvent(this ISunVoxLib lib, int slot, int pattern, int track, int line, int NN, int VV, int MM, int CCEE, int XXYY)
+ public static void SetPatternEvent(this ISunVoxLib lib, int slot, int pattern, int track, int line, int NN,
+ int VV, int MM, int CCEE, int XXYY)
{
var ret = lib.sv_set_pattern_event(slot, pattern, track, line, NN, VV, MM, CCEE, XXYY);
if (ret != 0)
throw new SunVoxException(ret, nameof(lib.sv_set_pattern_event));
}
- public static void SetPatternEvent(this ISunVoxLib lib, int slot, int pattern, int track, int line, PatternEvent ev)
+ public static void SetPatternEvent(this ISunVoxLib lib, int slot, int pattern, int track, int line,
+ PatternEvent ev)
{
var ret = lib.sv_set_pattern_event(slot, pattern, track, line, ev.NN, ev.VV, ev.MM, ev.CCEE, ev.XXYY);
if (ret != 0)
diff --git a/SunSharp/ThinWrapper/ThinWrapperEnums.cs b/SunSharp/ThinWrapper/ThinWrapperEnums.cs
index 4c03490..b4949cf 100644
--- a/SunSharp/ThinWrapper/ThinWrapperEnums.cs
+++ b/SunSharp/ThinWrapper/ThinWrapperEnums.cs
@@ -3,7 +3,8 @@
namespace SunSharp.ThinWrapper
{
[Flags]
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Corresponds to SV_INIT_FLAG flags, this just makes sense.")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix",
+ Justification = "Corresponds to SV_INIT_FLAG flags, this just makes sense.")]
public enum InitFlags : uint
{
Default = 0,
diff --git a/SunSharp/Version.cs b/SunSharp/Version.cs
index e704b7c..49886a2 100644
--- a/SunSharp/Version.cs
+++ b/SunSharp/Version.cs
@@ -2,26 +2,26 @@
{
public readonly struct Version
{
- public byte Major => _major;
- public byte Minor => _minor;
- public byte Minor2 => _minor2;
+ public byte Major { get; }
- private readonly byte _major, _minor, _minor2;
+ public byte Minor { get; }
+
+ public byte Minor2 { get; }
public Version(byte major, byte minor, byte minor2)
{
- _major = major;
- _minor = minor;
- _minor2 = minor2;
+ Major = major;
+ Minor = minor;
+ Minor2 = minor2;
}
public Version(int code)
{
- _major = (byte)(code >> 16 & 255);
- _minor = (byte)(code >> 8 & 255);
- _minor2 = (byte)(code & 255);
+ Major = (byte)(code >> 16 & 255);
+ Minor = (byte)(code >> 8 & 255);
+ Minor2 = (byte)(code & 255);
}
- public override string ToString() => $"SunVox Lib v{_major}.{_minor}.{_minor2}";
+ public override string ToString() => $"SunVox Lib v{Major}.{Minor}.{Minor2}";
}
}
From 656e83073bf23a0378d6e1fa2a899986d0e8038b Mon Sep 17 00:00:00 2001
From: Sotakebk <81926249+Sotakebk@users.noreply.github.com>
Date: Sat, 29 Jul 2023 19:23:33 +0200
Subject: [PATCH 02/27] reorganize project
---
CodeGeneration/CodeGeneration.csproj | 21 -
.../Generators/AdditionalGenerator.cs | 24 -
CodeGeneration/Generators/BaseGenerator.cs | 37 -
.../Generators/FMXAdditionalCodeGenerator.cs | 134 -
.../MetaModuleAdditionalCodeGenerator.cs | 14 -
.../SamplerAdditionalCodeGenerator.cs | 16 -
.../ModuleData_Generator.cs | 147 -
.../ModuleType_Generator.cs | 81 -
.../ProxyClass_Generator.cs | 185 -
.../SpecificModules_Generator.cs | 249 -
.../VorbisPlayerAdditionalGenerator.cs | 14 -
CodeGeneration/ModuleDataParser.cs | 144 -
CodeGeneration/ModuleTypes.cs | 62 -
CodeGeneration/Program.cs | 113 -
CodeGeneration/ReparsedData/Classes.cs | 113 -
.../ReparsedData/Data.Regenerated.cs | 1697 ----
CodeGeneration/ReparsedData/Data.cs | 8 -
CodeGeneration/all_modules.sunvox | Bin 23910 -> 0 bytes
Examples/BaseExample.cs | 36 -
Examples/ExampleContainer.cs | 27 -
Examples/Examples.csproj | 28 -
.../ObjectWrapperListModulesAndPatterns.cs | 62 -
Examples/ObjectWrapperManagePatterns.cs | 67 -
Examples/ObjectWrapperPlaySong.cs | 42 -
Examples/ObjectWrapperSendEvents.cs | 56 -
Examples/ObjectWrapperUseModules.cs | 69 -
Examples/Program.cs | 35 -
Examples/ThinWrapperListModulesAndPatterns.cs | 82 -
Examples/ThinWrapperPlaySong.cs | 40 -
Examples/ThinWrapperSendEvents.cs | 54 -
Examples/ThinWrapperUserAudioCallback.cs | 87 -
Examples/jump_demo.sunvox | Bin 17206 -> 0 bytes
Examples/the_lick.sunvox | Bin 2343 -> 0 bytes
.../CodeGenerationTools/BaseGenerator.cs | 25 +
.../CodeGenerationContext.cs | 22 +-
.../CodeGenerationTools/PathHelper.cs | 47 +
.../NativeProxy/NativeProxyCodeGeneration.cs | 23 +
.../NativeProxy/NativeProxyGenerator.cs | 168 +
.../NativeProxy/TypeNameTranslation.cs | 39 +
.../SunSharp.CodeGeneration.csproj | 25 +
SunSharp.IntegrationTests/LockingTests.cs | 6 +
.../SunSharp.IntegrationTests.csproj | 24 +
SunSharp.IntegrationTests/SunVoxLibDriver.cs | 33 +
.../sunvox_linux_x86_64.so | Bin
SunSharp.Redistribution/LibraryLoader.cs | 103 +
.../LibraryLoadingException.cs | 15 +
SunSharp.Redistribution/RELEASE-NOTES.txt | 21 +
SunSharp.Redistribution/Redistribution.cs | 177 -
.../SunSharp.Redistribution.csproj | 72 +-
.../SunSharp.Redistribution.nuspec | 7 +
SunSharp.Redistribution/UnixLibraryHandler.cs | 76 +
.../WindowsLibraryHandler.cs | 75 +
.../linux-arm64/native}/sunvox.so | Bin
.../runtimes/linux-x86-64/native/native.so | Bin 0 -> 904496 bytes
.../linux-x86/native/native.so} | Bin
.../macos-arm64/native}/sunvox.dylib | Bin
.../macos-x86-64/native}/sunvox.dylib | Bin
.../win-x64/native}/sunvox.dll | Bin
.../win-x86-64/native}/sunvox.dll | Bin
SunSharp.UnitTests/HelperTests.cs | 126 +
SunSharp.UnitTests/SunSharp.UnitTests.csproj | 28 +
.../SunVoxLibExtensionsTests.cs | 230 +
SunSharp.sln | 26 +-
SunSharp.sln.DotSettings.user | 12 +
.../{DerivedData => Data}/ControllerData.cs | 2 +-
.../DataReader.cs} | 28 +-
.../{DerivedData => Data}/IDeepCopyable.cs | 2 +-
SunSharp/{DerivedData => Data}/ModuleData.cs | 6 +-
SunSharp/{DerivedData => Data}/PatternData.cs | 2 +-
SunSharp/{DerivedData => Data}/SongData.cs | 2 +-
SunSharp/Enums.cs | 57 +-
SunSharp/{FineTunePair.cs => FineTune.cs} | 10 +-
SunSharp/Helper.cs | 95 +
SunSharp/ISunVoxLib.Modules.cs | 170 +
SunSharp/ISunVoxLib.Patterns.cs | 85 +
SunSharp/ISunVoxLib.cs | 539 +-
.../LibraryLoading/ProxyClass.Generated.cs | 467 -
SunSharp/{Version.cs => LibraryVersion.cs} | 10 +-
SunSharp/ModuleFlags.cs | 22 +-
SunSharp/Native/ISunVoxLibC.cs | 478 +
SunSharp/Native/Loader/LibraryHandler.cs | 28 +
.../NativeProxy.ISunVoxLibC.Generated.cs | 646 ++
SunSharp/Native/Loader/NativeProxy.cs | 77 +
SunSharp/Native/SunVoxLibNative.Modules.cs | 483 +
SunSharp/Native/SunVoxLibNative.Patterns.cs | 225 +
SunSharp/Native/SunVoxLibNative.cs | 477 +
SunSharp/{ => Native}/sunvox.h | 0
SunSharp/Note.cs | 52 +-
SunSharp/ObjectWrapper/Enums.cs | 10 -
SunSharp/ObjectWrapper/ModuleHandle.cs | 216 -
.../ObjectWrapper/ModuleType.Generated.cs | 157 -
.../Modules/IModuleHandleWrapper.cs | 106 -
.../Modules/SpecificModules.Generated.cs | 7895 -----------------
SunSharp/ObjectWrapper/PatternHandle.cs | 167 -
SunSharp/ObjectWrapper/Slot.cs | 272 -
SunSharp/ObjectWrapper/Slots.cs | 78 -
SunSharp/ObjectWrapper/SunVox.cs | 226 -
SunSharp/ObjectWrapper/Synthesizer.cs | 132 -
SunSharp/ObjectWrapper/Timeline.cs | 83 -
SunSharp/ObjectWrapper/VirtualPattern.cs | 104 -
SunSharp/PatternEvent.cs | 39 +-
SunSharp/README.md | 5 +-
SunSharp/RELEASE-NOTES.txt | 21 +
SunSharp/SunSharp.csproj | 31 +-
SunSharp/{ThinWrapper => }/SunVoxException.cs | 2 +-
SunSharp/SunVoxLibExtensions.cs | 214 +
SunSharp/ThinWrapper/SunVoxLibExtensions.cs | 1445 ---
SunSharp/ThinWrapper/ThinWrapperEnums.cs | 40 -
108 files changed, 4479 insertions(+), 15851 deletions(-)
delete mode 100644 CodeGeneration/CodeGeneration.csproj
delete mode 100644 CodeGeneration/Generators/AdditionalGenerator.cs
delete mode 100644 CodeGeneration/Generators/BaseGenerator.cs
delete mode 100644 CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs
delete mode 100644 CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs
delete mode 100644 CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs
delete mode 100644 CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs
delete mode 100644 CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs
delete mode 100644 CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs
delete mode 100644 CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs
delete mode 100644 CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs
delete mode 100644 CodeGeneration/ModuleDataParser.cs
delete mode 100644 CodeGeneration/ModuleTypes.cs
delete mode 100644 CodeGeneration/Program.cs
delete mode 100644 CodeGeneration/ReparsedData/Classes.cs
delete mode 100644 CodeGeneration/ReparsedData/Data.Regenerated.cs
delete mode 100644 CodeGeneration/ReparsedData/Data.cs
delete mode 100644 CodeGeneration/all_modules.sunvox
delete mode 100644 Examples/BaseExample.cs
delete mode 100644 Examples/ExampleContainer.cs
delete mode 100644 Examples/Examples.csproj
delete mode 100644 Examples/ObjectWrapperListModulesAndPatterns.cs
delete mode 100644 Examples/ObjectWrapperManagePatterns.cs
delete mode 100644 Examples/ObjectWrapperPlaySong.cs
delete mode 100644 Examples/ObjectWrapperSendEvents.cs
delete mode 100644 Examples/ObjectWrapperUseModules.cs
delete mode 100644 Examples/Program.cs
delete mode 100644 Examples/ThinWrapperListModulesAndPatterns.cs
delete mode 100644 Examples/ThinWrapperPlaySong.cs
delete mode 100644 Examples/ThinWrapperSendEvents.cs
delete mode 100644 Examples/ThinWrapperUserAudioCallback.cs
delete mode 100644 Examples/jump_demo.sunvox
delete mode 100644 Examples/the_lick.sunvox
create mode 100644 SunSharp.CodeGeneration/CodeGenerationTools/BaseGenerator.cs
rename {CodeGeneration/Generators => SunSharp.CodeGeneration/CodeGenerationTools}/CodeGenerationContext.cs (63%)
create mode 100644 SunSharp.CodeGeneration/CodeGenerationTools/PathHelper.cs
create mode 100644 SunSharp.CodeGeneration/NativeProxy/NativeProxyCodeGeneration.cs
create mode 100644 SunSharp.CodeGeneration/NativeProxy/NativeProxyGenerator.cs
create mode 100644 SunSharp.CodeGeneration/NativeProxy/TypeNameTranslation.cs
create mode 100644 SunSharp.CodeGeneration/SunSharp.CodeGeneration.csproj
create mode 100644 SunSharp.IntegrationTests/LockingTests.cs
create mode 100644 SunSharp.IntegrationTests/SunSharp.IntegrationTests.csproj
create mode 100644 SunSharp.IntegrationTests/SunVoxLibDriver.cs
rename SunSharp.Redistribution/lib/linux/lib_x86_64/sunvox.so => SunSharp.IntegrationTests/sunvox_linux_x86_64.so (100%)
create mode 100644 SunSharp.Redistribution/LibraryLoader.cs
create mode 100644 SunSharp.Redistribution/LibraryLoadingException.cs
create mode 100644 SunSharp.Redistribution/RELEASE-NOTES.txt
delete mode 100644 SunSharp.Redistribution/Redistribution.cs
create mode 100644 SunSharp.Redistribution/SunSharp.Redistribution.nuspec
create mode 100644 SunSharp.Redistribution/UnixLibraryHandler.cs
create mode 100644 SunSharp.Redistribution/WindowsLibraryHandler.cs
rename SunSharp.Redistribution/{lib/linux/lib_arm64 => runtimes/linux-arm64/native}/sunvox.so (100%)
create mode 100644 SunSharp.Redistribution/runtimes/linux-x86-64/native/native.so
rename SunSharp.Redistribution/{lib/linux/lib_x86/sunvox.so => runtimes/linux-x86/native/native.so} (100%)
rename SunSharp.Redistribution/{lib/macos/lib_arm64 => runtimes/macos-arm64/native}/sunvox.dylib (100%)
rename SunSharp.Redistribution/{lib/macos/lib_x86_64 => runtimes/macos-x86-64/native}/sunvox.dylib (100%)
rename SunSharp.Redistribution/{lib/windows/lib_x86_64 => runtimes/win-x64/native}/sunvox.dll (100%)
rename SunSharp.Redistribution/{lib/windows/lib_x86 => runtimes/win-x86-64/native}/sunvox.dll (100%)
create mode 100644 SunSharp.UnitTests/HelperTests.cs
create mode 100644 SunSharp.UnitTests/SunSharp.UnitTests.csproj
create mode 100644 SunSharp.UnitTests/SunVoxLibExtensionsTests.cs
create mode 100644 SunSharp.sln.DotSettings.user
rename SunSharp/{DerivedData => Data}/ControllerData.cs (94%)
rename SunSharp/{DerivedData/DerivedDataFactory.cs => Data/DataReader.cs} (89%)
rename SunSharp/{DerivedData => Data}/IDeepCopyable.cs (70%)
rename SunSharp/{DerivedData => Data}/ModuleData.cs (90%)
rename SunSharp/{DerivedData => Data}/PatternData.cs (97%)
rename SunSharp/{DerivedData => Data}/SongData.cs (98%)
rename SunSharp/{FineTunePair.cs => FineTune.cs} (76%)
create mode 100644 SunSharp/Helper.cs
create mode 100644 SunSharp/ISunVoxLib.Modules.cs
create mode 100644 SunSharp/ISunVoxLib.Patterns.cs
delete mode 100644 SunSharp/LibraryLoading/ProxyClass.Generated.cs
rename SunSharp/{Version.cs => LibraryVersion.cs} (62%)
create mode 100644 SunSharp/Native/ISunVoxLibC.cs
create mode 100644 SunSharp/Native/Loader/LibraryHandler.cs
create mode 100644 SunSharp/Native/Loader/NativeProxy.ISunVoxLibC.Generated.cs
create mode 100644 SunSharp/Native/Loader/NativeProxy.cs
create mode 100644 SunSharp/Native/SunVoxLibNative.Modules.cs
create mode 100644 SunSharp/Native/SunVoxLibNative.Patterns.cs
create mode 100644 SunSharp/Native/SunVoxLibNative.cs
rename SunSharp/{ => Native}/sunvox.h (100%)
delete mode 100644 SunSharp/ObjectWrapper/Enums.cs
delete mode 100644 SunSharp/ObjectWrapper/ModuleHandle.cs
delete mode 100644 SunSharp/ObjectWrapper/ModuleType.Generated.cs
delete mode 100644 SunSharp/ObjectWrapper/Modules/IModuleHandleWrapper.cs
delete mode 100644 SunSharp/ObjectWrapper/Modules/SpecificModules.Generated.cs
delete mode 100644 SunSharp/ObjectWrapper/PatternHandle.cs
delete mode 100644 SunSharp/ObjectWrapper/Slot.cs
delete mode 100644 SunSharp/ObjectWrapper/Slots.cs
delete mode 100644 SunSharp/ObjectWrapper/SunVox.cs
delete mode 100644 SunSharp/ObjectWrapper/Synthesizer.cs
delete mode 100644 SunSharp/ObjectWrapper/Timeline.cs
delete mode 100644 SunSharp/ObjectWrapper/VirtualPattern.cs
create mode 100644 SunSharp/RELEASE-NOTES.txt
rename SunSharp/{ThinWrapper => }/SunVoxException.cs (94%)
create mode 100644 SunSharp/SunVoxLibExtensions.cs
delete mode 100644 SunSharp/ThinWrapper/SunVoxLibExtensions.cs
delete mode 100644 SunSharp/ThinWrapper/ThinWrapperEnums.cs
diff --git a/CodeGeneration/CodeGeneration.csproj b/CodeGeneration/CodeGeneration.csproj
deleted file mode 100644
index 0601260..0000000
--- a/CodeGeneration/CodeGeneration.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- Exe
- net6.0
- enable
- disable
-
-
-
-
-
-
-
-
-
- PreserveNewest
-
-
-
-
diff --git a/CodeGeneration/Generators/AdditionalGenerator.cs b/CodeGeneration/Generators/AdditionalGenerator.cs
deleted file mode 100644
index 9d4e844..0000000
--- a/CodeGeneration/Generators/AdditionalGenerator.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-namespace CodeGeneration.Generators
-{
- public abstract class AdditionalGenerator
- {
- public CodeGenerationContext Context { get; set; }
- public ReparsedData.Data Data { get; set; }
-
- public AdditionalGenerator()
- {
- }
-
- protected string GetTabs() => Context.GetTabs();
-
- protected void AddIndent(Action action) => Context.AddIndent(action);
-
- protected void AppendLine(string value = "") => Context.AppendLine(value);
-
- protected void AppendLineNoTab(string value = "") => Context.AppendLineNoTab(value);
-
- protected void Append(string value = "") => Context.Append(value);
-
- public abstract void AppendCode();
- }
-}
diff --git a/CodeGeneration/Generators/BaseGenerator.cs b/CodeGeneration/Generators/BaseGenerator.cs
deleted file mode 100644
index d802267..0000000
--- a/CodeGeneration/Generators/BaseGenerator.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-namespace CodeGeneration.Generators
-{
- internal abstract class BaseGenerator
- {
- protected CodeGenerationContext Context = new CodeGenerationContext();
-
- protected string GetTabs() => Context.GetTabs();
-
- protected void AddIndent(Action action) => Context.AddIndent(action);
-
- protected void AppendLine(string value = "") => Context.AppendLine(value);
-
- protected void AppendLineNoTab(string value = "") => Context.AppendLineNoTab(value);
-
- protected void Append(string value = "") => Context.Append(value);
-
- internal bool Generate(string filePath)
- {
- GenerateBody();
- var content = Context.GetBuiltString();
-
- var existingFile = File.Exists(filePath) ? File.ReadAllText(filePath) : null;
- if (existingFile == content)
- return false;
- using (var file = File.CreateText(filePath))
- {
- file.Write(content);
- file.Flush();
- file.Close();
- }
-
- return true;
- }
-
- protected abstract void GenerateBody();
- }
-}
diff --git a/CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs b/CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs
deleted file mode 100644
index 58ec493..0000000
--- a/CodeGeneration/Generators/FMXAdditionalCodeGenerator.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-using CodeGeneration.ReparsedData;
-using SunSharp;
-
-namespace CodeGeneration.Generators
-{
- internal class FMXAdditionalCodeGenerator : AdditionalGenerator
- {
- private const int SubGeneratorStart = 1;
- private const int SubGeneratorEnd = 5;
-
- public override void AppendCode()
- {
- var methods = new string[]
- {
- "Volume",
- "Attack",
- "Decay",
- "SustainLevel",
- "Release",
- "AttackCurve",
- "DecayCurve",
- "ReleaseCurve",
- "Sustain",
- "SustainPedal",
- "EnvelopeScalingPerKey",
- "VolumeScalingPerKey",
- "VelocitySensitivity",
- "Waveform",
- "Noise",
- "Phase",
- "FreqMultiply",
- "ConstantPitch",
- "SelfModulation",
- "Feedback",
- "ModulationType",
- };
-
- foreach (var method in methods)
- {
- var module = Data.Modules.First(m => m.FriendlyName == "FMX");
- var originalController = module.Controllers.First(c => c.FriendlyName.StartsWith(method)
- && c.FriendlyName.EndsWith(
- $"{SubGeneratorStart}"));
- AppendGroupMethod(method, originalController);
- }
- }
-
- private void AppendGroupMethod(string name, CtlDesc c)
- {
- if (!string.IsNullOrWhiteSpace(c.EnumTypeName))
- {
- // ENUM
- var @enum = Data.Enums.First(e => e.Name == c.EnumTypeName);
-
- AppendLine("/// ");
- AppendLine($"/// index range: {SubGeneratorStart} to {SubGeneratorEnd} ");
- AppendLine(
- $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
- AppendLine("/// ");
-
- AppendLine($"public {@enum.Name} Get{name}(int index)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
- AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
- AppendLine();
- AppendLine(
- $"return ({@enum.Name})ModuleHandle.GetControllerValue({c.Id} + index - 1, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- });
- AppendLine("}");
- AppendLine();
-
- AppendLine("/// ");
- AppendLine($"/// index range: {SubGeneratorStart} to {SubGeneratorEnd} ");
- AppendLine(
- $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
- AppendLine("/// ");
-
- AppendLine($"public void Set{name}(int index, {@enum.Name} value)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
- AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
- AppendLine();
- AppendLine(
- $"ModuleHandle.SetControllerValue({c.Id} + index - 1, (int)value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- });
- AppendLine("}");
- AppendLine();
- }
- else
- {
- // REAL
- AppendLine("/// ");
- AppendLine($"/// index range: {SubGeneratorStart} to {SubGeneratorEnd} ");
- AppendLine($"/// Value range: {c.MinValue} to {c.MaxValue} ");
- AppendLine("/// ");
-
- AppendLine($"public int Get{name}(int index)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
- AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
- AppendLine();
- AppendLine(
- $"return ModuleHandle.GetControllerValue({c.Id} + index - 1, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- });
- AppendLine("}");
- AppendLine();
-
- AppendLine("/// ");
- AppendLine($"/// index range: {SubGeneratorStart} to {SubGeneratorEnd} ");
- AppendLine($"/// Value range: {c.MinValue} to {c.MaxValue} ");
- AppendLine("/// ");
-
- AppendLine($"public void Set{name}(int index, int value)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine($"if (index < {SubGeneratorStart} || index > {SubGeneratorEnd})");
- AddIndent(() => AppendLine("throw new System.ArgumentOutOfRangeException(nameof(index));"));
- AppendLine();
- AppendLine(
- $"ModuleHandle.SetControllerValue({c.Id} + index - 1, value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- });
- AppendLine("}");
- AppendLine();
- }
- }
- }
-}
diff --git a/CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs b/CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs
deleted file mode 100644
index 168e74a..0000000
--- a/CodeGeneration/Generators/MetaModuleAdditionalCodeGenerator.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace CodeGeneration.Generators
-{
- internal class MetaModuleAdditionalCodeGenerator : AdditionalGenerator
- {
- public override void AppendCode()
- {
- AppendLine("/// ");
- AppendLine("public void LoadFile(string path) => ModuleHandle.LoadIntoMetaModule(path);");
- AppendLine();
- AppendLine("/// ");
- AppendLine("public void LoadFile(byte[] data) => ModuleHandle.LoadIntoMetaModule(data);");
- }
- }
-}
diff --git a/CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs b/CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs
deleted file mode 100644
index 6eb7c6a..0000000
--- a/CodeGeneration/Generators/SamplerAdditionalCodeGenerator.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace CodeGeneration.Generators
-{
- internal class SamplerAdditionalCodeGenerator : AdditionalGenerator
- {
- public override void AppendCode()
- {
- AppendLine("/// ");
- AppendLine(
- "public void LoadSample(byte[] data, int sampleSlot = -1) => ModuleHandle.LoadSamplerSample(data, sampleSlot);");
- AppendLine();
- AppendLine("/// ");
- AppendLine(
- "public void LoadSample(string path, int sampleSlot = -1) => ModuleHandle.LoadSamplerSample(path, sampleSlot);");
- }
- }
-}
diff --git a/CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs
deleted file mode 100644
index 3c1d615..0000000
--- a/CodeGeneration/Generators/SpecificGenerators/ModuleData_Generator.cs
+++ /dev/null
@@ -1,147 +0,0 @@
-using CodeGeneration.ReparsedData;
-
-namespace CodeGeneration.Generators.SpecificGenerators
-{
- internal class ModuleData_Generator : BaseGenerator
- {
- private Data _data;
-
- public ModuleData_Generator(Data data)
- {
- _data = data;
- }
-
- protected override void GenerateBody()
- {
- AppendLine("/*");
- AppendLine(" * IMPORTANT!");
- AppendLine(" * Please run CodeGeneration each time this file is manually changed.");
- AppendLine("*/");
- AppendLine();
- AppendLine("using CodeGeneration.Generators;");
- AppendLine();
- AppendLine("namespace CodeGeneration.ReparsedData");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("public partial class Data");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("public static Data GetData()");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("var data = new Data();");
- AppendLine();
- AddEnums();
- AppendLine();
- AddModules();
- AppendLine();
- AppendLine("return data;");
- });
- AppendLine("}");
- });
- AppendLine("}");
- });
-
- AppendLine("}");
- }
-
- protected void AddEnums()
- {
- AppendLine($"data.Enums = new {nameof(EnumDesc)}[]");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var ed in _data.Enums.OrderBy(e => e.Name))
- {
- AppendLine($"new {nameof(EnumDesc)}(");
- AddIndent(() =>
- {
- AppendLine($"\"{ed.Name}\",");
- AppendLine("new []{");
- AddIndent(() =>
- {
- foreach (var val in ed.Values.OrderBy(v => v.value))
- {
- AppendLine($"({val.value}, \"{val.name}\"),");
- }
- });
- AppendLine("}");
- });
- AppendLine("),");
- }
- });
- AppendLine("};");
- }
-
- protected void AddModules()
- {
- AppendLine($"data.Modules = new {nameof(ModuleDesc)}[]");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var md in _data.Modules.OrderBy(n => n.FriendlyName))
- {
- AppendLine($"new {nameof(ModuleDesc)}(");
- AddIndent(() =>
- {
- AppendLine($"\"{md.FriendlyName}\",");
- AppendLine($"\"{md.InternalName}\",");
- AppendLine($"\"{md.Description}\",");
- AppendLine($"new List<{nameof(CtlDesc)}>()");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var cd in md.Controllers.OrderBy(c => c.Id))
- {
- AddController(cd);
- }
- });
- AppendLine("},");
- AppendLine($"new List<{nameof(CurveDesc)}>()");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var cd in md.Curves.OrderBy(c => c.Id))
- {
- AppendLine(
- $"new {nameof(CurveDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, {cd.Size}),");
- }
- });
- AppendLine("},");
- if (md.AdditionalCodeDescription == null)
- AppendLine("null");
- else
- {
- var genericType = md.AdditionalCodeDescription.GetType().GetGenericArguments()[0];
- AppendLine($"new {nameof(AddCodeDesc)}<{genericType.Name}>()");
- }
- });
- AppendLine("),");
- }
- });
- AppendLine("};");
- }
-
- private void AddController(CtlDesc cd)
- {
- if (cd.IgnoreInternalEnum)
- {
- AppendLine(
- $"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, ignoreInternalEnum: true),");
- }
- else if (!string.IsNullOrWhiteSpace(cd.EnumTypeName))
- {
- AppendLine(
- $"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}, enumTypeName: \"{cd.EnumTypeName}\"),");
- }
- else
- {
- AppendLine(
- $"new {nameof(CtlDesc)}({cd.Id}, \"{cd.FriendlyName}\", \"{cd.InternalName}\", \"{cd.Description}\", {cd.MinValue}, {cd.MaxValue}),");
- }
- }
- }
-}
diff --git a/CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs
deleted file mode 100644
index 73f3d99..0000000
--- a/CodeGeneration/Generators/SpecificGenerators/ModuleType_Generator.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-namespace CodeGeneration.Generators.SpecificGenerators
-{
- internal class ModuleType_Generator : BaseGenerator
- {
- private ICollection<(int value, string friendlyName, string internalName)> types = ModuleTypes.GetModuleTypes();
-
- protected override void GenerateBody()
- {
- AppendLine("/*");
- AppendLine(" * IMPORTANT!");
- AppendLine(
- " * Do not modify this file manually. It was generated automatically by the CodeGeneration project.");
- AppendLine("*/");
- AppendLine();
- AppendLine("namespace SunSharp.ObjectWrapper");
- AppendLine("{");
- AddIndent(() =>
- {
- GenerateEnum();
- AppendLine();
- GenerateHelper();
- });
- AppendLine("}");
- }
-
- private void GenerateEnum()
- {
- AppendLine("public enum ModuleType");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var value in types.OrderBy(t => t.friendlyName))
- AppendLine($"{value.friendlyName} = {value.value},");
- AppendLine($"Unknown = 0,");
- });
- AppendLine("}");
- }
-
- private void GenerateHelper()
- {
- AppendLine("public static class ModuleTypeHelper");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("public static string InternalNameFromType(ModuleType type)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("switch (type)");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var value in types.OrderBy(t => t.friendlyName))
- AppendLine($"case ModuleType.{value.friendlyName}: return \"{value.internalName}\";");
- AppendLine($"default: return \"unknown\";");
- });
- AppendLine("}");
- });
- AppendLine("}");
- AppendLine();
-
- AppendLine("public static ModuleType TypeFromInternalName(string internalName)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("switch (internalName)");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var value in types.OrderBy(t => t.friendlyName))
- AppendLine($"case \"{value.internalName}\": return ModuleType.{value.friendlyName};");
- AppendLine($"default: return ModuleType.Unknown;");
- });
- AppendLine("}");
- });
- AppendLine("}");
- });
- AppendLine("}");
- }
- }
-}
diff --git a/CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs
deleted file mode 100644
index e16826c..0000000
--- a/CodeGeneration/Generators/SpecificGenerators/ProxyClass_Generator.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-using System.Reflection;
-using SunSharp;
-
-namespace CodeGeneration.Generators.SpecificGenerators
-{
- internal class ProxyClass_Generator : BaseGenerator
- {
- private static Dictionary StrictTypeToType = new Dictionary()
- {
- { "Int32", "int" },
- { "UInt32", "uint" },
- { "Void", "void" }
- };
-
- private static Dictionary StrictTypeToName = new Dictionary()
- {
- { "Int32", "Int" },
- { "UInt32", "Uint" }
- };
-
- private static string Translate(object o, Dictionary d)
- {
- if (o == null)
- return null;
- var str = o.ToString();
- if (str == null)
- throw new InvalidOperationException();
- return d.TryGetValue(str, out var val) ? val : str;
- }
-
- private static string TranslateToType(object o) => Translate(o, StrictTypeToType);
-
- private static string TranslateToName(object o) => Translate(o, StrictTypeToName);
-
- protected override void GenerateBody()
- {
- var type = typeof(ISunVoxLib);
- if (!type.IsInterface)
- throw new Exception();
-
- var (delegateDefinitions, delegates, delegateCalls) = ReadData(type);
-
- AppendLine("using System;");
- AppendLine("using System.Reflection;");
- AppendLine();
- AppendLine("namespace SunSharp.LibraryLoading");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("public class ProxyClass : ISunVoxLib");
- AppendLine("{");
- AddIndent(() =>
- {
- AddConstructor();
- AppendLine();
- AppendLine("#region delegate definitions");
- AppendLine();
- foreach (var d in delegateDefinitions)
- {
- AppendLine(d);
- AppendLine();
- }
-
- AppendLine("#endregion delegate definitions");
- AppendLine();
- AppendLine("#region delegates");
- AppendLine();
- AppendLineNoTab("#pragma warning disable CS0649");
- AppendLine();
- foreach (var d in delegates)
- {
- AppendLine(d);
- AppendLine();
- }
-
- AppendLineNoTab("#pragma warning restore CS0649");
- AppendLine();
- AppendLine("#endregion delegates");
- AppendLine();
- AppendLine($"#region interface");
- AppendLine();
- foreach (var d in delegateCalls)
- {
- AppendLine(d);
- AppendLine();
- }
-
- AppendLine($"#endregion interface");
- });
- AppendLine("}");
- });
- AppendLine("}");
- }
-
- private void AddDelegateDefinitions()
- {
- }
-
- private void AddConstructor()
- {
- AppendLine("public ProxyClass(Func GetDelegate)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("var type = GetType();");
- AppendLine("var fields = type.GetFields(BindingFlags.Instance | BindingFlags.NonPublic);");
- AppendLine("foreach (var field in fields)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("if (typeof(Delegate).IsAssignableFrom(field.FieldType))");
- AppendLine("{");
- AddIndent(() => { AppendLine("field.SetValue(this, GetDelegate(field.Name, field.FieldType));"); });
- AppendLine("}");
- });
- AppendLine("}");
- });
- AppendLine("}");
- }
-
- private static (ICollection delegateDefinitions, ICollection delegates, ICollection
- delegateCalls) ReadData(Type t)
- {
- HashSet delegateDefinitions = new();
- HashSet delegates = new();
- HashSet delegateCalls = new();
- foreach (var method in t.GetMethods())
- {
- (var delegateDefinition, var @delegate, var delegateCall) = ParseMethod(method);
- delegateDefinitions.Add(delegateDefinition);
- delegates.Add(@delegate);
- delegateCalls.Add(delegateCall);
- }
-
- return (delegateDefinitions.OrderBy(s => s).ToList(), delegates.OrderBy(s => s).ToList(),
- delegateCalls.OrderBy(s => s).ToList());
- }
-
- private static (string delegateDefinition, string @delegate, string delegateCall) ParseMethod(MethodInfo info)
- {
- string returnsTypeName = TranslateToType(info.ReturnType.Name) ?? "void";
-
- string delegateTypeName;
- {
- var pars = info.GetParameters();
- var returnsType = TranslateToName(info.ReturnType.Name) ?? "Void";
- var @out = returnsType.Length == 0 ? "Void" : returnsType;
- var @in = string.Join("_", pars.Select(s => TranslateToName(s.ParameterType.Name)));
- @in = @in.Length == 0 ? "Void" : @in;
- delegateTypeName = $"o_{@out}_i_{@in}";
- }
-
- string delegateTypeArgs;
- {
- var namedPars = new List<(Type, string)>();
- foreach (var parameter in info.GetParameters())
- {
- int count = namedPars.Count(p => p.Item1 == parameter.ParameterType);
- var parameterName =
- $"_{TranslateToType(parameter.ParameterType.Name)}{(count != 0 ? count : "")}"; // int, int2, int3...
- namedPars.Add((parameter.ParameterType, parameterName));
- }
-
- delegateTypeArgs =
- string.Join(", ", namedPars.Select(p => $"{TranslateToType(p.Item1.Name)} {p.Item2}"));
- }
-
- string delegateInstanceName = $"{info.Name}";
-
- string delegateDefinition = $"private delegate {returnsTypeName} {delegateTypeName}({delegateTypeArgs});";
- string @delegate = $"private {delegateTypeName} {delegateInstanceName};";
- string delegateCall;
- // call
- {
- var pars = string.Join(", ",
- info.GetParameters().Select(p => $"{TranslateToType(p.ParameterType.Name)} {p.Name}"));
- var forwardedPars = string.Join(", ", info.GetParameters().Select(p => p.Name));
- delegateCall =
- $"{returnsTypeName} {info.DeclaringType?.Name}.{info.Name}({pars}) => {delegateInstanceName}({forwardedPars});";
- }
-
- return (delegateDefinition, @delegate, delegateCall);
- }
- }
-}
diff --git a/CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs b/CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs
deleted file mode 100644
index 4abc7df..0000000
--- a/CodeGeneration/Generators/SpecificGenerators/SpecificModules_Generator.cs
+++ /dev/null
@@ -1,249 +0,0 @@
-using CodeGeneration.ReparsedData;
-using SunSharp;
-using SunSharp.ObjectWrapper.Modules;
-
-namespace CodeGeneration.Generators.SpecificGenerators
-{
- internal class SpecificModules_Generator : BaseGenerator
- {
- private Data _data;
-
- public SpecificModules_Generator(Data data)
- {
- _data = data;
- }
-
- protected override void GenerateBody()
- {
- AppendLine("/*");
- AppendLine(" * IMPORTANT!");
- AppendLine(
- " * Do not modify this file manually. It was generated automatically by the CodeGeneration project.");
- AppendLine("*/");
- AppendLine();
- AppendLine("namespace SunSharp.ObjectWrapper.Modules");
- AppendLine("{");
- AddIndent(() =>
- {
- GenerateEnums();
- AppendLine();
- GenerateExtensions();
- AppendLine();
- GenerateStructs();
- });
-
- AppendLine("}");
- }
-
- private void GenerateEnums()
- {
- AppendLine("#region enums");
- var enums = _data.Enums.OrderBy(e => e.Name).ToArray();
- for (int i = 0; i < enums.Length; i++)
- {
- AppendLine();
- var @enum = enums[i];
- AppendLine($"public enum {@enum.Name} : ushort");
- AppendLine("{");
- AddIndent(() =>
- {
- foreach (var value in @enum.Values)
- {
- AppendLine($"{value.name} = {value.value},");
- }
- });
- AppendLine("}");
- }
-
- AppendLine();
- AppendLine("#endregion enums");
- }
-
- private void GenerateExtensions()
- {
- AppendLine("public static class ModuleExtensions");
- AppendLine("{");
- AddIndent(() =>
- {
- var modules = _data.Modules.OrderBy(m => m.FriendlyName).ToArray();
- for (int i = 0; i < modules.Length; i++)
- {
- var module = modules[i];
- AppendLine(
- $"public static {module.FriendlyName}ModuleHandle As{module.FriendlyName}(this ModuleHandle module) => new {module.FriendlyName}ModuleHandle(module);");
-
- if (i != modules.Length - 1)
- AppendLine();
- }
- });
- AppendLine("}");
- }
-
- private void GenerateStructs()
- {
- var modules = _data.Modules.OrderBy(m => m.FriendlyName).ToArray();
- for (var i = 0; i < modules.Length; i++)
- {
- var m = modules[i];
-
- AppendLine($"public struct {m.FriendlyName}ModuleHandle : {nameof(IModuleHandleWrapper)}");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine("public ModuleHandle ModuleHandle { get; private set; }");
- AppendLine();
- AppendLine($"public {m.FriendlyName}ModuleHandle(ModuleHandle module)");
- AppendLine("{");
- AddIndent(() => { AppendLine("ModuleHandle = module;"); });
- AppendLine("}");
-
- AppendLine();
- GenerateModuleMethods(m);
-
- if (m.Controllers.Any() || m.Curves.Any())
- AppendLine();
-
- if (m.Controllers.Any())
- {
- AppendLine("#region controllers");
- AppendLine();
- GenerateControllers(m);
- AppendLine("#endregion controllers");
- }
-
- if (m.Controllers.Any() && m.Curves.Any())
- AppendLine();
-
- if (m.Curves.Any())
- {
- AppendLine("#region curves");
- AppendLine();
- GenerateCurves(m);
- AppendLine("#endregion curves");
- }
-
- if (m.Curves.Any() && m.AdditionalCodeDescription != null)
- {
- AppendLine();
- }
- });
- AppendLine("}");
- if (i != modules.Length - 1)
- AppendLine();
- }
- }
-
- private void GenerateModuleMethods(ModuleDesc m)
- {
- if (m.AdditionalCodeDescription == null)
- return;
-
- var acd = m.AdditionalCodeDescription;
- AppendLine();
- AppendLine("#region module type-specific methods");
- AppendLine();
- acd.AddCode(Context, _data);
- AppendLine("#endregion module type-specific methods");
- AppendLine();
- }
-
- private void GenerateControllers(ModuleDesc module)
- {
- foreach (var c in module.Controllers.OrderBy(c => c.FriendlyName))
- {
- if (!string.IsNullOrWhiteSpace(c.EnumTypeName))
- {
- // ENUM
- var @enum = _data.Enums.First(e => e.Name == c.EnumTypeName);
- AppendLine("/// ");
- AppendLine($"/// Original name: {c.InternalName}");
- AppendLine(
- $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
- if (!string.IsNullOrWhiteSpace(c.Description))
- AppendLine($"/// {c.Description} ");
- AppendLine("/// ");
- AppendLine(
- $"public {@enum.Name} Get{c.FriendlyName}() => ({@enum.Name})ModuleHandle.GetControllerValue({c.Id}, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- AppendLine();
- AppendLine("/// ");
- AppendLine($"/// Original name: {c.InternalName}");
- AppendLine(
- $"/// Possible values: {string.Join(", ", @enum.Values.Select(v => v.name))} ");
- if (!string.IsNullOrWhiteSpace(c.Description))
- AppendLine($"/// {c.Description} ");
- AppendLine("/// ");
- AppendLine(
- $"public void Set{c.FriendlyName}({@enum.Name} value) => ModuleHandle.SetControllerValue({c.Id}, (int)value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- AppendLine();
- }
- else
- {
- // REAL
- AppendLine("/// ");
- AppendLine($"/// Original name: {c.InternalName}");
- AppendLine($"/// Value range: {c.MinValue} to {c.MaxValue} ");
- if (!string.IsNullOrWhiteSpace(c.Description))
- AppendLine($"/// {c.Description} ");
- AppendLine("/// ");
- AppendLine(
- $"public int Get{c.FriendlyName}() => ModuleHandle.GetControllerValue({c.Id}, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- AppendLine();
- AppendLine("/// ");
- AppendLine($"/// Original name: {c.InternalName}");
- AppendLine($"/// Value range: {c.MinValue} to {c.MaxValue} ");
- if (!string.IsNullOrWhiteSpace(c.Description))
- AppendLine($"/// {c.Description} ");
- AppendLine("/// ");
- AppendLine(
- $"public void Set{c.FriendlyName}(int value) => ModuleHandle.SetControllerValue({c.Id}, value, {nameof(ValueScalingType)}.{ValueScalingType.Displayed});");
- AppendLine();
- }
- }
- }
-
- private void GenerateCurves(ModuleDesc module)
- {
- foreach (var curve in module.Curves.OrderBy(c => c.FriendlyName))
- {
- AppendLine("/// ");
- AppendLine($"/// Read {curve.FriendlyName} containing {curve.Size} values.");
- AppendLine($"/// Value range: {curve.MinValue} to {curve.MaxValue}. ");
- if (!string.IsNullOrWhiteSpace(curve.Description))
- AppendLine($"/// {curve.Description} ");
- AppendLine("/// ");
- AppendLine($"public void Read{curve.FriendlyName}(float[] buffer)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine($"if (buffer.Length < {curve.Size})");
- AddIndent(() =>
- AppendLine(
- $"throw new System.ArgumentException(\"Buffer must be at least of size {curve.Size}\");"));
- AppendLine();
- AppendLine($"ModuleHandle.ReadCurve({curve.Id}, buffer);");
- });
- AppendLine("}");
- AppendLine();
- AppendLine("/// ");
- AppendLine($"/// Write {curve.FriendlyName} containing {curve.Size} values.");
- AppendLine($"/// Value range: {curve.MinValue} to {curve.MaxValue}. ");
- if (!string.IsNullOrWhiteSpace(curve.Description))
- AppendLine($"/// {curve.Description} ");
- AppendLine("/// ");
- AppendLine($"public void Write{curve.FriendlyName}(float[] buffer)");
- AppendLine("{");
- AddIndent(() =>
- {
- AppendLine($"if (buffer.Length < {curve.Size})");
- AddIndent(() =>
- AppendLine(
- $"throw new System.ArgumentException(\"Buffer must be at least of size {curve.Size}\");"));
- AppendLine();
- AppendLine($"ModuleHandle.WriteCurve({curve.Id}, buffer);");
- });
- AppendLine("}");
- AppendLine();
- }
- }
- }
-}
diff --git a/CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs b/CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs
deleted file mode 100644
index f02fad7..0000000
--- a/CodeGeneration/Generators/VorbisPlayerAdditionalGenerator.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace CodeGeneration.Generators
-{
- internal class VorbisPlayerAdditionalGenerator : AdditionalGenerator
- {
- public override void AppendCode()
- {
- AppendLine("/// ");
- AppendLine("public void LoadVorbis(string path) => ModuleHandle.LoadIntoVorbisPLayer(path);");
- AppendLine();
- AppendLine("/// ");
- AppendLine("public void LoadIntoVorbisPLayer(byte[] data) => ModuleHandle.LoadIntoVorbisPLayer(data);");
- }
- }
-}
diff --git a/CodeGeneration/ModuleDataParser.cs b/CodeGeneration/ModuleDataParser.cs
deleted file mode 100644
index a1c2180..0000000
--- a/CodeGeneration/ModuleDataParser.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-using System.Text.RegularExpressions;
-using CodeGeneration.ReparsedData;
-using SunSharp;
-using SunSharp.ObjectWrapper;
-using SunSharp.ThinWrapper;
-
-namespace CodeGeneration
-{
- internal class ModuleDataParser
- {
- internal static Data ReparseModuleData(Slot slot)
- {
- var oldData = Data.GetData();
-
- var newData = new Data();
- newData.Modules = new List();
- newData.Enums = oldData.Enums;
-
- RecreateModuleDescriptions(oldData, newData, slot);
-
- return newData;
- }
-
- internal static void RecreateModuleDescriptions(Data oldData, Data newData, Slot slot)
- {
- foreach (var module in slot.Synthesizer)
- {
- var internalName = module.GetName();
- var existingDescription = oldData.Modules.FirstOrDefault(d => d.InternalName == internalName);
- var newDescription = CreateModuleDescription(newData, existingDescription, module);
- newData.Modules.Add(newDescription);
- }
- }
-
- internal static ModuleDesc CreateModuleDescription(Data newData, ModuleDesc original,
- SunSharp.ObjectWrapper.ModuleHandle module)
- {
- var internalName = module.Slot.Library.GetModuleName(module.Slot.Id, module.Id);
- var friendlyName = ModuleTypes.GetFriendlyName(internalName);
- var description = original?.Description ?? string.Empty;
- var controllerDescriptions = new List();
- var curveDescriptions = original?.Curves ?? new List();
-
- for (int i = 0; i < module.GetControllerCount(); i++)
- {
- var originalControllerDescription = original?.Controllers?.FirstOrDefault(c => c.Id == i);
- var controllerDescription =
- CreateControllerDescription(newData, originalControllerDescription, module, i);
- controllerDescriptions.Add(controllerDescription);
- }
-
- return new ModuleDesc(friendlyName, internalName, description, controllerDescriptions, curveDescriptions,
- original?.AdditionalCodeDescription);
- }
-
- internal static CtlDesc CreateControllerDescription(Data newData, CtlDesc original,
- SunSharp.ObjectWrapper.ModuleHandle module, int i)
- {
- var originalName = module.GetControllerName(i);
- var friendlyName = original?.FriendlyName ?? SanitizeControllerName(originalName);
- var description = original?.Description ?? string.Empty;
-
- var minValue = module.GetControllerMinValue(i, ValueScalingType.Displayed);
- var maxValue = module.GetControllerMaxValue(i, ValueScalingType.Displayed);
-
- if (original != null)
- {
- if (original.MinValue != minValue)
- Console.WriteLine(
- $"MinValue changed on {i}.{friendlyName}@{module.GetName()} (was: {original.MinValue}, is: {minValue})");
- if (original.MaxValue != maxValue)
- Console.WriteLine(
- $"MaxValue changed on {i}.{friendlyName}@{module.GetName()} (was: {original.MaxValue}, is: {maxValue})");
- if (original.InternalName != originalName)
- Console.WriteLine(
- $"InternalName changed on {i}.{friendlyName}@{module.GetName()} (was: {original.FriendlyName}, is: {friendlyName})");
- }
-
- var originalIsEnum = module.GetControllerType(i);
- if (originalIsEnum == ControllerType.Enum)
- {
- if (original == null)
- {
- Console.WriteLine($"Newly found controller {i}.{friendlyName}@{module.GetName()} is of type Enum");
- }
- else if (original.IgnoreInternalEnum == false && !string.IsNullOrWhiteSpace(original.EnumTypeName))
- {
- var @enum = newData.Enums.FirstOrDefault(e => e.Name == original.EnumTypeName);
- if (@enum == null)
- {
- Console.WriteLine(
- $"Enum {original.EnumTypeName} of controller {i}.{friendlyName}@{module.GetName()} was not found!");
- }
- else
- {
- var min = @enum.Values.Min(v => v.value);
- var max = @enum.Values.Max(v => v.value);
- if (min != original.MinValue || max != original.MaxValue)
- {
- Console.WriteLine(
- $"Enum {@enum.Name} doesn't fit value range of controller {i}.{friendlyName}@{module.GetName()} (is: {min} to {max}, but expected ({minValue} to {maxValue})");
- }
- }
- }
- else if (original.IgnoreInternalEnum == false)
- {
- Console.WriteLine(
- $"Missing enum type or ignore on controller {i}.{friendlyName}@{module.GetName()}");
- }
- }
- else
- {
- if (original != null)
- {
- if (!string.IsNullOrWhiteSpace(original.EnumTypeName))
- {
- Console.WriteLine(
- $"Controller {i}.{friendlyName}@{module.GetName()} is of type Real, but enum name is assigned");
- }
-
- if (original.IgnoreInternalEnum)
- {
- Console.WriteLine(
- $"Controller {i}.{friendlyName}@{module.GetName()} has unnecessary ignore of missing Enum, since controller is of type Real");
- }
- }
- }
-
- return new CtlDesc(i, friendlyName, originalName, description, minValue, maxValue,
- original?.IgnoreInternalEnum ?? false, original?.EnumTypeName);
- }
-
- internal static string SanitizeControllerName(string name)
- {
- Regex rgx = new Regex("[^a-zA-Z0-9 ]");
- var _sanitized = rgx.Replace(name, " ");
- var words = _sanitized.Split(' ');
- var capitalizedWords = words.Select(s => s.Trim())
- .Where(s => !string.IsNullOrWhiteSpace(s))
- .Select(s => string.Concat(char.ToUpper(s[0]), s[1..]));
- return string.Join(string.Empty, capitalizedWords);
- }
- }
-}
diff --git a/CodeGeneration/ModuleTypes.cs b/CodeGeneration/ModuleTypes.cs
deleted file mode 100644
index b083a45..0000000
--- a/CodeGeneration/ModuleTypes.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-namespace CodeGeneration
-{
- public partial class ModuleTypes
- {
- public static ICollection<(int value, string friendlyName, string internalName)> GetModuleTypes() =>
- new (int, string, string)[]
- {
- (1, "AnalogGenerator", "Analog generator"),
- (2, "DrumSynth", "DrumSynth"),
- (3, "FM", "FM"),
- (4, "FMX", "FMX"),
- (5, "Generator", "Generator"),
- (6, "Input", "Input"),
- (7, "Kicker", "Kicker"),
- (8, "VorbisPlayer", "Vorbis player"),
- (9, "Sampler", "Sampler"),
- (10, "SpectraVoice", "SpectraVoice"),
-
- (64, "Amplifier", "Amplifier"),
- (65, "Compressor", "Compressor"),
- (66, "DcBlocker", "DC Blocker"),
- (67, "Delay", "Delay"),
- (68, "Distortion", "Distortion"),
- (69, "Echo", "Echo"),
- (70, "EQ", "EQ"),
- (71, "FFT", "FFT"),
- (72, "Filter", "Filter"),
- (73, "FilterPro", "Filter Pro"),
- (74, "Flanger", "Flanger"),
- (75, "LFO", "LFO"),
- (76, "Loop", "Loop"),
- (77, "Modulator", "Modulator"),
- (78, "PitchShifter", "Pitch shifter"),
- (79, "Reverb", "Reverb"),
- (80, "VocalFilter", "Vocal filter"),
- (81, "Vibrato", "Vibrato"),
- (82, "WaveShaper", "WaveShaper"),
- (128, "ADSR", "ADSR"),
- (129, "ControlToNote", "Ctl2Note"),
- (130, "Feedback", "Feedback"),
- (131, "Glide", "Glide"),
- (132, "GPIO", "GPIO"),
- (133, "MetaModule", "MetaModule"),
- (134, "MultiControl", "MultiCtl"),
- (135, "MultiSynth", "MultiSynth"),
- (136, "PitchToControl", "Pitch2Ctl"),
- (137, "PitchDetector", "Pitch Detector"),
- (138, "SoundToControl", "Sound2Ctl"),
- (139, "VelocityToControl", "Velocity2Ctl"),
-
- (-1, "Output", "Output"),
- };
-
- private static ICollection<(int value, string friendlyName, string internalName)> _privateCollection =
- GetModuleTypes();
-
- public static string GetFriendlyName(string internalName)
- {
- return _privateCollection.FirstOrDefault(t => t.internalName == internalName).friendlyName;
- }
- }
-}
diff --git a/CodeGeneration/Program.cs b/CodeGeneration/Program.cs
deleted file mode 100644
index 0fbfcb4..0000000
--- a/CodeGeneration/Program.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-using System.Runtime.CompilerServices;
-using CodeGeneration.Generators.SpecificGenerators;
-using CodeGeneration.ReparsedData;
-using SunSharp.ObjectWrapper;
-
-namespace CodeGeneration
-{
- internal static class Program
- {
- internal static SunVox _sunVox;
-
- internal static string GetSourceFilePathName([CallerFilePath] string callerFilePath = null) =>
- Path.GetDirectoryName(callerFilePath) ?? "";
-
- private static float[] buffer = new float[32];
-
- internal static void GuaranteeEventProcessing()
- {
- // TODO FIXME UGLY
- _sunVox.AudioCallback(buffer, 0, _sunVox.GetTicks());
- }
-
- internal static void Main()
- {
- // generate ProxyClass
- {
- var path = Path.GetDirectoryName(GetSourceFilePathName());
- path = Path.Join(path, "SunSharp", "LibraryLoading", "ProxyClass.Generated.cs");
-
- var generator = new ProxyClass_Generator();
- var changed = generator.Generate(path);
- if (changed)
- {
- Console.WriteLine("ProxyClass was Generated, rebuild SunSharp and re-run to continue.");
- return;
- }
- }
-
- // generate ModuleType
- {
- var path = Path.GetDirectoryName(GetSourceFilePathName()); // SunSharp parent path
- path = Path.Join(path, "SunSharp", "ObjectWrapper", "ModuleType.Generated.cs");
-
- var generator = new ModuleType_Generator();
- var changed = generator.Generate(path);
- if (changed)
- {
- Console.WriteLine("ModuleType was generated, rebuild and re-run to regenerate SongData!");
- return;
- }
- }
-
- SunSharp.Redistribution.LibraryLoader.LoadLibrary();
- var lib = SunSharp.Redistribution.LibraryLoader.GetLibrary();
-
- _sunVox = new SunVox(lib, 48000, OutputType.Float32, singleThreaded: true, noDebugOutput: false);
- var slot = _sunVox.Slots[0];
- slot.Open();
- slot.Load("all_modules.sunvox");
-
- // is ModuleTypes up to date?
- {
- var set = new HashSet();
- foreach (var value in ModuleTypes.GetModuleTypes())
- set.Add(value.internalName);
-
- foreach (var module in _sunVox.Slots[0].Synthesizer)
- {
- var name = ModuleTypeHelper.InternalNameFromType(module.GetModuleType());
- if (!set.Contains(name))
- {
- throw new Exception($"Type {name} is not known, add it to the ModuleTypes.cs first!");
- }
- }
- }
-
- // regenerate SongData
- {
- var data = ModuleDataParser.ReparseModuleData(slot);
-
- var path = Path.Join(GetSourceFilePathName(), "ReparsedData", "Data.Regenerated.cs");
-
- var generator = new ModuleData_Generator(data);
- var changed = generator.Generate(path);
- if (changed)
- {
- Console.WriteLine("ModuleData was regenerated, rebuild and re-run to regenerate SpecificModules!");
- return;
- }
- }
- slot.Close();
- _sunVox.Dispose();
-
- // generate SpecificModules
- {
- var data = Data.GetData();
-
- var path = Path.GetDirectoryName(GetSourceFilePathName()); // SunSharp parent path
- path = Path.Join(path, "SunSharp", "ObjectWrapper", "Modules", "SpecificModules.Generated.cs");
-
- var generator = new SpecificModules_Generator(data);
- var changed = generator.Generate(path);
- if (changed)
- {
- Console.WriteLine("SpecificModules was generated, rebuild SunSharp!");
- return;
- }
- }
-
- Console.WriteLine("Nothing was changed, yay! :)");
- }
- }
-}
diff --git a/CodeGeneration/ReparsedData/Classes.cs b/CodeGeneration/ReparsedData/Classes.cs
deleted file mode 100644
index 35f0ae9..0000000
--- a/CodeGeneration/ReparsedData/Classes.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-using CodeGeneration.Generators;
-
-namespace CodeGeneration.ReparsedData
-{
- public class ModuleDesc
- {
- public string FriendlyName { get; set; }
- public string InternalName { get; set; }
- public string Description { get; set; }
- public ICollection Controllers { get; set; }
- public ICollection Curves { get; set; }
- public AddCodeDesc AdditionalCodeDescription { get; set; }
-
- public ModuleDesc(string friendlyName, string internalName, string description,
- ICollection controllers, ICollection curves, AddCodeDesc aditionalCodeDescription)
- {
- FriendlyName = friendlyName;
- InternalName = internalName;
- Description = description;
- Controllers = controllers;
- Curves = curves;
- AdditionalCodeDescription = aditionalCodeDescription;
- }
- }
-
- public class EnumDesc
- {
- public string Name { get; set; }
- public ICollection<(int value, string name)> Values { get; set; }
-
- public EnumDesc(string name, params (int, string)[] values)
- {
- Name = name;
- Values = values;
- }
- }
-
- public class CtlDesc
- {
- public int Id { get; set; }
- public string FriendlyName { get; set; }
- public string InternalName { get; set; }
- public string Description { get; set; }
- public int MinValue { get; set; }
- public int MaxValue { get; set; }
- public bool IgnoreInternalEnum { get; set; }
- public string EnumTypeName { get; set; }
-
- public CtlDesc(int id, string friendlyName, string internalName, string description, int min, int max,
- bool ignoreInternalEnum = false, string enumTypeName = null)
- {
- Id = id;
- FriendlyName = friendlyName;
- InternalName = internalName;
- Description = description;
- MinValue = min;
- MaxValue = max;
- EnumTypeName = enumTypeName;
- IgnoreInternalEnum = ignoreInternalEnum;
- }
-
- public CtlDesc(int id, string friendlyName, string internalname, string description, int min, int max,
- string enumTypeName)
- {
- Id = id;
- FriendlyName = friendlyName;
- InternalName = internalname;
- Description = description;
- MinValue = min;
- MaxValue = max;
- EnumTypeName = enumTypeName;
- IgnoreInternalEnum = false;
- }
- }
-
- public class CurveDesc
- {
- public int Id { get; set; }
- public string FriendlyName { get; set; }
- public int Size { get; set; }
- public float MinValue { get; set; }
- public float MaxValue { get; set; }
- public string Description { get; set; }
-
- public CurveDesc(int id, string friendlyName, string description, float min, float max, int size)
- {
- Id = id;
- FriendlyName = friendlyName;
- MinValue = min;
- MaxValue = max;
- Size = size;
- Description = description;
- }
- }
-
- public abstract class AddCodeDesc
- {
- public abstract void AddCode(CodeGenerationContext context, Data data = null);
- }
-
- public class AddCodeDesc : AddCodeDesc where T : AdditionalGenerator, new()
- {
- public override void AddCode(CodeGenerationContext context, Data data = null)
- {
- var t = new T
- {
- Context = context,
- Data = data
- };
- t.AppendCode();
- }
- }
-}
diff --git a/CodeGeneration/ReparsedData/Data.Regenerated.cs b/CodeGeneration/ReparsedData/Data.Regenerated.cs
deleted file mode 100644
index 02bf404..0000000
--- a/CodeGeneration/ReparsedData/Data.Regenerated.cs
+++ /dev/null
@@ -1,1697 +0,0 @@
-/*
- * IMPORTANT!
- * Please run CodeGeneration each time this file is manually changed.
-*/
-
-using CodeGeneration.Generators;
-
-namespace CodeGeneration.ReparsedData
-{
- public partial class Data
- {
- public static Data GetData()
- {
- var data = new Data();
-
- data.Enums = new EnumDesc[]
- {
- new EnumDesc(
- "ADSRCurveType",
- new []{
- (0, "Linear"),
- (1, "Exp1"),
- (2, "Exp2"),
- (3, "Nexp1"),
- (4, "Nexp2"),
- (5, "Sin"),
- (6, "Rect"),
- (7, "SmoothRect"),
- (8, "Bit2"),
- (9, "Bit3"),
- (10, "Bit4"),
- (11, "Bit5"),
- }
- ),
- new EnumDesc(
- "ADSRMode",
- new []{
- (0, "Generator"),
- (1, "AmplitudeModulatorMono"),
- (2, "AmplitudeModulatorStereo"),
- }
- ),
- new EnumDesc(
- "ADSROnNoteOffBehaviour",
- new []{
- (0, "DoNothing"),
- (1, "StopOnLastNote"),
- (2, "Stop"),
- }
- ),
- new EnumDesc(
- "ADSROnNoteOnBehaviour",
- new []{
- (0, "DoNothing"),
- (1, "StartOnFirstNote"),
- (2, "Start"),
- }
- ),
- new EnumDesc(
- "ADSRSmoothTransitions",
- new []{
- (0, "Off"),
- (1, "RestartAndVolumeChange"),
- (2, "RestartAndVolumeChangeSmooth"),
- (3, "VolumeChange"),
- }
- ),
- new EnumDesc(
- "ADSRSustainMode",
- new []{
- (0, "Off"),
- (1, "On"),
- (2, "Repeat"),
- }
- ),
- new EnumDesc(
- "AnalogGeneratorEnvelopeMode",
- new []{
- (0, "Off"),
- (1, "SustainOff"),
- (2, "SustainOn"),
- }
- ),
- new EnumDesc(
- "AnalogGeneratorFilterType",
- new []{
- (0, "Off"),
- (1, "LP12dB"),
- (2, "HP12dB"),
- (3, "BP12dB"),
- (4, "BR12dB"),
- (5, "LP24dB"),
- (6, "HP24dB"),
- (7, "BP24dB"),
- (8, "BR24dB"),
- }
- ),
- new EnumDesc(
- "AnalogGeneratorOsc2Mode",
- new []{
- (0, "Add"),
- (1, "Sub"),
- (2, "Mul"),
- (3, "Min"),
- (4, "Max"),
- (5, "BitwiseAnd"),
- (6, "BitwiseXor"),
- }
- ),
- new EnumDesc(
- "AnalogGeneratorWaveform",
- new []{
- (0, "Triangle"),
- (1, "Saw"),
- (2, "Square"),
- (3, "NoiseSampler"),
- (4, "Drawn"),
- (5, "Sin"),
- (6, "Hsin"),
- (7, "Asin"),
- (8, "DrawnSpline"),
- (9, "NoiseSamplerSpline"),
- (10, "WhiteNoise"),
- (11, "PinkNoise"),
- (12, "RedNoise"),
- (13, "BlueNosie"),
- (14, "VioletNoise"),
- (15, "GreyNoise"),
- (16, "Harmonics"),
- }
- ),
- new EnumDesc(
- "Channels",
- new []{
- (0, "Stereo"),
- (1, "Mono"),
- }
- ),
- new EnumDesc(
- "ChannelsInverted",
- new []{
- (0, "Mono"),
- (1, "Stereo"),
- }
- ),
- new EnumDesc(
- "CompressorMode",
- new []{
- (0, "Peak"),
- (1, "RMS"),
- (2, "PeakZeroLatency"),
- }
- ),
- new EnumDesc(
- "ControlToNoteOffBehaviour",
- new []{
- (0, "Nothing"),
- (1, "OnMinPitch"),
- (2, "OnMaxPitch"),
- }
- ),
- new EnumDesc(
- "ControlToNoteOnBehaviour",
- new []{
- (0, "Nothing"),
- (1, "OnPitchChange"),
- }
- ),
- new EnumDesc(
- "DelayUnit",
- new []{
- (0, "SecondDivBy16384"),
- (1, "Millisecond"),
- (2, "Hz"),
- (3, "Tick"),
- (4, "Line"),
- (5, "HalfLine"),
- (6, "OneThirdLine"),
- (7, "SecondDivBy44100"),
- (8, "SecondDivBy48000"),
- (9, "Sample"),
- }
- ),
- new EnumDesc(
- "DistortionType",
- new []{
- (0, "Clipping"),
- (1, "Foldback"),
- (2, "Foldback2"),
- (3, "Foldback3"),
- (4, "Overflow"),
- (5, "Overflow2"),
- (6, "SaturationFoldback"),
- (7, "SaturationFoldbackSin"),
- (8, "Saturation3"),
- (9, "Saturation4"),
- (10, "Saturation5"),
- }
- ),
- new EnumDesc(
- "EchoDelayUnit",
- new []{
- (0, "SecondDivBy256"),
- (1, "Millisecond"),
- (2, "Hz"),
- (3, "Tick"),
- (4, "Line"),
- (5, "HalfLine"),
- (6, "OneThirdLine"),
- }
- ),
- new EnumDesc(
- "EchoFilter",
- new []{
- (0, "Off"),
- (1, "LP6dB"),
- (2, "HP6dB"),
- }
- ),
- new EnumDesc(
- "FFTBufferOverlap",
- new []{
- (0, "None"),
- (1, "x2"),
- (2, "x4"),
- }
- ),
- new EnumDesc(
- "FFTBufferSize",
- new []{
- (0, "x64"),
- (1, "x128"),
- (2, "x256"),
- (3, "x512"),
- (4, "x1024"),
- (5, "x2048"),
- (6, "x4096"),
- (7, "x8192"),
- }
- ),
- new EnumDesc(
- "FFTSampleRate",
- new []{
- (0, "Hz8000"),
- (1, "Hz11025"),
- (2, "Hz16000"),
- (3, "Hz22050"),
- (4, "Hz32000"),
- (5, "Hz44100"),
- (6, "Hz48000"),
- (7, "Hz88200"),
- (8, "Hz96000"),
- (9, "Hz192000"),
- }
- ),
- new EnumDesc(
- "FilterLFOFrequencyUnit",
- new []{
- (0, "FiveHundredthHz"),
- (1, "Millisecond"),
- (2, "Hz"),
- (3, "Tick"),
- (4, "Line"),
- (5, "HalfLine"),
- (6, "OneThirdLine"),
- }
- ),
- new EnumDesc(
- "FilterLFOWaveform",
- new []{
- (0, "Sin"),
- (1, "Saw"),
- (2, "Saw2"),
- (3, "Square"),
- (4, "Random"),
- }
- ),
- new EnumDesc(
- "FilterProMode",
- new []{
- (0, "Stereo"),
- (1, "Mono"),
- (2, "StereoSmoothing"),
- (3, "MonoSmoothing"),
- }
- ),
- new EnumDesc(
- "FilterProRollOff",
- new []{
- (0, "dB12"),
- (1, "dB24"),
- (2, "dB36"),
- (3, "dB48"),
- }
- ),
- new EnumDesc(
- "FilterProType",
- new []{
- (0, "LP"),
- (1, "HP"),
- (2, "BPConstSkirtGain"),
- (3, "BPConstPeakGain"),
- (4, "Notch"),
- (5, "AllPass"),
- (6, "Peaking"),
- (7, "LowShelf"),
- (8, "HighShelf"),
- (9, "LP6dB"),
- (10, "HP6dB"),
- }
- ),
- new EnumDesc(
- "FilterRollOff",
- new []{
- (0, "dB12"),
- (1, "dB24"),
- (2, "dB36"),
- (3, "dB48"),
- }
- ),
- new EnumDesc(
- "FilterType",
- new []{
- (0, "LP"),
- (1, "HP"),
- (2, "BP"),
- (3, "Notch"),
- }
- ),
- new EnumDesc(
- "FlangerLFOFrequencyUnit",
- new []{
- (0, "FiveHundredthHz"),
- (1, "Millisecond"),
- (2, "Hz"),
- (3, "Tick"),
- (4, "Line"),
- (5, "HalfLine"),
- (6, "OneThirdLine"),
- }
- ),
- new EnumDesc(
- "FlangerLFOWaveform",
- new []{
- (0, "Hsin"),
- (1, "Sin"),
- }
- ),
- new EnumDesc(
- "FMXCustomWaveform",
- new []{
- (0, "Off"),
- (1, "SingleCycle"),
- (2, "Continuous"),
- }
- ),
- new EnumDesc(
- "FMXModulationType",
- new []{
- (0, "Phase"),
- (1, "Frequency"),
- (2, "Amplitude"),
- (3, "Add"),
- (4, "Sub"),
- (5, "Min"),
- (6, "Max"),
- (7, "And"),
- (8, "Xor"),
- (9, "PhasePlus"),
- }
- ),
- new EnumDesc(
- "FMXSampleRate",
- new []{
- (0, "Hz8000"),
- (1, "Hz11025"),
- (2, "Hz16000"),
- (3, "Hz22050"),
- (4, "Hz32000"),
- (5, "Hz44100"),
- (6, "Native"),
- }
- ),
- new EnumDesc(
- "FMXWaveform",
- new []{
- (0, "Custom"),
- (1, "Triangle"),
- (2, "Triangle3"),
- (3, "Saw"),
- (4, "Saw3"),
- (5, "Square"),
- (6, "Sin"),
- (7, "Hsin"),
- (8, "Asin"),
- (9, "Sin3"),
- }
- ),
- new EnumDesc(
- "GeneratorWaveform",
- new []{
- (0, "Triangle"),
- (1, "Saw"),
- (2, "Square"),
- (3, "NoiseSampler"),
- (4, "Drawn"),
- (5, "Sin"),
- (6, "Hsin"),
- (7, "Asin"),
- (8, "Rsin"),
- }
- ),
- new EnumDesc(
- "KickerWaveform",
- new []{
- (0, "Triangle"),
- (1, "Square"),
- (2, "Sin"),
- }
- ),
- new EnumDesc(
- "LFOFrequencyUnit",
- new []{
- (0, "HzDividedBy64"),
- (1, "Millisecond"),
- (2, "Hz"),
- (3, "Tick"),
- (4, "Line"),
- (5, "HalfLine"),
- (6, "OneThirdLine"),
- }
- ),
- new EnumDesc(
- "LFOSineQuality",
- new []{
- (0, "Auto"),
- (1, "Low"),
- (2, "Middle"),
- (3, "High"),
- }
- ),
- new EnumDesc(
- "LFOSmoothTransitions",
- new []{
- (0, "Off"),
- (1, "Waveform"),
- }
- ),
- new EnumDesc(
- "LFOType",
- new []{
- (0, "Amplitude"),
- (1, "Panning"),
- }
- ),
- new EnumDesc(
- "LFOWaveform",
- new []{
- (0, "Sin"),
- (1, "Square"),
- (2, "Sin2"),
- (3, "Saw"),
- (4, "Saw2"),
- (5, "Random"),
- (6, "Triangle"),
- (7, "RandomInterpolated"),
- }
- ),
- new EnumDesc(
- "LoopMode",
- new []{
- (0, "Normal"),
- (1, "PingPong"),
- }
- ),
- new EnumDesc(
- "LoopOnNoteOn",
- new []{
- (0, "Restart"),
- (1, "RestartCurrentIteration"),
- }
- ),
- new EnumDesc(
- "LoopTimeUnit",
- new []{
- (0, "LineDivBy128"),
- (1, "Line"),
- (2, "HalfLine"),
- (3, "OneThirdLine"),
- (4, "Tick"),
- (5, "Millisecond"),
- (6, "Hz"),
- }
- ),
- new EnumDesc(
- "MetaModulePatternMode",
- new []{
- (0, "Off"),
- (1, "OnRepeat"),
- (2, "OnNoRepeat"),
- (3, "OnRepeatEndless"),
- (4, "OnNoRepeatEndless"),
- }
- ),
- new EnumDesc(
- "ModulationType",
- new []{
- (0, "Amplitude"),
- (1, "Phase"),
- (2, "PhaseAbsolute"),
- }
- ),
- new EnumDesc(
- "PitchDetectorAlgorithm",
- new []{
- (0, "FastZeroCrossing"),
- (1, "Autocorrelation"),
- (2, "Cepstrum"),
- }
- ),
- new EnumDesc(
- "PitchDetectorAlgSampleRate",
- new []{
- (0, "Hz12000"),
- (1, "Hz24000"),
- (2, "Hz44100"),
- }
- ),
- new EnumDesc(
- "PitchDetectorBufferSize",
- new []{
- (0, "Ms5"),
- (1, "Ms10"),
- (2, "Ms21"),
- (3, "Ms42"),
- (4, "Ms85"),
- }
- ),
- new EnumDesc(
- "PitchShifterBypassMode",
- new []{
- (0, "Off"),
- (1, "SlowTransition"),
- (2, "FastTransition"),
- }
- ),
- new EnumDesc(
- "PitchToControlMode",
- new []{
- (0, "FrequencyHz"),
- (1, "Pitch"),
- }
- ),
- new EnumDesc(
- "PitchToControlOnNoteOff",
- new []{
- (0, "DoNothing"),
- (1, "PitchDown"),
- (2, "PitchUp"),
- }
- ),
- new EnumDesc(
- "Quality",
- new []{
- (0, "HQ"),
- (1, "HQMono"),
- (2, "LQ"),
- (3, "LQMono"),
- }
- ),
- new EnumDesc(
- "SamplerEnvelopeInterpolation",
- new []{
- (0, "Off"),
- (1, "Linear"),
- }
- ),
- new EnumDesc(
- "SamplerInterpolation",
- new []{
- (0, "Off"),
- (1, "Linear"),
- (2, "Spline"),
- }
- ),
- new EnumDesc(
- "SoundToControlMode",
- new []{
- (0, "LQ"),
- (1, "HQ"),
- }
- ),
- new EnumDesc(
- "SpectraVoiceHarmonicType",
- new []{
- (0, "Hsin"),
- (1, "Rect"),
- (2, "Org1"),
- (3, "Org2"),
- (4, "Org3"),
- (5, "Org4"),
- (6, "Sin"),
- (7, "Random"),
- (8, "Triangle1"),
- (9, "Triangle2"),
- (10, "Overtones1"),
- (11, "Overtones2"),
- (12, "Overtones3"),
- (13, "Overtones4"),
- (14, "Overtones1Plus"),
- (15, "Overtones2Plus"),
- (16, "Overtones3Plus"),
- (17, "Overtones4Plus"),
- (18, "Metal"),
- }
- ),
- new EnumDesc(
- "SpectraVoiceMode",
- new []{
- (0, "HQ"),
- (1, "HQMono"),
- (2, "LQ"),
- (3, "LQMono"),
- (4, "HQSpline"),
- }
- ),
- new EnumDesc(
- "SpectraVoiceResolution",
- new []{
- (0, "Size4096"),
- (1, "Size8192"),
- (2, "Size16384"),
- (3, "Size32768"),
- (4, "Size65536"),
- (5, "Size131072"),
- }
- ),
- new EnumDesc(
- "Toggle",
- new []{
- (0, "Off"),
- (1, "On"),
- }
- ),
- new EnumDesc(
- "ToggleInverse",
- new []{
- (0, "On"),
- (1, "Off"),
- }
- ),
- new EnumDesc(
- "VelocityToControlOnNoteOff",
- new []{
- (0, "DoNothing"),
- (1, "VelocityDown"),
- (2, "VelocityUp"),
- }
- ),
- new EnumDesc(
- "VibratoFrequencyUnit",
- new []{
- (0, "HzDividedBy64"),
- (1, "Millisecond"),
- (2, "Hz"),
- (3, "Tick"),
- (4, "Line"),
- (5, "HalfLine"),
- (6, "OneThirdLine"),
- }
- ),
- new EnumDesc(
- "VocalFilterVoiceType",
- new []{
- (0, "Soprano"),
- (1, "Alto"),
- (2, "Tenor"),
- (3, "Bass"),
- }
- ),
- new EnumDesc(
- "VocalFilterVowel",
- new []{
- (0, "A"),
- (1, "E"),
- (2, "I"),
- (3, "O"),
- (4, "U"),
- }
- ),
- };
-
- data.Modules = new ModuleDesc[]
- {
- new ModuleDesc(
- "ADSR",
- "ADSR",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 32768),
- new CtlDesc(1, "Attack", "Attack", "", 0, 10000),
- new CtlDesc(2, "Decay", "Decay", "", 0, 10000),
- new CtlDesc(3, "SustainLevel", "Sustain level", "", 0, 32768),
- new CtlDesc(4, "Release", "Release", "", 0, 10000),
- new CtlDesc(5, "AttackCurve", "Attack curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(6, "DecayCurve", "Decay curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(7, "ReleaseCurve", "Release curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(8, "Sustain", "Sustain", "", 0, 2, enumTypeName: "ADSRSustainMode"),
- new CtlDesc(9, "SustainPedal", "Sustain pedal", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(10, "State", "State", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(11, "OnNoteOn", "On NoteON", "", 0, 2, enumTypeName: "ADSROnNoteOnBehaviour"),
- new CtlDesc(12, "OnNoteOff", "On NoteOFF", "", 0, 2, enumTypeName: "ADSROnNoteOffBehaviour"),
- new CtlDesc(13, "Mode", "Mode", "", 0, 2, enumTypeName: "ADSRMode"),
- new CtlDesc(14, "SmoothTransitions", "Smooth transitions", "", 0, 3, enumTypeName: "ADSRSmoothTransitions"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Amplifier",
- "Amplifier",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 1024),
- new CtlDesc(1, "Balance", "Balance", "", -128, 128),
- new CtlDesc(2, "DCOffset", "DC Offset", "", -128, 128),
- new CtlDesc(3, "Inverse", "Inverse", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(4, "StereoWidth", "Stereo width", "", 0, 256),
- new CtlDesc(5, "Absolute", "Absolute", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(6, "FineVolume", "Fine volume", "", 0, 32768),
- new CtlDesc(7, "Gain", "Gain", "", 0, 5000),
- new CtlDesc(8, "BipolarDCOffset", "Bipolar DC Offset", "", -16384, 16384),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "AnalogGenerator",
- "Analog generator",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "Waveform", "Waveform", "", 0, 16, enumTypeName: "AnalogGeneratorWaveform"),
- new CtlDesc(2, "Panning", "Panning", "", -128, 128),
- new CtlDesc(3, "Attack", "Attack", "", 0, 256),
- new CtlDesc(4, "Release", "Release", "", 0, 256),
- new CtlDesc(5, "Sustain", "Sustain", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(6, "ExponentialEnvelope", "Exponential envelope", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(7, "DutyCycle", "Duty cycle", "", 0, 1024),
- new CtlDesc(8, "Osc2", "Osc2", "", -1000, 1000),
- new CtlDesc(9, "Filter", "Filter", "", 0, 8, enumTypeName: "AnalogGeneratorFilterType"),
- new CtlDesc(10, "FFreq", "F.freq", "", 0, 14000),
- new CtlDesc(11, "FResonance", "F.resonance", "", 0, 1530),
- new CtlDesc(12, "FExponentialFreq", "F.exponential freq", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(13, "FAttack", "F.attack", "", 0, 256),
- new CtlDesc(14, "FRelease", "F.release", "", 0, 256),
- new CtlDesc(15, "FEnvelope", "F.envelope", "", 0, 2, enumTypeName: "AnalogGeneratorEnvelopeMode"),
- new CtlDesc(16, "Polyphony", "Polyphony", "", 1, 32, ignoreInternalEnum: true),
- new CtlDesc(17, "Mode", "Mode", "", 0, 3, enumTypeName: "Quality"),
- new CtlDesc(18, "Noise", "Noise", "", 0, 256),
- new CtlDesc(19, "Osc2Volume", "Osc2 volume", "", 0, 32768),
- new CtlDesc(20, "Osc2Mode", "Osc2 mode", "", 0, 6, enumTypeName: "AnalogGeneratorOsc2Mode"),
- new CtlDesc(21, "Osc2Phase", "Osc2 phase", "", 0, 32768),
- },
- new List()
- {
- new CurveDesc(0, "DrawnValues", "Used for 'Drawn', 'DrawnSpline' and 'Harmonics'.", -1, 1, 32),
- },
- null
- ),
- new ModuleDesc(
- "Compressor",
- "Compressor",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "Threshold", "Threshold", "", 0, 512),
- new CtlDesc(2, "Slope", "Slope", "", 0, 200),
- new CtlDesc(3, "Attack", "Attack", "", 0, 500),
- new CtlDesc(4, "Release", "Release", "", 1, 1000),
- new CtlDesc(5, "Mode", "Mode", "", 0, 2, enumTypeName: "CompressorMode"),
- new CtlDesc(6, "SideChainInput", "Side-chain input", "", 0, 32, ignoreInternalEnum: true),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "ControlToNote",
- "Ctl2Note",
- "",
- new List()
- {
- new CtlDesc(0, "Pitch", "Pitch", "", 0, 32768),
- new CtlDesc(1, "FirstNote", "First note", "", 0, 120, ignoreInternalEnum: true),
- new CtlDesc(2, "RangeNumberOfSemitones", "Range (number of semitones)", "", 0, 120, ignoreInternalEnum: true),
- new CtlDesc(3, "Transpose", "Transpose", "", -128, 128, ignoreInternalEnum: true),
- new CtlDesc(4, "Finetune", "Finetune", "", -256, 256),
- new CtlDesc(5, "Velocity", "Velocity", "", 0, 256),
- new CtlDesc(6, "State", "State", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(7, "NoteOn", "NoteON", "", 0, 1, enumTypeName: "ControlToNoteOnBehaviour"),
- new CtlDesc(8, "NoteOff", "NoteOFF", "", 0, 2, enumTypeName: "ControlToNoteOffBehaviour"),
- new CtlDesc(9, "RecordNotes", "Record notes", "", 0, 1, enumTypeName: "Toggle"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "DcBlocker",
- "DC Blocker",
- "",
- new List()
- {
- new CtlDesc(0, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Delay",
- "Delay",
- "",
- new List()
- {
- new CtlDesc(0, "Dry", "Dry", "", 0, 512),
- new CtlDesc(1, "Wet", "Wet", "", 0, 512),
- new CtlDesc(2, "DelayL", "Delay L", "", 0, 256),
- new CtlDesc(3, "DelayR", "Delay R", "", 0, 256),
- new CtlDesc(4, "VolumeL", "Volume L", "", 0, 256),
- new CtlDesc(5, "VolumeR", "Volume R", "", 0, 256),
- new CtlDesc(6, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- new CtlDesc(7, "Inverse", "Inverse", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(8, "DelayUnit", "Delay unit", "", 0, 9, enumTypeName: "DelayUnit"),
- new CtlDesc(9, "DelayMultiplier", "Delay multiplier", "", 1, 15, ignoreInternalEnum: true),
- new CtlDesc(10, "Feedback", "Feedback", "", 0, 32768),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Distortion",
- "Distortion",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "DistortionType", "Type", "", 0, 10, enumTypeName: "DistortionType"),
- new CtlDesc(2, "Power", "Power", "", 0, 256),
- new CtlDesc(3, "BitDepth", "Bit depth", "", 1, 16, ignoreInternalEnum: true),
- new CtlDesc(4, "Freq", "Freq", "", 0, 44100),
- new CtlDesc(5, "Noise", "Noise", "", 0, 256),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "DrumSynth",
- "DrumSynth",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "Panning", "Panning", "", -128, 128),
- new CtlDesc(2, "Polyphony", "Polyphony", "", 1, 8, ignoreInternalEnum: true),
- new CtlDesc(3, "BassVolume", "Bass volume", "", 0, 512),
- new CtlDesc(4, "BassPower", "Bass power", "", 0, 256),
- new CtlDesc(5, "BassTone", "Bass tone", "", 0, 256),
- new CtlDesc(6, "BassLength", "Bass length", "", 0, 256),
- new CtlDesc(7, "HihatVolume", "Hihat volume", "", 0, 512),
- new CtlDesc(8, "HihatLength", "Hihat length", "", 0, 256),
- new CtlDesc(9, "SnareVolume", "Snare volume", "", 0, 512),
- new CtlDesc(10, "SnareTone", "Snare tone", "", 0, 256),
- new CtlDesc(11, "SnareLength", "Snare length", "", 0, 256),
- new CtlDesc(12, "BassPanning", "Bass panning", "", -128, 128),
- new CtlDesc(13, "HihatPanning", "Hihat panning", "", -128, 128),
- new CtlDesc(14, "SnarePanning", "Snare panning", "", -128, 128),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Echo",
- "Echo",
- "",
- new List()
- {
- new CtlDesc(0, "Dry", "Dry", "", 0, 256),
- new CtlDesc(1, "Wet", "Wet", "", 0, 256),
- new CtlDesc(2, "Feedback", "Feedback", "", 0, 256),
- new CtlDesc(3, "Delay", "Delay", "", 0, 256),
- new CtlDesc(4, "RightChannelOffset", "Right channel offset", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(5, "DelayUnit", "Delay unit", "", 0, 6, enumTypeName: "EchoDelayUnit"),
- new CtlDesc(6, "RightChannelOffsetDelay", "Right channel offset", "Delay/32768", 0, 32768),
- new CtlDesc(7, "Filter", "Filter", "", 0, 2, enumTypeName: "EchoFilter"),
- new CtlDesc(8, "FFreq", "F.freq", "", 0, 22000),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "EQ",
- "EQ",
- "",
- new List()
- {
- new CtlDesc(0, "Low", "Low", "", 0, 512),
- new CtlDesc(1, "Middle", "Middle", "", 0, 512),
- new CtlDesc(2, "High", "High", "", 0, 512),
- new CtlDesc(3, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Feedback",
- "Feedback",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 10000),
- new CtlDesc(1, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "FFT",
- "FFT",
- "",
- new List()
- {
- new CtlDesc(0, "SampleRate", "Sample rate", "", 0, 9, enumTypeName: "FFTSampleRate"),
- new CtlDesc(1, "Channels", "Channels", "", 0, 1, enumTypeName: "ChannelsInverted"),
- new CtlDesc(2, "BufferSamples", "Buffer (samples)", "", 0, 7, enumTypeName: "FFTBufferSize"),
- new CtlDesc(3, "BufOverlap", "Buf overlap", "", 0, 2, enumTypeName: "FFTBufferOverlap"),
- new CtlDesc(4, "Feedback", "Feedback", "", 0, 32768),
- new CtlDesc(5, "NoiseReduction", "Noise reduction", "", 0, 32768),
- new CtlDesc(6, "PhaseGainNorm16384", "Phase gain (norm=16384)", "", 0, 32768, ignoreInternalEnum: true),
- new CtlDesc(7, "AllPassFilter", "All-pass filter", "", 0, 32768),
- new CtlDesc(8, "FrequencySpread", "Frequency spread", "", 0, 32768),
- new CtlDesc(9, "RandomPhase", "Random phase", "", 0, 32768),
- new CtlDesc(10, "RandomPhaseLite", "Random phase (lite)", "", 0, 32768),
- new CtlDesc(11, "FreqShift", "Freq shift", "", -4096, 4096),
- new CtlDesc(12, "Deform1", "Deform1", "", 0, 32768),
- new CtlDesc(13, "Deform2", "Deform2", "", 0, 32768),
- new CtlDesc(14, "HPCutoff", "HP cutoff", "", 0, 32768),
- new CtlDesc(15, "LPCutoff", "LP cutoff", "", 0, 32768),
- new CtlDesc(16, "Volume", "Volume", "", 0, 32768),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Filter",
- "Filter",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "Frequency", "Freq", "", 0, 14000),
- new CtlDesc(2, "Resonance", "Resonance", "", 0, 1530),
- new CtlDesc(3, "FilterType", "Type", "", 0, 3, enumTypeName: "FilterType"),
- new CtlDesc(4, "Response", "Response", "", 0, 256),
- new CtlDesc(5, "Mode", "Mode", "", 0, 3, enumTypeName: "Quality"),
- new CtlDesc(6, "Impulse", "Impulse", "", 0, 14000),
- new CtlDesc(7, "Mix", "Mix", "", 0, 256),
- new CtlDesc(8, "LFOFreq", "LFO freq", "", 0, 1024),
- new CtlDesc(9, "LFOAmp", "LFO amp", "", 0, 256),
- new CtlDesc(10, "SetLFOPhase", "Set LFO phase", "", 0, 256),
- new CtlDesc(11, "ExponentialFreq", "Exponential freq", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(12, "RollOff", "Roll-off", "", 0, 3, enumTypeName: "FilterRollOff"),
- new CtlDesc(13, "LFOFreqUnit", "LFO freq unit", "", 0, 6, enumTypeName: "FilterLFOFrequencyUnit"),
- new CtlDesc(14, "LFOWaveform", "LFO waveform", "", 0, 4, enumTypeName: "FilterLFOWaveform"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "FilterPro",
- "Filter Pro",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 32768),
- new CtlDesc(1, "FilterType", "Type", "", 0, 10, enumTypeName: "FilterProType"),
- new CtlDesc(2, "Freq", "Freq", "", 0, 22000),
- new CtlDesc(3, "FreqFinetune", "Freq finetune", "", -1000, 1000),
- new CtlDesc(4, "FreqScale", "Freq scale", "", 0, 200),
- new CtlDesc(5, "ExponentialFreq", "Exponential freq", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(6, "Q", "Q", "", 0, 32768),
- new CtlDesc(7, "Gain", "Gain", "", -16384, 16384),
- new CtlDesc(8, "RollOff", "Roll-off", "", 0, 3, enumTypeName: "FilterProRollOff"),
- new CtlDesc(9, "Response", "Response", "", 0, 1000),
- new CtlDesc(10, "Mode", "Mode", "", 0, 3, enumTypeName: "FilterProMode"),
- new CtlDesc(11, "Mix", "Mix", "", 0, 32768),
- new CtlDesc(12, "LFOFreq", "LFO freq", "", 0, 1024),
- new CtlDesc(13, "LFOAmp", "LFO amp", "", 0, 32768),
- new CtlDesc(14, "LFOWaveform", "LFO waveform", "", 0, 4, enumTypeName: "FilterLFOWaveform"),
- new CtlDesc(15, "SetLFOPhase", "Set LFO phase", "", 0, 256),
- new CtlDesc(16, "LFOFreqUnit", "LFO freq unit", "", 0, 6, enumTypeName: "FilterLFOFrequencyUnit"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Flanger",
- "Flanger",
- "",
- new List()
- {
- new CtlDesc(0, "Dry", "Dry", "", 0, 256),
- new CtlDesc(1, "Wet", "Wet", "", 0, 256),
- new CtlDesc(2, "Feedback", "Feedback", "", 0, 256),
- new CtlDesc(3, "Delay", "Delay", "", 8, 1000),
- new CtlDesc(4, "Response", "Response", "", 0, 256),
- new CtlDesc(5, "LFOFreq", "LFO freq", "", 0, 512),
- new CtlDesc(6, "LFOAmp", "LFO amp", "", 0, 256),
- new CtlDesc(7, "LFOWaveform", "LFO waveform", "", 0, 1, enumTypeName: "FlangerLFOWaveform"),
- new CtlDesc(8, "SetLFOPhase", "Set LFO phase", "", 0, 256),
- new CtlDesc(9, "LFOFreqUnit", "LFO freq unit", "", 0, 6, enumTypeName: "FlangerLFOFrequencyUnit"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "FM",
- "FM",
- "",
- new List()
- {
- new CtlDesc(0, "CVolume", "C.Volume", "", 0, 256),
- new CtlDesc(1, "MVolume", "M.Volume", "", 0, 256),
- new CtlDesc(2, "Panning", "Panning", "", -128, 128),
- new CtlDesc(3, "CFreqRatio", "C.Freq ratio", "", 0, 16),
- new CtlDesc(4, "MFreqRatio", "M.Freq ratio", "", 0, 16),
- new CtlDesc(5, "MSelfModulation", "M.Self-modulation", "", 0, 256),
- new CtlDesc(6, "CAttack", "C.Attack", "", 0, 512),
- new CtlDesc(7, "CDecay", "C.Decay", "", 0, 512),
- new CtlDesc(8, "CSustain", "C.Sustain", "", 0, 256),
- new CtlDesc(9, "CRelease", "C.Release", "", 0, 512),
- new CtlDesc(10, "MAttack", "M.Attack", "", 0, 512),
- new CtlDesc(11, "MDecay", "M.Decay", "", 0, 512),
- new CtlDesc(12, "MSustain", "M.Sustain", "", 0, 256),
- new CtlDesc(13, "MRelease", "M.Release", "", 0, 512),
- new CtlDesc(14, "MScalingPerKey", "M.Scaling per key", "", 0, 4),
- new CtlDesc(15, "Polyphony", "Polyphony", "", 1, 16, ignoreInternalEnum: true),
- new CtlDesc(16, "Mode", "Mode", "", 0, 3, enumTypeName: "Quality"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "FMX",
- "FMX",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 32768),
- new CtlDesc(1, "Panning", "Panning", "", -128, 128),
- new CtlDesc(2, "SampleRate", "Sample rate", "", 0, 6, enumTypeName: "FMXSampleRate"),
- new CtlDesc(3, "Polyphony", "Polyphony", "", 1, 32, ignoreInternalEnum: true),
- new CtlDesc(4, "Channels", "Channels", "", 0, 1, enumTypeName: "ChannelsInverted"),
- new CtlDesc(5, "InputOperatorNum", "Input -> Operator #", "", 0, 5, ignoreInternalEnum: true),
- new CtlDesc(6, "InputCustomWaveform", "Input -> Custom waveform", "", 0, 2, enumTypeName: "FMXCustomWaveform"),
- new CtlDesc(7, "ADSRSmoothTransitions", "ADSR smooth transitions", "", 0, 3, enumTypeName: "ADSRSmoothTransitions"),
- new CtlDesc(8, "NoiseFilter", "Noise filter (32768 - OFF)", "", 0, 32768),
- new CtlDesc(9, "Volume1", "1 Volume", "", 0, 32768),
- new CtlDesc(10, "Volume2", "2 Volume", "", 0, 32768),
- new CtlDesc(11, "Volume3", "3 Volume", "", 0, 32768),
- new CtlDesc(12, "Volume4", "4 Volume", "", 0, 32768),
- new CtlDesc(13, "Volume5", "5 Volume", "", 0, 32768),
- new CtlDesc(14, "Attack1", "1 Attack", "", 0, 10000),
- new CtlDesc(15, "Attack2", "2 Attack", "", 0, 10000),
- new CtlDesc(16, "Attack3", "3 Attack", "", 0, 10000),
- new CtlDesc(17, "Attack4", "4 Attack", "", 0, 10000),
- new CtlDesc(18, "Attack5", "5 Attack", "", 0, 10000),
- new CtlDesc(19, "Decay1", "1 Decay", "", 0, 10000),
- new CtlDesc(20, "Decay2", "2 Decay", "", 0, 10000),
- new CtlDesc(21, "Decay3", "3 Decay", "", 0, 10000),
- new CtlDesc(22, "Decay4", "4 Decay", "", 0, 10000),
- new CtlDesc(23, "Decay5", "5 Decay", "", 0, 10000),
- new CtlDesc(24, "SustainLevel1", "1 Sustain level", "", 0, 32768),
- new CtlDesc(25, "SustainLevel2", "2 Sustain level", "", 0, 32768),
- new CtlDesc(26, "SustainLevel3", "3 Sustain level", "", 0, 32768),
- new CtlDesc(27, "SustainLevel4", "4 Sustain level", "", 0, 32768),
- new CtlDesc(28, "SustainLevel5", "5 Sustain level", "", 0, 32768),
- new CtlDesc(29, "Release1", "1 Release", "", 0, 10000),
- new CtlDesc(30, "Release2", "2 Release", "", 0, 10000),
- new CtlDesc(31, "Release3", "3 Release", "", 0, 10000),
- new CtlDesc(32, "Release4", "4 Release", "", 0, 10000),
- new CtlDesc(33, "Release5", "5 Release", "", 0, 10000),
- new CtlDesc(34, "AttackCurve1", "1 Attack curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(35, "AttackCurve2", "2 Attack curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(36, "AttackCurve3", "3 Attack curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(37, "AttackCurve4", "4 Attack curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(38, "AttackCurve5", "5 Attack curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(39, "DecayCurve1", "1 Decay curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(40, "DecayCurve2", "2 Decay curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(41, "DecayCurve3", "3 Decay curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(42, "DecayCurve4", "4 Decay curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(43, "DecayCurve5", "5 Decay curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(44, "ReleaseCurve1", "1 Release curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(45, "ReleaseCurve2", "2 Release curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(46, "ReleaseCurve3", "3 Release curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(47, "ReleaseCurve4", "4 Release curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(48, "ReleaseCurve5", "5 Release curve", "", 0, 11, enumTypeName: "ADSRCurveType"),
- new CtlDesc(49, "Sustain1", "1 Sustain", "", 0, 2, enumTypeName: "ADSRSustainMode"),
- new CtlDesc(50, "Sustain2", "2 Sustain", "", 0, 2, enumTypeName: "ADSRSustainMode"),
- new CtlDesc(51, "Sustain3", "3 Sustain", "", 0, 2, enumTypeName: "ADSRSustainMode"),
- new CtlDesc(52, "Sustain4", "4 Sustain", "", 0, 2, enumTypeName: "ADSRSustainMode"),
- new CtlDesc(53, "Sustain5", "5 Sustain", "", 0, 2, enumTypeName: "ADSRSustainMode"),
- new CtlDesc(54, "SustainPedal1", "1 Sustain pedal", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(55, "SustainPedal2", "2 Sustain pedal", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(56, "SustainPedal3", "3 Sustain pedal", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(57, "SustainPedal4", "4 Sustain pedal", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(58, "SustainPedal5", "5 Sustain pedal", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(59, "EnvelopeScalingPerKey1", "1 Envelope scaling per key", "", -128, 128),
- new CtlDesc(60, "EnvelopeScalingPerKey2", "2 Envelope scaling per key", "", -128, 128),
- new CtlDesc(61, "EnvelopeScalingPerKey3", "3 Envelope scaling per key", "", -128, 128),
- new CtlDesc(62, "EnvelopeScalingPerKey4", "4 Envelope scaling per key", "", -128, 128),
- new CtlDesc(63, "EnvelopeScalingPerKey5", "5 Envelope scaling per key", "", -128, 128),
- new CtlDesc(64, "VolumeScalingPerKey1", "1 Volume scaling per key", "", -128, 128),
- new CtlDesc(65, "VolumeScalingPerKey2", "2 Volume scaling per key", "", -128, 128),
- new CtlDesc(66, "VolumeScalingPerKey3", "3 Volume scaling per key", "", -128, 128),
- new CtlDesc(67, "VolumeScalingPerKey4", "4 Volume scaling per key", "", -128, 128),
- new CtlDesc(68, "VolumeScalingPerKey5", "5 Volume scaling per key", "", -128, 128),
- new CtlDesc(69, "VelocitySensitivity1", "1 Velocity sensitivity", "", -128, 128),
- new CtlDesc(70, "VelocitySensitivity2", "2 Velocity sensitivity", "", -128, 128),
- new CtlDesc(71, "VelocitySensitivity3", "3 Velocity sensitivity", "", -128, 128),
- new CtlDesc(72, "VelocitySensitivity4", "4 Velocity sensitivity", "", -128, 128),
- new CtlDesc(73, "VelocitySensitivity5", "5 Velocity sensitivity", "", -128, 128),
- new CtlDesc(74, "Waveform1", "1 Waveform", "", 0, 9, enumTypeName: "FMXWaveform"),
- new CtlDesc(75, "Waveform2", "2 Waveform", "", 0, 9, enumTypeName: "FMXWaveform"),
- new CtlDesc(76, "Waveform3", "3 Waveform", "", 0, 9, enumTypeName: "FMXWaveform"),
- new CtlDesc(77, "Waveform4", "4 Waveform", "", 0, 9, enumTypeName: "FMXWaveform"),
- new CtlDesc(78, "Waveform5", "5 Waveform", "", 0, 9, enumTypeName: "FMXWaveform"),
- new CtlDesc(79, "Noise1", "1 Noise", "", 0, 32768),
- new CtlDesc(80, "Noise2", "2 Noise", "", 0, 32768),
- new CtlDesc(81, "Noise3", "3 Noise", "", 0, 32768),
- new CtlDesc(82, "Noise4", "4 Noise", "", 0, 32768),
- new CtlDesc(83, "Noise5", "5 Noise", "", 0, 32768),
- new CtlDesc(84, "Phase1", "1 Phase", "", 0, 32768),
- new CtlDesc(85, "Phase2", "2 Phase", "", 0, 32768),
- new CtlDesc(86, "Phase3", "3 Phase", "", 0, 32768),
- new CtlDesc(87, "Phase4", "4 Phase", "", 0, 32768),
- new CtlDesc(88, "Phase5", "5 Phase", "", 0, 32768),
- new CtlDesc(89, "FreqMultiply1", "1 Freq multiply", "", 0, 32000),
- new CtlDesc(90, "FreqMultiply2", "2 Freq multiply", "", 0, 32000),
- new CtlDesc(91, "FreqMultiply3", "3 Freq multiply", "", 0, 32000),
- new CtlDesc(92, "FreqMultiply4", "4 Freq multiply", "", 0, 32000),
- new CtlDesc(93, "FreqMultiply5", "5 Freq multiply", "", 0, 32000),
- new CtlDesc(94, "ConstantPitch1", "1 Constant pitch", "", -8192, 8192),
- new CtlDesc(95, "ConstantPitch2", "2 Constant pitch", "", -8192, 8192),
- new CtlDesc(96, "ConstantPitch3", "3 Constant pitch", "", -8192, 8192),
- new CtlDesc(97, "ConstantPitch4", "4 Constant pitch", "", -8192, 8192),
- new CtlDesc(98, "ConstantPitch5", "5 Constant pitch", "", -8192, 8192),
- new CtlDesc(99, "SelfModulation1", "1 Self-modulation", "", 0, 32768),
- new CtlDesc(100, "SelfModulation2", "2 Self-modulation", "", 0, 32768),
- new CtlDesc(101, "SelfModulation3", "3 Self-modulation", "", 0, 32768),
- new CtlDesc(102, "SelfModulation4", "4 Self-modulation", "", 0, 32768),
- new CtlDesc(103, "SelfModulation5", "5 Self-modulation", "", 0, 32768),
- new CtlDesc(104, "Feedback1", "1 Feedback", "", 0, 32768),
- new CtlDesc(105, "Feedback2", "2 Feedback", "", 0, 32768),
- new CtlDesc(106, "Feedback3", "3 Feedback", "", 0, 32768),
- new CtlDesc(107, "Feedback4", "4 Feedback", "", 0, 32768),
- new CtlDesc(108, "Feedback5", "5 Feedback", "", 0, 32768),
- new CtlDesc(109, "ModulationType1", "1 Modulation type", "", 0, 9, enumTypeName: "FMXModulationType"),
- new CtlDesc(110, "ModulationType2", "2 Modulation type", "", 0, 9, enumTypeName: "FMXModulationType"),
- new CtlDesc(111, "ModulationType3", "3 Modulation type", "", 0, 9, enumTypeName: "FMXModulationType"),
- new CtlDesc(112, "ModulationType4", "4 Modulation type", "", 0, 9, enumTypeName: "FMXModulationType"),
- new CtlDesc(113, "ModulationType5", "5 Modulation type", "", 0, 9, enumTypeName: "FMXModulationType"),
- new CtlDesc(114, "OutputMode1", "1 Output mode", "", 0, 31, ignoreInternalEnum: true),
- new CtlDesc(115, "OutputMode2", "2 Output mode", "", 0, 15, ignoreInternalEnum: true),
- new CtlDesc(116, "OutputMode3", "3 Output mode", "", 0, 7, ignoreInternalEnum: true),
- new CtlDesc(117, "OutputMode4", "4 Output mode", "", 0, 3, ignoreInternalEnum: true),
- new CtlDesc(118, "EnvelopeGain", "Envelope gain", "", 0, 8000),
- },
- new List()
- {
- new CurveDesc(0, "CustomWaveform", "Used as a waveform where 'Custom' waveform type was applied.", -1, 1, 256),
- },
- new AddCodeDesc()
- ),
- new ModuleDesc(
- "Generator",
- "Generator",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "Waveform", "Waveform", "", 0, 8, enumTypeName: "GeneratorWaveform"),
- new CtlDesc(2, "Panning", "Panning", "", -128, 128),
- new CtlDesc(3, "Attack", "Attack", "", 0, 512),
- new CtlDesc(4, "Release", "Release", "", 0, 512),
- new CtlDesc(5, "Polyphony", "Polyphony", "", 1, 16, ignoreInternalEnum: true),
- new CtlDesc(6, "Mode", "Mode", "", 0, 1, enumTypeName: "Channels"),
- new CtlDesc(7, "Sustain", "Sustain", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(8, "FreqModulationByInput", "Freq.modulation by input", "", 0, 256),
- new CtlDesc(9, "DutyCycle", "Duty cycle", "", 0, 1022),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Glide",
- "Glide",
- "",
- new List()
- {
- new CtlDesc(0, "Response", "Response", "", 0, 1000),
- new CtlDesc(1, "SampleRate", "Sample rate", "", 1, 32768),
- new CtlDesc(2, "ResetOnFirstNote", "Reset on 1st note", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(3, "Polyphony", "Polyphony", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(4, "Pitch", "Pitch", "", -600, 600),
- new CtlDesc(5, "PitchScale", "Pitch scale", "", 0, 200),
- new CtlDesc(6, "Reset", "Reset", "", 0, 1, enumTypeName: "Toggle"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "GPIO",
- "GPIO",
- "",
- new List()
- {
- new CtlDesc(0, "Out", "Out", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(1, "OutPin", "Out pin", "", 0, 256, ignoreInternalEnum: true),
- new CtlDesc(2, "OutThreshold", "Out threshold", "", 0, 100),
- new CtlDesc(3, "In", "In", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(4, "InPin", "In pin", "", 0, 256, ignoreInternalEnum: true),
- new CtlDesc(5, "InNote", "In note", "", 0, 128, ignoreInternalEnum: true),
- new CtlDesc(6, "InAmplitude", "In amplitude", "", 0, 100),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Input",
- "Input",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 1024),
- new CtlDesc(1, "Channels", "Channels", "", 0, 1, enumTypeName: "ChannelsInverted"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Kicker",
- "Kicker",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "Waveform", "Waveform", "", 0, 2, enumTypeName: "KickerWaveform"),
- new CtlDesc(2, "Panning", "Panning", "", -128, 128),
- new CtlDesc(3, "Attack", "Attack", "", 0, 512),
- new CtlDesc(4, "Release", "Release", "", 0, 512),
- new CtlDesc(5, "Boost", "Boost", "", 0, 1024),
- new CtlDesc(6, "Acceleration", "Acceleration", "", 0, 1024),
- new CtlDesc(7, "Polyphony", "Polyphony", "", 1, 4, ignoreInternalEnum: true),
- new CtlDesc(8, "NoClick", "No click", "", 0, 1, enumTypeName: "Toggle"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "LFO",
- "LFO",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "LfoType", "Type", "", 0, 1, enumTypeName: "LFOType"),
- new CtlDesc(2, "Amplitude", "Amplitude", "", 0, 256),
- new CtlDesc(3, "Freq", "Freq", "", 1, 256),
- new CtlDesc(4, "Waveform", "Waveform", "", 0, 7, enumTypeName: "LFOWaveform"),
- new CtlDesc(5, "SetPhase", "Set phase", "", 0, 256),
- new CtlDesc(6, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- new CtlDesc(7, "FrequencyUnit", "Frequency unit", "", 0, 6, enumTypeName: "LFOFrequencyUnit"),
- new CtlDesc(8, "DutyCycle", "Duty cycle", "", 0, 256),
- new CtlDesc(9, "Generator", "Generator", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(10, "FreqScale", "Freq scale", "", 0, 200),
- new CtlDesc(11, "SmoothTransitions", "Smooth transitions", "", 0, 1, enumTypeName: "LFOSmoothTransitions"),
- new CtlDesc(12, "SineQuality", "Sine quality", "", 0, 3, enumTypeName: "LFOSineQuality"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Loop",
- "Loop",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "Delay", "Length", "", 0, 256),
- new CtlDesc(2, "Channels", "Channels", "", 0, 1, enumTypeName: "ChannelsInverted"),
- new CtlDesc(3, "Repeats", "Repeat (128=endless)", "", 0, 128, ignoreInternalEnum: true),
- new CtlDesc(4, "Mode", "Mode", "", 0, 1, enumTypeName: "LoopMode"),
- new CtlDesc(5, "LengthUnit", "Length unit", "", 0, 6, enumTypeName: "LoopTimeUnit"),
- new CtlDesc(6, "MaxBufferSize", "Max buffer size", "Max buffer size in seconds", 1, 240, ignoreInternalEnum: true),
- new CtlDesc(7, "OnNoteOn", "On NoteON", "", 0, 1, enumTypeName: "LoopOnNoteOn"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "MetaModule",
- "MetaModule",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 1024),
- new CtlDesc(1, "InputModule", "Input module", "", 1, 256, ignoreInternalEnum: true),
- new CtlDesc(2, "PlayPatterns", "Play patterns", "", 0, 4, enumTypeName: "MetaModulePatternMode"),
- new CtlDesc(3, "BPM", "BPM (Beats Per Minute)", "", 1, 1000, ignoreInternalEnum: true),
- new CtlDesc(4, "TPL", "TPL (Ticks Per Line)", "", 1, 31, ignoreInternalEnum: true),
- },
- new List()
- {
- },
- new AddCodeDesc()
- ),
- new ModuleDesc(
- "Modulator",
- "Modulator",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "ModulationType", "Modulation type", "", 0, 2, enumTypeName: "ModulationType"),
- new CtlDesc(2, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "MultiControl",
- "MultiCtl",
- "",
- new List()
- {
- new CtlDesc(0, "Value", "Value", "", 0, 32768),
- new CtlDesc(1, "Gain", "Gain", "", 0, 1024),
- new CtlDesc(2, "Quantization", "Quantization", "", 0, 32768),
- new CtlDesc(3, "OUTOffset", "OUT offset", "", -16384, 16384),
- new CtlDesc(4, "Response", "Response", "", 0, 1000),
- new CtlDesc(5, "SampleRate", "Sample rate", "", 1, 32768),
- },
- new List()
- {
- new CurveDesc(0, "Curve", "Modifies applied values.", 0, 1, 257),
- },
- null
- ),
- new ModuleDesc(
- "MultiSynth",
- "MultiSynth",
- "",
- new List()
- {
- new CtlDesc(0, "Transpose", "Transpose", "", -128, 128, ignoreInternalEnum: true),
- new CtlDesc(1, "RandomPitch", "Random pitch", "", 0, 4096),
- new CtlDesc(2, "Velocity", "Velocity", "", 0, 256),
- new CtlDesc(3, "Finetune", "Finetune", "", -256, 256),
- new CtlDesc(4, "RandomPhase", "Random phase", "", 0, 32768),
- new CtlDesc(5, "RandomVelocity", "Random velocity", "", 0, 32768),
- new CtlDesc(6, "Phase", "Phase", "", 0, 32768),
- new CtlDesc(7, "Curve2Influence", "Curve2 influence", "", 0, 256),
- },
- new List()
- {
- new CurveDesc(0, "NoteVelocityCurve", "Velocity to apply to arriving note.", 0, 1, 128),
- new CurveDesc(1, "VelocityToVelocityCurve", "Map velocity values.", 0, 1, 257),
- },
- null
- ),
- new ModuleDesc(
- "Output",
- "Output",
- "",
- new List()
- {
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "PitchDetector",
- "Pitch Detector",
- "",
- new List()
- {
- new CtlDesc(0, "Algorithm", "Algorithm", "", 0, 2, enumTypeName: "PitchDetectorAlgorithm"),
- new CtlDesc(1, "Threshold", "Threshold", "", 0, 10000),
- new CtlDesc(2, "Gain", "Gain", "", 0, 256),
- new CtlDesc(3, "Microtones", "Microtones", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(4, "DetectorFinetune", "Detector finetune", "", -256, 256),
- new CtlDesc(5, "LPFilterFreq", "LP filter freq (0 - OFF)", "", 0, 4000),
- new CtlDesc(6, "LPFilterRollOff", "LP filter roll-off", "", 0, 3, enumTypeName: "FilterRollOff"),
- new CtlDesc(7, "AlgSampleRateHz", "Alg1-2 Sample rate (Hz)", "", 0, 2, enumTypeName: "PitchDetectorAlgSampleRate"),
- new CtlDesc(8, "AlgBufferMs", "Alg1-2 Buffer (ms)", "", 0, 4, enumTypeName: "PitchDetectorBufferSize"),
- new CtlDesc(9, "AlgBufOverlap", "Alg1-2 Buf overlap", "", 0, 100),
- new CtlDesc(10, "Alg1Sensitivity", "Alg1 Sensitivity (absolute threshold)", "", 0, 100),
- new CtlDesc(11, "RecordNotes", "Record notes", "", 0, 1, enumTypeName: "Toggle"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "PitchShifter",
- "Pitch shifter",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "Pitch", "Pitch", "", -600, 600),
- new CtlDesc(2, "PitchScale", "Pitch scale", "", 0, 200),
- new CtlDesc(3, "Feedback", "Feedback", "", 0, 256),
- new CtlDesc(4, "GrainSize", "Grain size", "", 0, 256),
- new CtlDesc(5, "Mode", "Mode", "", 0, 3, enumTypeName: "Quality"),
- new CtlDesc(6, "BypassIfPitchZero", "Bypass if pitch=0", "", 0, 2, enumTypeName: "PitchShifterBypassMode"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "PitchToControl",
- "Pitch2Ctl",
- "",
- new List()
- {
- new CtlDesc(0, "Mode", "Mode", "", 0, 1, enumTypeName: "PitchToControlMode"),
- new CtlDesc(1, "OnNoteOff", "On NoteOFF", "", 0, 2, enumTypeName: "PitchToControlOnNoteOff"),
- new CtlDesc(2, "FirstNote", "First note", "", 0, 256, ignoreInternalEnum: true),
- new CtlDesc(3, "RangeNumberOfSemitones", "Range (number of semitones)", "", 0, 256, ignoreInternalEnum: true),
- new CtlDesc(4, "OUTMin", "OUT min", "", 0, 32768),
- new CtlDesc(5, "OUTMax", "OUT max", "", 0, 32768),
- new CtlDesc(6, "OUTController", "OUT controller", "", 0, 255, ignoreInternalEnum: true),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Reverb",
- "Reverb",
- "",
- new List()
- {
- new CtlDesc(0, "Dry", "Dry", "", 0, 256),
- new CtlDesc(1, "Wet", "Wet", "", 0, 256),
- new CtlDesc(2, "Feedback", "Feedback", "", 0, 256),
- new CtlDesc(3, "Damp", "Damp", "", 0, 256),
- new CtlDesc(4, "StereoWidth", "Stereo width", "", 0, 256),
- new CtlDesc(5, "Freeze", "Freeze", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(6, "Mode", "Mode", "", 0, 3, enumTypeName: "Quality"),
- new CtlDesc(7, "AllPassFilter", "All-pass filter", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(8, "RoomSize", "Room size", "", 0, 128),
- new CtlDesc(9, "RandomSeed", "Random seed", "", 0, 32768, ignoreInternalEnum: true),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Sampler",
- "Sampler",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "Panning", "Panning", "", -128, 128),
- new CtlDesc(2, "SampleInterpolation", "Sample interpolation", "", 0, 2, enumTypeName: "SamplerInterpolation"),
- new CtlDesc(3, "EnvelopeInterpolation", "Envelope interpolation", "", 0, 1, enumTypeName: "SamplerEnvelopeInterpolation"),
- new CtlDesc(4, "Polyphony", "Polyphony", "", 1, 32, ignoreInternalEnum: true),
- new CtlDesc(5, "RecThreshold", "Rec threshold", "", 0, 10000),
- },
- new List()
- {
- },
- new AddCodeDesc()
- ),
- new ModuleDesc(
- "SoundToControl",
- "Sound2Ctl",
- "",
- new List()
- {
- new CtlDesc(0, "SampleRate", "Sample rate", "", 1, 32768),
- new CtlDesc(1, "Channels", "Channels", "", 0, 1, enumTypeName: "ChannelsInverted"),
- new CtlDesc(2, "Absolute", "Absolute", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(3, "Gain", "Gain", "", 0, 1024),
- new CtlDesc(4, "Smooth", "Smooth", "", 0, 256),
- new CtlDesc(5, "Mode", "Mode", "", 0, 1, enumTypeName: "SoundToControlMode"),
- new CtlDesc(6, "OutMin", "OUT min", "", 0, 32768),
- new CtlDesc(7, "OutMax", "OUT max", "", 0, 32768),
- new CtlDesc(8, "OUTController", "OUT controller", "", 0, 255, ignoreInternalEnum: true),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "SpectraVoice",
- "SpectraVoice",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "Panning", "Panning", "", -128, 128),
- new CtlDesc(2, "Attack", "Attack", "", 0, 512),
- new CtlDesc(3, "Release", "Release", "", 0, 512),
- new CtlDesc(4, "Polyphony", "Polyphony", "", 1, 32, ignoreInternalEnum: true),
- new CtlDesc(5, "Mode", "Mode", "", 0, 4, enumTypeName: "SpectraVoiceMode"),
- new CtlDesc(6, "Sustain", "Sustain", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(7, "SpectrumResolution", "Spectrum resolution", "", 0, 5, enumTypeName: "SpectraVoiceResolution"),
- new CtlDesc(8, "Harmonic", "Harmonic", "", 0, 15, ignoreInternalEnum: true),
- new CtlDesc(9, "HarmonicFreq", "H.freq", "", 0, 22050, ignoreInternalEnum: true),
- new CtlDesc(10, "HarmonicVolume", "H.volume", "", 0, 255, ignoreInternalEnum: true),
- new CtlDesc(11, "HarmonicWidth", "H.width", "", 0, 255, ignoreInternalEnum: true),
- new CtlDesc(12, "HarmonicType", "H.type", "", 0, 18, enumTypeName: "SpectraVoiceHarmonicType"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "VelocityToControl",
- "Velocity2Ctl",
- "",
- new List()
- {
- new CtlDesc(0, "OnNoteOff", "On NoteOFF", "", 0, 2, enumTypeName: "VelocityToControlOnNoteOff"),
- new CtlDesc(1, "OutMin", "OUT min", "", 0, 32768),
- new CtlDesc(2, "OutMax", "OUT max", "", 0, 32768),
- new CtlDesc(3, "OutOffset", "OUT offset", "", -16384, 16384),
- new CtlDesc(4, "OutController", "OUT controller", "", 0, 255, ignoreInternalEnum: true),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "Vibrato",
- "Vibrato",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 256),
- new CtlDesc(1, "Amplitude", "Amplitude", "", 0, 256),
- new CtlDesc(2, "Freq", "Freq", "", 1, 2048),
- new CtlDesc(3, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- new CtlDesc(4, "SetPhase", "Set phase", "", 0, 256),
- new CtlDesc(5, "FrequencyUnit", "Frequency unit", "", 0, 6, enumTypeName: "VibratoFrequencyUnit"),
- new CtlDesc(6, "ExponentialAmplitude", "Exponential amplitude", "", 0, 1, enumTypeName: "Toggle"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "VocalFilter",
- "Vocal filter",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "FormantWidth", "Formant width", "", 0, 256),
- new CtlDesc(2, "Intensity", "Intensity", "", 0, 256),
- new CtlDesc(3, "Formants", "Formants", "", 1, 5, ignoreInternalEnum: true),
- new CtlDesc(4, "Vowel", "Vowel (a,e,i,o,u)", "", 0, 256),
- new CtlDesc(5, "VoiceType", "Voice type", "", 0, 3, enumTypeName: "VocalFilterVoiceType"),
- new CtlDesc(6, "Channels", "Channels", "", 0, 1, enumTypeName: "Channels"),
- new CtlDesc(7, "RandomFrequency", "Random frequency", "", 0, 1024),
- new CtlDesc(8, "RandomSeed", "Random seed", "", 0, 32768),
- new CtlDesc(9, "Vowel1", "Vowel1", "", 0, 4, enumTypeName: "VocalFilterVowel"),
- new CtlDesc(10, "Vowel2", "Vowel2", "", 0, 4, enumTypeName: "VocalFilterVowel"),
- new CtlDesc(11, "Vowel3", "Vowel3", "", 0, 4, enumTypeName: "VocalFilterVowel"),
- new CtlDesc(12, "Vowel4", "Vowel4", "", 0, 4, enumTypeName: "VocalFilterVowel"),
- new CtlDesc(13, "Vowel5", "Vowel5", "", 0, 4, enumTypeName: "VocalFilterVowel"),
- },
- new List()
- {
- },
- null
- ),
- new ModuleDesc(
- "VorbisPlayer",
- "Vorbis player",
- "",
- new List()
- {
- new CtlDesc(0, "Volume", "Volume", "", 0, 512),
- new CtlDesc(1, "OriginalSpeed", "Original speed", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(2, "Finetune", "Finetune", "", -128, 128),
- new CtlDesc(3, "Transpose", "Transpose", "", -128, 128, ignoreInternalEnum: true),
- new CtlDesc(4, "Interpolation", "Interpolation", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(5, "Polyphony", "Polyphony", "", 1, 4, ignoreInternalEnum: true),
- new CtlDesc(6, "Repeat", "Repeat", "", 0, 1, enumTypeName: "Toggle"),
- },
- new List()
- {
- },
- new AddCodeDesc()
- ),
- new ModuleDesc(
- "WaveShaper",
- "WaveShaper",
- "",
- new List()
- {
- new CtlDesc(0, "InputVolume", "Input volume", "", 0, 512),
- new CtlDesc(1, "Mix", "Mix", "", 0, 256),
- new CtlDesc(2, "OutputVolume", "Output volume", "", 0, 512),
- new CtlDesc(3, "Symmetric", "Symmetric", "", 0, 1, enumTypeName: "Toggle"),
- new CtlDesc(4, "Mode", "Mode", "", 0, 3, enumTypeName: "Quality"),
- new CtlDesc(5, "DCBlocker", "DC blocker", "", 0, 1, enumTypeName: "Toggle"),
- },
- new List()
- {
- new CurveDesc(0, "Curve", "Maps input to output.", 0, 1, 256),
- },
- null
- ),
- };
-
- return data;
- }
- }
-}
diff --git a/CodeGeneration/ReparsedData/Data.cs b/CodeGeneration/ReparsedData/Data.cs
deleted file mode 100644
index 18c9093..0000000
--- a/CodeGeneration/ReparsedData/Data.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace CodeGeneration.ReparsedData
-{
- public partial class Data
- {
- public ICollection Modules { get; set; }
- public ICollection Enums { get; set; }
- }
-}
diff --git a/CodeGeneration/all_modules.sunvox b/CodeGeneration/all_modules.sunvox
deleted file mode 100644
index b3e1c5349526817f09e44f174195a8d5e2b9102d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 23910
zcmeHP33yyp75>{&psYnjP*F!gtqPh3McgON*3e8d?S#;)cTbpEvK$oSAuVlAD>NpuOLhynpUH_r812
zIrrRq|F>j%x>kXyr*&m!KOW}+bC>Xk!)=}ILB7gl+VXe-@se~Zp)zM`e!8_q@&5el
zZeJN-{oUQ((x^xMYwzjm)MJ`|%bQZINATF#(0Jkr4U11`JUOwrk^hm(GzUVM1Ef}W
zb!mYM_?KGM)u#ByTrQXD&Ex)ibGgn`W|`(|YCd&kzASO3wKHh+vBaJ2t;<#B5&TOx
zbqAPGaknc=9F*l{k#6a3((C`fr*!kuKv#iIIy(ZKpiPojt7E2t;c(Q>JRe9GNlj*JIE
zuvH%>PU$h||I(K3!@^D!51A^S-7>m$Q)c_-v4Ns^2~y8Kh&e?$AD3RpM)?e1&MLLK
zwCcgRoUq{z2dWC){sxn8<&!4g;y4+bFEM3peg&rcZDYAG&AR(lbBwl>YgY789YZ57
z<$OG1!q+42sM#Zgt#n?{V6e>(22bc67E`=XHW7ox