-
Notifications
You must be signed in to change notification settings - Fork 33
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 request: Spout texture sharing support #3
Comments
Hey it's on my to-do list! I'm working on adding some other functionalities at the moment, but one day I will! |
I also asked for the Spout integration + I am still doing it, but because of too many errors, I can't do it. If you are done, please DM me on Twitter or Discord the code that you integrated with Spout. |
5 months ago, I released the issue about Spout integration on my BeatDrop improvement. Btw, it's still in my to do list. |
There is a work around for the spout/syphon usage in OBS. Just take the time to pre-record the programs and then stream those video's when desired. Yes, Spout/Syphon support would ease usage, OBS does have a Spout plugin, it's been updated to work since OBS rewrite in V28. Use it often to record NestDrop Midnight video's for a Discord community. MilkDrop v3 is "visible" to OBS. Just a matter of resizing MD3's window to either the target resolution, or a derivative of that rez. (I.E. target size = 1280 x 720. MD3 window size = 960 X 540) |
Yes you can see the MilkDrop3 window in OBS, add 'Window Capture' in the Sources, then select the MilkDrop 3.exe, and make it fit to your screen's capture size. |
hey .. id suggest to check out implimentation done by nest drop.. they had optimised it a lot more then what beatdrop could do. |
Just updated Nestdrop Midnight late last week. At the moment, I've close to 200K presets to curate. While there may be faster programs for viewing presets, Beatdrop is what's on hand. Can't be certain, but I chimed in with the work around of the spout inclusion. Have to say, Nestdrop Spout 2 feature pulls my fat outta fire more times than not. The video's mentioned above are 35 - 50 minutes long. This box of rocks I have doesn't have a GPU, so I'm limited to what DirectX can do on the motherboard. |
200k presets? you must have ~150k duplicate. There are less than 70k unique presets total, and thousands of them are almost identical. You can clean your collection with a program like Czkawka to remove identical files, then try to remove almost identical files. NestDrop is cool, next year I'm planing to code something similar, just much better and faster ;) |
Much my reasoning on Beatdrop to curate is that earlier this year I stumble upon https://github.com/milkdrop2077/milkdrop2077 . I've been loading 10 or so presets into source folders and running 500 or so mashups based on them. Thanks Milkdrop2077 ! Couple weeks ago fell into a 60 preset collection that uses images for textures. While it may not a big deal to many, with just shy of 2 years under my Milkdrop experience, it's a game changer. Yes, Nestdrop Midnight has the sprite system. The hard transitions using sprites has me digging for more elegant solutions. |
Hello all.. I was referred to this issue and was prompted to test Spout for DirectX 9 which I haven't done for quite some time. As a result I have been successful in updating my old fork of BeatDrop. All went well with the latest code and it's also updated for Visual Studio 2022. The changes could be used in MilkDrop3, but there's a bit more involved because Spout texture sharing requires DirectX9EX instead of just DirectX9 that the original Milkdrop was based on. All the code is commented throughout though if you want to have a look. |
I will look at your Spout version of BeatDrop! Can you please make this to support for Visual Studio 2019? Btw. What is DIRECTX9EX? I think it's an evolved version of DirectX 9. |
Hey leadedge! thank you so much for all the information! |
No problems. @OfficialIncubo - You can change to Visual Studio 2019. Open BeatDrop.sln and : Project > Properties > General > Platform Toolset > Visual Studio 1019 (v142) With re-build, you will get re-definition warnings due to using Windows Kits\10 together with Microsoft DirectX SDK (June 2010). These will not occur with build only. If you want to remove them : Project > Properties > Include Directories DirectX9EX is an enhanced version of DirectX 9 and required for shared textures. Look at DXcontext.cpp and also search for "DX9EX" in MilkDrop2PcmVisualizer.cpp. There is a function "bool CheckForDirectX9c()" that looks for the correct version on your system. These links might be useful https://www.microsoft.com/en-us/download/details.aspx?id=8109 |
Some cons that I found on the latest BeatDrop for Spout release are:
Plus I didn't try how the Spout works on BeatDrop and using with more instances. I have Spout on my laptop, so I'll try if I have time. I only tried with the old version and it works perfectly! |
The modifications are only for reference for use of the SpoutDX class instead of the OpenGL SpoutLIbrary. I don't support the program itself any more. The SpoutLIbrary version will still work fine as long as you stay with the same library files. |
Hey @leadedge quick question : how to recompile your first version of beatdrop with the SpoutLibrary.dll ? I have this error : I am missing some OpenGL library or something? I'm using VS2019 + glut lib |
The linker isn't finding SpoutLibrary. I have made a "SpoutLibrary" branch with the original code for reference. You need a "spoutLibrary" folder as in the repo. Project > Propertines > Linker > General Project > Properties > Linker > Input These might also be needed Copy SpoutLibrary.dll to your release folder. |
These Seven Succurro Presets are sooo epic, but I have a problem about "Succurro - TV Static 1" preset:
One thing is: I need the "zombies_03.jpg" image texture file in order to work. |
Really sorry but I can't help with the presets. I understand that some are brilliant. Some time back there was collaborative work with the developer of NestDrop and the preset might have been added then. Maybe you will find the missing file in the NestDrop presets. |
Hey, @leadedge, I managed to compile the SpoutDX9 version of BeatDrop and I have some cons for you:
The old version (1.0.0.2) works than intended and I don't prefer the SpoutDX9 version of it until it's fixed, but where do I menage to compile the 1.0.0.2 version of BeatDrop? |
Hi @OfficialIncubo |
Now the preset functionality and navigation keys now worked! BeatDropSpoutReenablingIssue.mp4I changed the SpoutWidth and SpoutHeight to 720. When I open BeatDrop, it doesn't send to Spout. It doesn't support below 1920x1080 resolution. |
Ok at least the keys work. I will have a look at disable/enable. I will also look at a 720x720 window. I assume you prefer a square format. Also I should mention that the main reason for the change to the DirectX9 version is the increased speed and reduction of CPU load. It uses a GPU texture surface instead of pixels from the backbuffer. |
I tried to change the initial dimensions to 720×720, but I started BeatDrop and it doesn't initialize the Spout output to the Sender.
Even the missing keys and some preset functionalities are fixed, I give up from menaging to compile the OpenGL Version of BeatDrop (1.0.0.2). So I'm still using the SpoutDX9 of this. |
Oh! And if I resize the window if I want, the Spout Reciever info only sends the old resolution info. I want it to respond to the actual resolution. |
Hey, @leadedge! If I enable the SpoutOutput once, it starts to send it. Log:
Then I turned off and I reenabled it. Nothing happened. It won't let me to show this visualizer to sender again. Plus after the first resize to the smaller window, it shows:
...which the sender info is still in 1920×1080. I want to update the resize info to the actual window resolution. Not the old one.
Oh. I see. If you are done, then remind me. |
I have been though the whole project to complete the sender size implementation. The aim was to set a fixed sender resolution that does not change when the user re-sizes the window. The resolution can then be much larger than the monitor can display, such as 4096x4096 for large scale projection. I made a change to SendDX9surface in the SpoutDX9 class to enable this. The same change allows an option for the sender size to be the same as the window. Code comments in milkdropfs.cpp RenderFrame/SendDX9surface describe how to do this. I also found an error in nseel2/nseel-compiler.c where an intrinsic re-definition was removed without retaining the default definition. This might fix the preset errors. I hope this allows you to achieve what you want to do. Unfortunately I don't have any more time to spend on this right now. |
Ok. The Spout Output now works after reenabling than intended.
Ok. This is the one unimplemented thing (I know?), but the Spout output needs to be reenabled after resizing the BeatDrop window.
Ok. Feel free to take a time. The Spout Integration is now finished today, but it remains a BETA feature. |
The fixed sender resolution is implemented now. As far as I can see it's working OK. The Spout output remains enabled after re-sizing the window. If it has been disabled with Ctrl-Z it remains disabled. |
I know.
You can take a break. I don't want to disturb you at all ;) |
There was a problem was with the original version. I found a bug in SpoutDX here where the sender size was updated with class variables before they were updated. Directx9 StretchRect still worked OK and hid the error. I hope the modifications allow you to complete yoor project. By using DirectX9 functions instead of CPU, you can send 4K images at 30fps easily. I won't be taking a break so much as finishing other urgent work. |
'm_dwFormat = dwFormat' is in the first section where it is not initialized yet. Using the class variables here is OK because they are already updated. The next section for a size change was incorrect and the corrected file is now in the master branch. I have tested this with console print and I can't see any error. When you say it doesn't work, what do you mean exactly. CreateSharedDX9Texture is passed width and height and these should be used. |
Ok ok ok ..... OK, I am just a little bit confused hehe 😅
I didn't notice if Here is a demo: BeatDropSpoutWindowSyncTest.mp4Now it works than trying to attempt modifying the code in SpoutDX9.cpp. |
OK I think you have it right. Update true is default. Fixed size allows higher resolution than the monitor for projection. |
Oh. I need to say something. I wish there is a Spout Input Feature on BeatDrop, ex. Using OBS Spout Filter. (Ctrl + X hotkey) You can change to another input while it actually uses more OBS Spout Filter. Ex. Use 3 OBS Spout Filters, Ctrl + X to activate Spout Input, Ctrl + X again to another input. Ctrl + X to turn off the Spout Input if it's in the last input. |
Spout input is available in NestDrop. This project was used in the development and remains as an example but I am sorry that I don't have time to develop it further. |
I see that you have the Spout integration done, @milkdrop2077! You can close this issue. |
For Spout Input as Sprites, you can check the issue here: OfficialIncubo/BeatDrop-Music-Visualizer#26 |
For versatility It would be awesome to have spout texture sharing support, then Milkdrop3 render could be used in OBS via Spout as background for streaming or in VJ softwares
All the information for devs:
https://github.com/leadedge/Spout2
The text was updated successfully, but these errors were encountered: