Newbie Question on Gen and Windows build for Lich

Hi Everyone,
I have all the Lich (DIY) parts laid out ready to be built but the more worrying build problems concern the patch generation.

I decided to invest in Max as it seems the most intuitive (albeit a bit parallel with PD). While C++, Faust etc probably produce the fastest/optimised end code they have a bit of a learning curve. I have not touched C (C++) for years since last coding device drivers for SCSI tape machines! and I enjoy doing things in Delphi now even for real time projects.
I know Max has the Owl plugin and I fired that up (even before I have built the Lich) just to see how things work. Everything looked great until I got messages saying it could not connect to the online compiler. I exported a couple of patches (Gen .h /.cpp files) and eventually uploaded them to the online compiler ok. So having got to this stage I got interested in how to build build the Owl (program) compiler on my Windows 10 (x64) PC. Everything looked straight forward enough and I knew things may have been easier if I was on Linux but I forged ahead anyway with the Windows route. It looked like I could do things either natively or through Cygwin. I tried Cygwin and to cut a long story short - failed. So then I tried with the following Windows binaries. Noting the prerequisites I only needed the following:

  1. gcc-arm-none-eabi-10-2020-q4-major-win32.exe
  2. Git-2.31.1-64-bit.exe
  3. mingw-get-setup.exe (included Make and GCC)
  4. python-3.9.5-amd64

I could then git clone the Owl program and Emscripten (still not sure why I need this for generating web stuff?)
The problem came when I ran ‘make libs’ in that when running make from an msys window its says:

emcc: command not found
make[1]: *** [Build/web/ColourScreenPatch.o] Error 127
make: *** [libs] Error 2

I know emcc is there and I can run it through its own environment command prompt but I cannot see it from the MinGW msys windows when running make libs so I am at a loss as to how to get this working.

Any help would be great as I feel I am almost there.

Cheers
Richard

Hi Richard,

You should run “make libs” first, it would still give you the same error if emcc is not found, but it would generate static library for OWL libraries that you actually need. Then you should be able to build patches.

You don’t really need to use emscripten, it’s only necessary if you want to build web version of patches. And when you build patches, only static library is required - it gets built by “make libs” before web libs are built.

Btw, since you’re not new to writing code, I would suggest to take a closer look at Faust - it won’t give you as much pain as C++, but has a huge DSP library. It’s a functional language that describes dataflow, so conceptually it’s not that much different from PD or gen~ - except that you’ll be writing text instead of using UI.

Hi Antisvin
Many thanks for your reply.
I actually gave up with Windows and turned to my Macbook and HomeBrew!
I think the Owl program, Arm, Emcc, Gcc all installed ok and make libs ran fine.

When I run make GEN=Foo load what are the files FirmwareSender uploads via SysEx to the Lich?
Is it the Arm compiled .hpp file?

Cheers
Richard

Yes, this OWL patch , plus the source code exported from your gen~ patch. It gets linked to statically built OWL library. The result is an executable for ARM (Build/patch.bin) that gets encoded as SysEx MIDI data.

Just in case, it’s probably better to use the develop branch of OwlLibrary if you’re building manually.

I’d definitely have a look at faust as antisvin said, there are some wonderful learning resources produced by Romain Michon available (a videoed week long workshop which is great, a kadenze course with exercises, lots of written stuff). Crucially, the libraries are fantastic and really well documented so you will find yourself able to realise designs really quickly once you have the fundamentals down.