Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support drag-and-drop to load .nam models #445

Open
jamesWalker55 opened this issue Mar 14, 2024 · 5 comments
Open

[FEATURE] Support drag-and-drop to load .nam models #445

jamesWalker55 opened this issue Mar 14, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers priority:low Low priority issues

Comments

@jamesWalker55
Copy link

Is your feature request related to a problem? Please describe.
In the plugin, the only way to load a model is to use the OS's built-in file selector. However, the location it initially shows seem to reset occasionally. I have to navigate all the way to the folder where I store my *.nam models again whenever this happens.

Describe the solution you'd like
Allow dragging and dropping *.nam models directly onto the plugin, e.g. from a file explorer or the DAW's sample browser.

Most DAWs like FL Studio or Reaper have a built in sample/file explorer and allow you to add 'favourite' folders. It's much easier to browse for .nam models there rather than the OS's built-in file selector, so I would like to suggest allowing dragging directly from an outside source to the plugin.

Describe alternatives you've considered
N/A

Additional context
N/A

@jamesWalker55 jamesWalker55 added enhancement New feature or request priority:low Low priority issues unread This issue is new and hasn't been seen by the maintainers yet labels Mar 14, 2024
@DivannKokos
Copy link

at least in windows there are pinned folders in file explorer
and os's built-in file selector in windows is file explorer

@sdatkinson
Copy link
Owner

Can possibly implement using IControl.OnDrop().

@sdatkinson sdatkinson added good first issue Good for newcomers and removed unread This issue is new and hasn't been seen by the maintainers yet labels May 7, 2024
@synchu
Copy link
Contributor

synchu commented Dec 23, 2024

Right, I did a few quick changes here and there and it appears to work (at least on Windows, I have no means to test it with Mac).

@sdatkinson - I can see there's a Pull request that has been posted, so not sure how to proceed.
Do I put a separate Pull request or try to get along with this one (not quite sure of my skills with Github :) )?

@sdatkinson
Copy link
Owner

@synchu you can start by pushing your changes to a branch on your fork and share about it here.

I (or others) can have a look if I find time and handle the PR. But if you do that then anyone else can merge your changes into a branch of their own 👍

@synchu
Copy link
Contributor

synchu commented Dec 27, 2024

Thanks @sdatkinson. I applied the changes here:

https://github.com/synchu/NeuralAmpModelerPlugin

Now there's a required change into IControl.h, which I am not sure got committed, but it looks like these.
From:
virtual void OnDrop(const char* str) {}
to

virtual void OnDrop(const char* str)
 {
   if (OnDropFunc)
   {
     OnDropFunc(str);
   }
 };

 std::function<void(const char* str)> OnDropFunc;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority:low Low priority issues
Projects
None yet
Development

No branches or pull requests

4 participants