Aepelzen / AepelzensModules

modules for vcvrack
GNU General Public License v3.0
33 stars 18 forks source link

Aepelzens Modules-0.6.0dev-win, as is #22

Open dizzisound opened 6 years ago

dizzisound commented 6 years ago

@Aepelzen Posting a Windows build against the current master branch, as is (I previously built from source the libsndfile dependency adding autotools instructions to my makefile). Platform: Windows 8.1 x64

The plugins loads well in Rack, only an error occurs when clicking the "-" button after loading a sample. Below the log message printed when running with make debug:

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000000037c371f in SampleDisplay::draw (this=0x11d90260, vg=0x3433170) at src/Sampler.cpp:494
494                     y = (si) ? si->buffer[i].samples[0] * gain /2.0f + 0.5f  : 0.0f;

Posting this for your use, archive or test purposes. Best

Aepelzens Modules-0.6.0dev-win.zip

Aepelzen commented 6 years ago

Thanks.

Just a couple of questions. Can't you just install libsndfile through pacman. That way you shouldn't have to change anything. And about the crash. Does it always crash when you remove a sample or only occasionally?

dizzisound commented 6 years ago

Hi! In short, my notes:

  1. Yes, I didn't try to, but surely I could proceed installing the required dependency beforehand via pacman (btw, tell me if you are interested in the results of such a test in the Windows/MingW environment). I was simply interested in testing a build for the Windows platform that could be more automated and "trasparent to the final user" (I hope to express appropriately here with my limited grasp of English language). That is, following the common guidelines I registered in the Rack plugins ecosystem (although, with the new automated build infrastructure of Rack, it looks like cross-platform dependency management, as it was handled before version 0.6, is emerging as an issue).

  2. I made 4 tests, and it always crashed. I couldn't have time to test the module more in depth, though. But I wished to move here (being the more appropriate and useful context) an issue raised by some other users in a thread of the Facebook VCV Rack Official User Group (here the permalink: https://www.facebook.com/groups/vcvrack/permalink/180664915926994/)

In the meantime, thanks for your feedback, and above all, for all the Aepelzen module set.

Aepelzen commented 6 years ago

Ok, thanks again. I thought i caught most of those crashes by now but I'll check again.

  1. I'm not sure what you are saying but the way dependencies are handled in the community repository seems to be to include them and build them locally. I personally don't t think that's a good idea so I don't do it that way. You can build and install the dependencies however you want (I just think that package managers seem like the obvious solution).

  2. This is definitely the more appropriate context. I don't do facebook (I can not even view that link without logging in), so if people want to file issues they have to do it here.

dizzisound commented 6 years ago

@Aepelzen I was too curious to fully tweak the sampler... I managed to do a quick-and-dirty-fix to the segfault problem (a simple flag that helps to escape the drawing routine for the whole step needed for sample swapping, I would say). Really not elegant, but that's enough for the issue to be bypassed. I tried also to enable the loading of files from directories, and it works fine on my test platform (Windows 8.1 x64). I committed this "dirty" Win-friendly version, including the makefile to build libsndfile locally, in my forked repo. It's not intended to be a PR (just a rough fix), but now I can fully play with the module, and it's awesome! Best

Aepelzen commented 6 years ago

Interesting. I tried something similar. My plan is to only redraw the sample when it actually changes. That would not only fix the segfaults but also improve performance but i haven't found a way to "cache" the image yet. But this seems like a good workaround in the meantime.

About the directories: I thought dirent.h is not supported on windows. You probably have Cygwin or smth. like that installed, so maybe that's why you have it? Do you think this will work on normal user installs too?

dizzisound commented 6 years ago

@Aepelzen I was quite surprised too. On my development Windows machine I have a standard MingW setup, living side-by-side with a regular Microsofr VisualStudio IDE and a plethora of other common development tools. Moreover, I just tested the plugin on my "music production only" DAW, a Windows 7 x64 machine, which has nothing to do with code development (no MingW, no VisualStudio, no compilers, no tools, no editors, no runtimes, nothing at all, except for Windows Notepad maybe... ). Well, the plugin works on the DAW too, the "-" (remove sample) button works, and the directories selection and samples loading too (I tested with .wav and .aif files). I suppose the dirent.h included with MingW/gcc wraps a minimal Windows compliant implementation, something like this: http://www.two-sdg.demon.co.uk/curbralan/code/dirent/dirent.html Indeed the module makes use of a basic set of interfaces (opendir, readdir, closedir) and the simple strip-off of the d_type field check (undeclared for the compiler) seems to be not so severe and let the Win build complete successfully. After the check on my DAW, I am quite confident that the plugin could generally work on "normal" (no development-equipped) Windows machines. A couple of testers would be surely helpful and prudential though, before a public release. By the way, as I forgot to post the package with the Windows binaries, I do it now for your convenience (should you have a Windows system with Rack installed at your disposal, or someone else willing to test the plugin on Windows). You find it here: https://github.com/dizzisound/AepelzensModules/releases/tag/0.6.0dev-win

Aepelzen commented 6 years ago

Ok. That's good to know. If it compiles with MinGW that's good enough for me. I will probably remove the preprocessor statements for the next update and just see if somebody complains. And thanks again for doing all this.

dizzisound commented 6 years ago

No need for thanks man, playing with the module is enough rewarding, I'm having so much fun with it!