Custom AHDSR LAF
-
I have seen multiple posts on the platform about this topic, but I just can't seem to get rid of it.
How do I remove the vertical lines that appear when playing audio? I understand that I'm missing something in the LAF to get rid of this, but I don't know enough to remove it myself.
Can anyone help me?
Here is my current script for the LAF:
const var Envelope = Synth.getModulator("AHDSR Envelope1"); laf.registerFunction("drawAhdsrPath", function(g, obj) { var a = obj.area; g.setColour(0xFFFF5400); g.setGradientFill([Colours.withAlpha(0xFFFF5400, 0.10), 100, 200, 0xFF8d478d, 300, 25]); g.fillPath(obj.path, obj.pathArea); g.setColour(0xFFFF5400); g.drawPath(obj.path, 1.5, 1.5); });
-
-
@tiesvdam I don't think you can get rid of it, I solved it by painting the path in a panel, and removing the "extra line" parts by manipulating the path string
The moving ball is from the envelope floating tile but the rest is a painted panelit involves converting the path to string - remove certain strings - convert it back
I hope there is a better way to do it, but I don't know if there is any.
Anybody knows how to do it in a less cumbersome way?this is part of the string manipulation, p is the path
var a = p.toString().split(" "); var ax = parseInt(a[6]); var ay = parseInt(a[7]); var acx = parseInt(a[4]); var acy = parseInt(a[5]); var dx = ax + (parseInt(a[14])-ax)*0.95; var dy = parseInt(a[15]); var sx = parseInt(a[17]); var sy = parseInt(a[13]); var rx = parseInt(a[22]); var ry = this.getHeight()-3; var str = a.join("\n"); var path = Content.createPath(); path.fromString(str); g.setColour(Colours.chartreuse); g.drawPath(path, path.getBounds(1), 1.0);