Surge: If you don't set SampleRate you get that weird click pop wedge state reliably

Created on 8 Mar 2019  路  5Comments  路  Source: surge-synthesizer/surge

@sense-amr was cleaning up the many surges he had in bitwig 2.5 which causes all the surges to scan. When doing so it made an open surge which was otherwise unchanged peak out the VU, in the same way as his occasional stuck note problem but he hadn't pressed the surge. It just ghosted sound on.

How could this happen?

Well bitwig 2.5 has a comment in the release notes that process boundaries are by manufacturer now.

So if surge has DLL Globals rather than Instance Globals, and they get clobbered, you would see this.

This leads me to a speculative thought: Lets look at all the dll globals which control anything in surge and figure out why they aren't a member of the SurgeSynth or SurgeGUIEditor instance.

This is 'work' but I'm putting this here since it is an interesting thing Sense saw this morning and the speculation is too good to ignore.

Most helpful comment

nah those are just all the static symbols in the dll which aren't a vtable or in vstgui.

All 5 comments

paul:~/dev/music/surge$ nm -g target/vst2/Release/Surge.dylib | grep " S " | c++filt | grep -v vtable | grep -v VTT | grep -v typeinfo | grep -v VSTGUI
0000000000228720 S Surge::Error::DEFAULT_TITLE
000000000023e008 S Surge::Storage::defaultsFileContents
000000000023e020 S Surge::Storage::haveReadDefaultsFile
000000000023e028 S CAboutBox::infoFont
00000000001ae8e0 S TiXmlBase::utf8ByteTable
000000000023e030 S _bitmap_registry
000000000023e048 S _displayFont
000000000023dfe8 S _dsamplerate
000000000023dff0 S _dsamplerate_inv
000000000023dff8 S _dsamplerate_os
000000000023e000 S _dsamplerate_os_inv
000000000023e058 S _lfoTypeFont
000000000023e050 S _patchNameFont
000000000023dfe0 S _samplerate
000000000023dfe4 S _samplerate_inv
0000000000228740 S _sinctable
000000000022e7a0 S _sinctable1X
00000000002317d0 S _sinctableI16
00000000002327e0 S _table_dB
00000000002347e0 S _table_envrate_linear
0000000000233fe0 S _table_envrate_lpf
0000000000234fe0 S _table_note_omega
0000000000232fe0 S _table_pitch
00000000002337e0 S _table_pitch_inv
0000000000235fe0 S _waveshapers

ooh ! whats that ? debugger?

nah those are just all the static symbols in the dll which aren't a vtable or in vstgui.

OK yup this is it.

If I modify the AU such that it never calls plugin_instance->setSamplerate() then all you get is the clicks and pops which sound like the you know way the thing sometimes gets wedged.

So I don't know if it is all the click and popping but it is definitely the transient one where surge just doesn't make any noise.

So now: Why would the synth exist with no sample rate set? How does that happen in the code path? That's a separate question altogether.

OH and all those globals are set by .setSamplerate and the associated storage.init_tables()

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mortfell picture mortfell  路  8Comments

ContemporaryInsanity picture ContemporaryInsanity  路  4Comments

esaruoho picture esaruoho  路  10Comments

sense-amr picture sense-amr  路  4Comments

baconpaul picture baconpaul  路  6Comments