-
Notifications
You must be signed in to change notification settings - Fork 23
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
Windows build #1
Comments
Ive not tested cmake files with windows so they probably need some 'adjustments' the bigger issue, is not building for windows... it is the fact that libusb will not work under windows, due to isosynchronous transfers. this means Id need to write a new driver, probably based on libusbx. so no, cygwin, really is going to make much difference really... all these things are not 'difficult', but not really a priority for me at the moment, my priority for MEC is the small footprint format for rPI/BBB/Bela - macOS/Linux really has been a 'low cost' bi-product, which also makes development easier. I guess once Ive got MEC complete (please bare in mind, this was not really a 'release'), then I'll consider porting to windows. if your ultimate aim is to use under rPI/BBB/Bela, but your trying to compile on windows to 'test/dev' (in a similar way Im using macOS), Id suggest perhaps use a lightweight linux vm on windows, its closer to your target platform, its a much nicer dev environment anyway ;) side note: Im trying to keep the SP code, close to the ML code base for now, so I can inherit new touch tracker code... once this is released, I may let it 'diverge' a bit more. |
Just had a look into the libusb FAQ, perhaps there is hope to get at least Windows 8.1/10 support working without writing a new driver: "WinUSB does not support isochronous transfers under Windows XP/Vista/7/8. WinUSB under Windows 8.1 or later supports isochronous transfer. Take note as of now libusb Windows only supports isochronous transfer using the usbdk backend (version 1.0.21 and later)." Perhaps one in-between step could also be a Windows version without soundplane support (so that code wouldn't have to be ported in the first place). But for Bela crosscompiling Linux is probably the easier route then (which would also be the primary thing I would be interested in MEC). My main PC is dual boot Linux/Windows anyways and on the Surface I have at least a VM. Thinking about adding the Morph support to MEC first as it looks simpler that way to reach my main goal (getting Morph-to-MPE conversion working on a BBB board). Will try to keep it encapsulated enough that it can also easily be taken over to HEELP later on though. (Which might be more fun on PC/Mac with it's UI and plugin hosting capabilties - not sure whether it will ever reach the low profile of MEC, so perhaps having the instrument specific code as part of both projects makes sense as a long term solution also). Morph support take some time though. Still don't have any hardware in the first place... |
libusb - yeah, this is what I tried... (win10/libusb/usbdk) but it didnt work. |
ok... so I re-tested it the version 1.0.20 was a red-herring, I was using 1.0.21... there are 2 issues... which may be to do with my VM, or not. so the way I test is to use the low level eigend tools, pezload and pico dump... a) if I use pezload on windows to load the firmware, it appears to work... but when I connect picodump, it 'resets' the pico back to its unloaded firmware state. b) if i load the firmware using pezload on macOs, (of course if I do the above all on macOS or Linux, it works fine) it also feels like usbdk, has some 'tracking issues' with devices being repeatedly connected/disconnected, but that may not be an issue if it works correctly. perhaps it will work on a real windows machine but it all feels a bit flakey (saying that windows driver handling feels flakey at the best of times ;)) if you want to try, then you will find on my eigenD repo a win64testing branch, just check this out, and build it. (its not 64 bit!, its still 32bit, as this was the first hurdle i hit, being 'low in the stack') frankly, it all feels a bit unreliable, and I've not even been able to test its performance is acceptable :( all this 'faffing' required to even to get to this stage, does not really make me feel like continuing with this approach, hence why it felt better to do a driver using a SDK that natively supports iso transfers. anyway, im putting it back on the back-burner for when i have a bit more time/enthusiasm for it ;) |
Thanks, will give it a try. One thought: Perhaps we could make the "button commands" that I think would be essential for Morph a general MEC mechanism. Essentially these commands allow to set variables from the JSON preferences to other values and can be triggered e.g. by pressing a "button". Then you could use either a Morph or a Push to reconfigure any other MEC supported instrument. |
theres not a lot of 'general interaction' at the moment, as you'll see, really its setup to be 'loaded' and forgotten... setting the json vars is one thing, but currently they are only read at 'init' time. also, currently the mapping for the soundplane is all done in the the soundplane layer, and is closely associated with the touch tracker. (this mapping provides many of the things you are putting in your layout files) , I guess, I could make it just return an x/y/z, then doing the mapping using layout, but not sure it buys me much... but i guess if the codes there, no harm either :) one thing, I'm a bit wary of, if the mapping is very complex, this could start having performance implications... also there is a question about where 'surface mapping' stops and mapping in the the 'sound engine' starts. (e.g. ranges) personally, Id start with something simple, and then start to evolve it, as you find out how you want to use it. note: Ive still yet to work out what Im going to do with MEC/HEELP/EigenD in 2017, theres obviously pros/cons for them all, and Ive only limited time to work with them, so Im going to have to prioritise. |
ok, understood. Will try to build the Morph code in a way that it can later on be reconfigured by rereading the preferences but will implement the actual mechanism in a second step. My main goal is actually to have support for the "Continuano layout" which already needs quite a number of tricks (like irregular sized cells, diatonic, chromatic and no pitch rounding etc. The other things like 4th-grid (Linnstrument-like) or just xyz-plane (Continuum-like) would just be by-products. But perhaps I could start with a hardcoded xyz-plane to test out grounds - that would be easier for sure. Regarding uncertainties: Yeah, many options :) |
Ok, tried the win64testing branch on a real Win10 machine, am unhappy to report that EigenD just crashes as soon as I try to load a Pico setup (e.g. the standard setup). This happens no matter whether I have the UsbDk driver installed or uninstalled. Edit: Have been using this usb´dk driver: v1.00-15, x64 |
dont try eigenD (there may be other issues!?), try pezload and picodump... these dont crash for me. |
looks good on first sight: d:\dev\git\EigenD\tmp\bin>pezload log:pic::usbdevice_t::impl_t::open_usb_device: trying device 8087.0024.0002.0001 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 044f.b10a.0004.0004 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 044f.b10a.0005.0004 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 0424.3fc7.0006.0005 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 2139.0001.0007.0005 log:pic::usbdevice_t::impl_t::open_usb_device: found device 2139.0001.0007.0005 log:usbdevice opened low speed d:\dev\git\EigenD\tmp\bin>picodump log:pic::usbdevice_t::impl_t::open_usb_device: trying device 8087.0024.0002.0001 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 044f.b10a.0004.0004 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 044f.b10a.0005.0004 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 0424.3fc7.0006.0005 log:pic::usbdevice_t::impl_t::open_usb_device: trying device 2139.0101.0007.0005 log:pic::usbdevice_t::impl_t::open_usb_device: found device 2139.0101.0007.0005 log:usbdevice opened low speed I also get changing key values when wiggling the keys on the Pico. Perhaps the VM is messing too much with the timing? |
ok, thats promising takes me back to where I was (and what I said on G+ a while back) , I really need to get a real windows machine to take this further.... so I can fix the remaining issues, and get a 64 build going. |
I can recommend the Surface 4 Pro or the new Dell XPS 15 (not listed yet, one of the last machines with exchangeable battery - would buy that if I were in the market for a new notebook) or the Dell XPS 13 2in1/normal. But those would probably only make sense if you see utility besides EigenD compiling/testing for them price-wise :)
edit: well, and then there would be Bootcamp. Don't have experience with this, but I know a number of Sonar users are using it on their Macs and are happy with the results. |
@NothanUmber , Ive moved your comments re BBB/Bela to a new 'issue' |
Ive added comments to docs/todo.md basically for windows, there are 2 stages step 2 other things I need to check are locations of resource files, I think should be ok, just needs testing. |
Trying to compile MEC for Windows. Tried to set SP_LIBUSB_DIR as environment variable.
Now if I execute "echo %SP_LIBUSB_DIR%" I get: "D:/dev/libusb"
E.g. core.c resides under D:/dev/libusb/libusb/core.c etc. as expected by CMakeLists.txt.
Occurrently cmake is not accepting it though, still getting "Did not find libusb". Where would SP_LIBUSB_DIR have to be set when not in the environment variables?
When temporarily hacking CMakeLists.txt directly then cmake succeeds. But the project still doesn't compile e.g. because it doesn't find a whole bunch of "config.h" files (would I have to compile the external libraries separately first?).
soundplanelite/MLDebug.h also seems to want to have Juce.
And min is misinterpreted for a macro (#define NOMINMAX or unsigned l = (std::min)(history_,(unsigned long)PIC_USB_FRAME_HISTORY); would have to be used).
Also a lot of compiler warning because of unknown pragmas in the soundplane code and errors in math.h/cmathh (probably because of incompatible macros).
The soundplane code seems to use the pthread library directly also (which isn't available on Windows).
So a Visual Studio build seems not so easy to get working.
Perhaps cygwin would be a more realistic route to get this to compile on Windows?
The text was updated successfully, but these errors were encountered: