PS-PurrSoftware Plugin Modules

So I develop primarily on mac, but for surge I have a linux and windows vm I can spin up on my box which i do occasionally. 95% of the time I rely on the pipelines to check and I generally “know” when I’m doing something OS specific. If you stick to the APIs in rack you are fine, generally. The first time you build another platform you will realize you missed something (like you refer to a uint64_t and don’t include stdint.h or some such) but rack is also pretty consistent in tooling on all the platforms. Just stick to the rack API and you are OK basically.

If your code is in a public github repo and has an open source license I’d be happy to pull it down and try it on a mac also.

Andrew has his own docker based (I think) cross compiling build system I know for the whole shebang. As to why more folks don’t use the azure pipelines I’m not sure but I occasionally hop into a thread with a dev and point them to the experience i had. Incredibly useful.

3 Likes

My code is not on GitHub at all yet.

Understood. Well if it is and you want a volunteer to try a build on a mac, and it’s not the week or so between christmas and New Years, tag me here and I’m happy to give it a whirl for you.

1 Like

Likewise for linux.

2 Likes

It is time that I create a GitHub repository. If I create the repository as private, can I change it to public once I get it working right? I’m setting it up under GPL 3. I’m assuming that is the best license for open source and non-commercial?

1 Like

Yes, you can start as private and make it public later without any effort.

As for licensing I’d go with GPLv3. Some really good read on this topic, first post, last third:

2 Likes

Yeah GPL3 is a good choice if you want to ensure that it is open source and the source is only in other open source projects. (If your code is GPL3 and included in another bit of software, there’s no particular requirement those projects can’t be commercial but they must be open source and GPL3, which de facto means that a free version will always be available).

And yeah you can swap from private to public. But the experience we had over in surge land was that claes (the original author of surge) dropped a not really working very well and definitely not finished version of surge 1.6 into a public github repo and let the community find many of the bugs.

The first version in the public repo didn’t compile on mac, didn’t compile on linux, and had lots of things that needed fixing. This is not a criticism - he was super open about the fact that it was a half finished version 1.6, and the core of the synth was fantastic on day 1. My point is more that having the unfinished code available to the community may be something you want to consider.

Although of course you should choose the development lifecycle and code disclosure that works for you. I’m not trying to bias you one way or another, just sharing my experience!

2 Likes

Well, that was easy. I set up my GitHub private repository, cloned/downloaded, built it and it works! I need to get a little more familiar with GitHub before I make this public.

Thanks for your advice.

4 Likes

I can build for Linux too whenever the code goes online/public, would love to test it. :slight_smile:

2 Likes

Okay, Meander is public on GitHub at https://github.com/knchaffin/Meander

I build on Win10. It will be interesting to see if it builds on MacOS and linux.

This is still a work in progress and is not ready for prime time yet. I need to write a manual page soon.

As a reminder, Meander for Rack is a sequencer, not a DSP audio module.

5 Likes

Linux:

src/Meander.cpp:331:16: error: declaration of ‘HarmonyParms MeanderState::HarmonyParms’ [-fpermissive]
  HarmonyParms  HarmonyParms;
                ^~~~~~~~~~~~
src/Meander.cpp:252:8: error: changes meaning of ‘HarmonyParms’ from ‘struct HarmonyParms’ [-fpermissive]
 struct HarmonyParms
        ^~~~~~~~~~~~
src/Meander.cpp:332:14: error: declaration of ‘MelodyParms MeanderState::MelodyParms’ [-fpermissive]
  MelodyParms MelodyParms;
              ^~~~~~~~~~~
src/Meander.cpp:274:8: error: changes meaning of ‘MelodyParms’ from ‘struct MelodyParms’ [-fpermissive]
 struct MelodyParms  
        ^~~~~~~~~~~
src/Meander.cpp:333:12: error: declaration of ‘BassParms MeanderState::BassParms’ [-fpermissive]
  BassParms BassParms;
            ^~~~~~~~~
src/Meander.cpp:319:8: error: changes meaning of ‘BassParms’ from ‘struct BassParms’ [-fpermissive]
 struct BassParms
        ^~~~~~~~~
src/Meander.cpp:334:11: error: declaration of ‘ArpParms MeanderState::ArpParms’ [-fpermissive]
  ArpParms ArpParms;
           ^~~~~~~~
src/Meander.cpp:302:8: error: changes meaning of ‘ArpParms’ from ‘struct ArpParms’ [-fpermissive]
 struct ArpParms
        ^~~~~~~~

Builds and loads on mac no problem

A few warnings but they all look totally innocuous to me.

src/Meander.cpp:25:9: warning: 'DEBUG' macro redefined [-Wmacro-redefined]
#define DEBUG(format, ...) // DEBUG(format, ...)
        ^
/Users/paul/dev/VCVRack/V1.0//Source/Rack/include/logger.hpp:12:9: note: previous definition is here
#define DEBUG(format, ...) rack::logger::log(rack::logger::DEBUG_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__)
        ^
src/Meander.cpp:1953:10: warning: unused variable 'current_cpu_time_double' [-Wunused-variable]
                double current_cpu_time_double= (double)(current_cpu_t) / (double)CLOCKS_PER_SEC;
                       ^
src/Meander.cpp:2788:10: warning: unused variable 'systime' [-Wunused-variable]
                time_t systime=time(NULL);
                       ^
In file included from src/Meander.cpp:15:
src/Common-Noise.hpp:567:13: warning: unused function 'normalize3' [-Wunused-function]
static void normalize3(double v[3])
            ^
4 warnings generated.
1 Like

Wow, you are fast! Whew, this is a relief that it works on MacOS. I get those same warnings on my build. I need to fix them anyway. The DEBUG redefinition is what I use to cause all DEBUG() calls to be “commented out” and not compile.

Thanks for testing:)

1 Like

Looks like at least one of my fonts is not working.

1 Like

How many fonts does one need?

I got it to trigger OSCes and stuff though.

[3.792 warn src/window.cpp:36] Failed to load font /Users/paul/Documents/Rack/plugins-v1/PS-PurrSoftware/res/fonts/DejaVuSansMono.ttf

shows up in my log. And that font is indeed not in res.

Yeah looks like it is just missing

paul:~/dev/VCVRack/plugin-source/Meander$ grep -r Deja src
src/Meander.cpp:			textfont = APP->window->loadFont(asset::plugin(pluginInstance, "res/fonts/DejaVuSansMono.ttf"));
paul:~/dev/VCVRack/plugin-source/Meander$ ls -al res/
total 3416
drwxr-xr-x+ 11 paul  staff     352 Dec  8 12:03 .
drwxr-xr-x+ 13 paul  staff     416 Dec  8 12:03 ..
-rw-r--r--+  1 paul  staff   37832 Dec  8 12:03 EurostileBold.ttf
-rw-r--r--+  1 paul  staff  830004 Dec  8 12:03 LEDCalculator.ttf
-rw-r--r--+  1 paul  staff  595082 Dec  8 12:03 Meander.svg
-rw-r--r--+  1 paul  staff   71288 Dec  8 12:03 MusiSync2.ttf
-rw-r--r--+  1 paul  staff   44988 Dec  8 12:03 MusiSync3.ttf
-rw-r--r--+  1 paul  staff   53380 Dec  8 12:03 Musisync-KVLZ.ttf
-rw-r--r--+  1 paul  staff   77604 Dec  8 12:03 Musisync-qYy6.ttf
-rw-r--r--+  1 paul  staff   16624 Dec  8 12:03 Segment7Standard.ttf
-rw-r--r--+  1 paul  staff    2489 Dec  8 12:03 musisync-guide-06dd.htm

I just now committed /res/DejaVuSansMono.ttf to the repository. Sorry about that.

8 :slight_smile: Some will be removed eventually.

1 Like

I never noticed that I had the struct name and the object name the same. I guess your linux compile does a more stringent check than my Windows compile.

I will fix this. Should be an easy fix.

Thanks