Vember surge synth opensourced, builds and runs on Linux

I just uploaded a new install recipe for installing a pre-built version of Surge. It uses the binary shared by @lguyome45, the needed data from the Surge repo and the presets contributed by @Baggypants. Simply update from a recent Buster SD …

If something doesn’t work, you can call it from command line and see the output:

$ZYNTHIAN_RECIPE_DIR/install_surge_prebuilt.sh

Also, it will be included in the next green nightly build :wink:

Enjoy de new Engine!

P.S.: More presets would be fine … you can PR directly to the zynthian-surge.lv2 repo:

3 Likes

jofemodo, I try to add some file, github says uploads file are disabled.

surge preset.tar.gz (24.3 KB)

5 Likes

Yeah that’s exactly correct; if you use LV2 save and LV2 restore it will all work. It’s just if you use external python scripts to try and make the LV2 file you will miss the XML blob as an atom.

I just got all the ARM stuff merged to our main branch. Shortly later today we should have instructions to build on Pi from main with no awk scripts, changes, etc… at all. And you’ll get all the cool new 1.7.0 features too!

3 Likes

Oh also: It would be pretty easy to write a function to load each of the 1100 odd factory presets and save them as fully valid LV2 presets using the surge code. If you want to do that for this project hit me up on the surge GitHub and we can compare notes. There’s some really lovely presets in there, and we have some amazing new ones coming with 1.7.0 we hope!

4 Likes

Surge ARM build directly from the source repo now works, at least for me. Any feedback or updates welcome. Many thanks to falktx, hexdump and @Baggypants for their work helping me get this working.

4 Likes

Hi,
I compile the new surge directly on Zynthian and it works.
For 1.6, the data need to be copied to /usr/local/share/Surge now in /usr/share/Surge

Thank you very much for testing @lguyome45 - it is appreciated

The /usr/local/share is a change that hexdump had made outside our source tree and I just found out about yesterday actually! You can see our convo here: https://github.com/surge-synthesizer/surge/issues/2345#issuecomment-658159760

if /usr/local is really important for zynthian and the above approach doesn’t work, the code is easy to augment

I see the discussion and why he puts usr/local
jofemodo will define what is the better choice :slight_smile:

@baconpaul, do you know a preset that is CPU expensive to test if we get some xrun or not on the raspberry?

edit: need to be tested on a Zynthian installation without surge to be sure nothing is missing
the recipe:

#!/bin/bash
cd $ZYNTHIAN_PLUGINS_SRC_DIR
sudo apt-get install --no-install-recommends --yes build-essential libcairo2-dev libxkbcommon-x11-dev libxkbcommon-dev libxcb-cursor-dev libxcb-keysyms1-dev libxcb-util0-dev fonts-lato
git clone https://github.com/surge-synthesizer/surge.git
cd surge
git submodule update --init --recursive
cmake -Bbuild -DARM_NATIVE=native
cmake --build build --config Release --target Surge-LV2-Packaged
rsync -r --delete build/surge_products/Surge.lv2 "${ZYNTHIAN_PLUGINS_DIR}/lv2"
cd resources/data/
mkdir /usr/share/Surge
tar cf - . | ( cd /usr/share/Surge/; tar xf - )
cd ..

I actually don’t! The codebase dates back to 2005 so honestly I’ve never been able to get my MacBook above a few percent with any of the patches. I could hack the retests so they play each of them and see if it’s important.

My gut is “the FM2/3 oscillators will be more expensive” and “the sequences could be”. I’ll also ask our group if they have any stress test patches kicking around I don’t know about.

On your recipe: This looks correct to me for now. At some point very soon we will add a release/1.7.0 branch to the repo and you will probably want to check that out so that you don’t get the nightly moving forward. (We are at a very very stable spot right now as we prepare for the release; the nightly is not always quite as robust). I’ll make sure to update here when we do that.

Oh and if /usr/local/ is key it would be easy for me to add a -DSURGE_DATA_DIR=/usr/local to the cmake and use that in the linux if you want; would be non-interfering with our release too. Let me know.

Very happy to get all this stuff back into main. Thanks all for the help.

For moment, I try some preset and no problem happens.
Just with X forwarding with ssh -X, when I run the gui with jalv.gtk https://surge-synthesizer.github.io/lv2/surge I don’t have the text in the menu, I install the font, but nothing, not important, just easier to test the preset without converting in TTL

CPU.zip (117.4 KB)

There’s a (slightly modified) version of one of the upcoming factory presets which used about 45% of a single CPU on the current top of line MacBook pro when I played a 4 note chord. Good stress test.

OK! I had only tested the VST3 in reaper on aarch64 and the menus rendered fine. Lemme see if I can make jalv.gtk work on my pi.

I test on raspberry 4, 4go and with one note, 50% of cpu, 2 note pressed 80%, 3 note 100% of cpu with Xrun

1 Like

Yeah OK. It’s impressive you can even get one note out with that. These PI 4s are pretty fast machines.
But in that patch I purposefully turned on all the CPU hogging features.
Almost every patch in the library will be way way less than that

3 Likes

Just for the test with 4 notes, it runs :wink: I got more crappy sound on my speaker than in this record

3 Likes

Alright so when I start the lv2 with jalv.gtk I get menus. My distro (which is just 64 bit raspbian from May) must have a font you don’t.

Reading the vstgui source code (something I wish I had to do less often), I find that the menu paints with kSystemFont which is gSystemFont which on linux is apparently defined as “sans-serif”

I know VSTGUI has some bugs with font resolution in internationalized systems. Are you in LANG=en (I hate to ask that obvs but…)

What does ‘fc-match sans-serif’ and ‘fc-match Arial’ say for you on your system?

I install ttf-mscore-installer and got the text on the menu.
I can test all the preset without converting it first, thank you

1 Like

Hi @lguyome45

the recording is very loud and the crackling is sounding like digital distortion. Perhaps lowering the volume helps?

Currently I’ve no time to compile Surge binaries, but i would update the binary included in the current zynthian pre-built package if you share. Please, make a some testing before :wink:

Regarding the location of data, /usr/local/share is not a bad place and it’s preferred over /usr/share until we have a deb package. Anyway, it’s not really important.

Regards!

1 Like