Drag and Drop Audio Files also from a Website to Audio Montage Window

Hi all, dear Philippe,

for me it would be wonderful if I could simply drag and drop audio files from a webpage (e. g. from sites offering “sfx” and “adlibs” files or other ai stuff like “text to speech”, prepared for this purpose) into e. g. the “Audio Montage” window of Wavelab as well, just as I already can do with files that are located in a local folder on my hard disk.

As a senior windows programmer i can provide you with a short working c++ win32 example how to do, since accepting files from a Webpage via “Drop” event is (in this special scenario) a bit tricky since you can’t use the simple way of DragAcceptFiles(hwnd, TRUE); … case WM_DROPFILES:… in hWnd message loop.

I also can provide the correct javascript code to implement the drag and drop for audio files on such webpages as well.

Would this be a great feature for Wavelab? Is anyone interested :nerd_face: ?

Regards,

Martin

.
.
.

Just as a little foretaste:

You’ll have to implement your own “class DropTarget : public IDropTarget”, create “dropTarget” as an instance of that class and use RegisterDragDrop(hWnd, dropTarget); to register your DropTarget class as a callback mechanism for the “Drop” events.

On Windows, Microsoft Edge and Google Chrome-Browser will then offer you an IDataObject pDataObj for your implementation of a Drop function. Btw, the good old CF_HDROP clipboard format was used to transmit a null terminated string as the full path to the dropped file already located in a random %Temp% folder on your local hard drive (e. g. C:\Users<YOUR-USERNAME>\AppData\Local\Temp\chrome_drag_\Audio.wav) which was dropped on your app’s window.*

Perhaps other users also know “the correct way of programming” to handle this special kind of drag and drop audio from a website to Wavelab for Apple macOS?

I’m sorry, but WaveLab does not currently support cross-platform interaction with internet browsers. I aim to ensure that any new features are available on both Windows and Mac, so while your offer for a working C++ Win32 example is appreciated, it won’t be helpful in this case.

Hi Philippe,

first of all many many thanx for your quick response!

PG1: "I aim to ensure that any new features are available on both Windows and Mac"

Yes, i see (and agree), and in respect to this I also had left a comment at the end of my post to perhaps get additional help from any macOS software developers out there who are familar on how to implement this at macOS site.

But please let me know if you like the idea at all.

Regards,

Martin

BTW: Dragging an Audio.wav or Audio.mp3 from my test page to macOS desktop works if i am using also the Google Chrome-Browser on Mac.

Yes, UX using drag and drop is always welcome.
In WaveLab 12, I added the feature to drag and drop audio selections from the audio file and montage to any other DAW and to the file browser because I believe drag and drop is a well-known and easy action, making the user experience smoother.

Public test page? I am not knowledgeable about web development, but maybe the feature you are asking for may depend on how the files are stored by the web site (?)

I can make my test page available for you e. g. via a PM if you like to test the dragging part of the idea.

1 Like