Open War3Evo opened 2 years ago
No, I think you should do that when you finished the VST3 version. the UI interfacing is just a small part, so if you've seen it, it should be doable! Anyway, here it is: https://github.com/RuudErmers/ClapForDelphi
I got stuck on the VCL to FMX version... I can't seem to figure out a good way to "CreateParented" for FMX.
Anyhow... CakeWalk doesn't use CLAP. So, I can't text / use it until CakeWalk starts using it. I do not wish to use any other DAW.
Did you manage to get it working in VST3? How? This is some code which might help:
begin
Result := 0;
begin
// if an editor form is assigned create the form and assign it
{$IFDEF UseCreateParented}
if Assigned(FEditorFormClass) then
begin
FEditorForm := FEditorFormClass.CreateParented(HWnd(ptr));
FEditorForm.Owner := Self;
end;
{$ELSE}
if Assigned(FEditorFormClass)
then FEditorForm := FEditorFormClass.Create(Self);
{$ENDIF}
// the below code is about to be removed soon! if Assigned(FOnEditOpen) then FOnEditOpen(Self, FEditorForm, THandle(ptr));
if Assigned(FEditorForm) then try Result := 1; with FEditorForm do begin {$IFDEF FMX} Application.MainForm := FEditorForm; Visible := True; SetBounds(0, 0, Width, Height); Invalidate; {$ELSE} ParentWindow := HWnd(ptr); Visible := True; BorderStyle := bsNone; SetBounds(0, 0, Width, Height); Invalidate; {$ENDIF} end; except end; end; end;
I will try that and let you know how it goes.
I am wondering if I'm going about it wrong or not??
FMX does not have TFormClass ... I had to create it:
Type TFormClass = class of FMX.Forms.TForm;
The code has changed a lot:
https://github.com/War3Evo/RMSVST3/tree/Delphi-11.0/FMX_AthenaVST3
But ... can't use (self) in FMX .. etc... I've spent a week on this wall... I think it's about time I go back to actually writing a plugin using VCL and I'm not going to worry about the graphics until later.
I was trying to get rid of the flickering that the piano makes when you play it.
This is the best I can come up with for FMX: (which I myself never used except for Android stuff...) FEditorForm := FEditorFormClass.CreateParented(HWnd(ptr)); FEditorForm.Owner := Self; with FEditorForm do begin Application.MainForm := FEditorForm; Visible := True; SetBounds(0, 0, Width, Height); Invalidate; if Assigned(FOnEditOpen) then FOnEditOpen(Self, FEditorForm, THandle(ptr));
Your right... I've not used FMX but only for Android. I don't have Mac so ... I guess I'll stick with VCL for now.
The only thing I could get it to do is create the component without the form..lol. I'll have to attack FMX later.
I'm going to try and convert your Piano Component to TDirect2DCanvas and have it use Direct2D from Windows.
Direct2D should be universally accepted on all windows versions 7 and higher.
I really want to start working on plugins more than I want to make the FMX work. If we get lucky, maybe a 3rd person will help in development.
There's a musical theory plug-in I've been dying to program.
I also want to eventually make a utility host plug-in that can read all the other plugins... Then it can make changes to their parameters. There's plugins out there like that, but nothing unlimited number of parameters.
Can you write the CLAP code in FMX, so that it can be also be developed using Skia4Delphi graphics engine and developed for Linux and Mac??