Update to latest plugin API

This commit is contained in:
X9VoiD 2021-01-19 04:56:58 +08:00
parent 8d1e23cd0f
commit e5682315de
5 changed files with 17 additions and 15 deletions

@ -1 +1 @@
Subproject commit f1d9ebd069d29d086406c63bf7a006f66e1786ff
Subproject commit 1b996b45fcd5433f884d23bea8a2cb6c837c11b5

View file

@ -31,16 +31,16 @@ namespace VoiDPlugins.Filter.MeL
public FilterStage FilterStage => FilterStage.PostTranspose;
[Property("Offset"), Unit("ms")]
[Property("Offset"), Unit("ms"), DefaultPropertyValue(0)]
public float Offset { set; get; }
[Property("Samples")]
[Property("Samples"), DefaultPropertyValue(20)]
public int Samples { set => Core.Samples = value; }
[Property("Complexity")]
[Property("Complexity"), DefaultPropertyValue(2)]
public int Complexity { set => Core.Complexity = value; }
[Property("Weight")]
[Property("Weight"), DefaultPropertyValue(1.4f)]
public float Weight { set => Core.Weight = value; }
private readonly MLCore Core = new MLCore();

View file

@ -43,18 +43,18 @@ namespace VoiDPlugins.Filter.MeL
return SyntheticReport;
}
[Property("Samples")]
[Property("Samples"), DefaultPropertyValue(20)]
public int Samples { set => Core.Samples = value; }
[Property("Complexity")]
[Property("Complexity"), DefaultPropertyValue(2)]
public int Complexity { set => Core.Complexity = value; }
[Property("Weight")]
[Property("Weight"), DefaultPropertyValue(1.4f)]
public float Weight { set => Core.Weight = value; }
private readonly MLCore Core = new MLCore();
private SyntheticTabletReport SyntheticReport;
private new DateTime lastTime;
private DateTime lastTime;
private new double reportMsAvg = 4.0;
}
}

View file

@ -12,6 +12,8 @@ namespace VoiDPlugins.Filter
private static Vector2 StartingPoint;
private static bool IsActive { set; get; }
private static bool SetPosition { set; get; }
[Property("Property")]
public string Property { set; get; }
public Action Press => () =>
@ -50,8 +52,8 @@ namespace VoiDPlugins.Filter
}
}
[SliderProperty("Precision Multiplier", 0.0f, 10f, 0.3f)]
public float Scale { get; set; } = 0.3f;
[SliderProperty("Precision Multiplier", 0.0f, 10f, 0.3f), DefaultPropertyValue(0.3f)]
public float Scale { get; set; }
public FilterStage FilterStage => FilterStage.PostTranspose;
}

View file

@ -22,14 +22,14 @@ namespace VoiDPlugins.Filter
return ((currentEMA - lastEMA) / weight) + lastEMA;
}
[Property("EMA Weight"), ToolTip
[Property("EMA Weight"), DefaultPropertyValue(0.5f), ToolTip
(
"Default: 0.35\n\n" +
"Default: 0.5\n\n" +
"Defines the weight of the latest sample against previous ones [Range: 0.0 - 1.0]\n" +
" Lower == More hardware smoothing removed\n" +
" 1 == No effect"
)]
public double EMAWeight
public float EMAWeight
{
set
{
@ -37,7 +37,7 @@ namespace VoiDPlugins.Filter
}
get => weight;
}
private double weight;
private float weight;
public FilterStage FilterStage => FilterStage.PreInterpolate;
}