Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Daw issues
No permission to create posts
July 11, 2017
8:25 pm
Avatar
Eddie
Member
Members
Forum Posts: 6
Member Since:
July 11, 2017
sp_UserOfflineSmall Offline

Hi

I have been Reading your books that are great, and doing examples for a couple of months. I don't think I will ever be DSP guru but your books did explain some things I'd been trying to work out for years.

Have a couple of problems:

The FX projects seem pretty good and I have managed to program my own Delays(with filters lfos and things), bitrushers, distortion etc with out any problems.

However, nearly all the synth projects just kill my CPU in all DAWS except Reaper. They seem pretty good in Reaper. The CPU starts low then hit a few notes and it rises and rises till it gets to about 100%.  All projects compiled as release in either VS2015 OR 2017 or XCODE 7 02 optimization setting.

I have a pretty good PC intel  4790k @ 4 ghz and a I7 mac mini  so PC is not an issue. Windows 10 & 7 64bit & Mac OSX 10.11 & 10.10

Daws I've tried cubase SX, Maschine 2, Ableton 8 & 9, Mac Ableton & LOGIC 10.

Tried changing buffers to use RACKFXbuffers no better , Tried VST buffers but not been able to work this out yet for a output only synth works ok for FX. Tried inlining as much as possible not much change.

I looked online and found that Odin synth that was created with Rackafx this seems ok CPU under 4% .  Maybe he can explain his secret!!

Also file size is around 10mb for a plugin that is a volume control . I've tied JUCE this has similar issues with files sizes but WDL-OL makes a similar plug in under 500k. Is this correct? Lastly, VST parameters is there a way to not show all the Joystick and midi etc parameters, if you view a plugin in a host GUI rather than custom GUI? Tried removing the various definitions in headers but they still appear. 

Any chance you could make a template that works as good in Ableton as Reaper? Now that would be great!!

Regards

M

July 12, 2017
12:50 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

However, nearly all the synth projects just kill my CPU in all DAWS except Reaper. They seem pretty good in Reaper. The CPU starts low then hit a few notes and it rises and rises till it gets to about 100%.  All projects compiled as release in either VS2015 OR 2017 or XCODE 7 02 optimization setting.

First, are you referring to the Synth projects from the Synth Book, or your own synth projects? The polyphony that I reported on the Synth Project Download page still holds true for me - Visual Studio, release mode, optimized to favor speed, not size. Cubase seems to have the worst polyphony, and Reaper the best. I get about 16-24 notes with MiniSynth, and about 32 with DXSynth. And, you can always test the "pure" VST and AU synths against RackAFX to see if there is a difference -- in my testing, I did not find any major differences there, but the SDKs have changed for both VST and AU since the book was published. 

One thing that changes from DAW to DAW has to do with running 0's through your plugin, even when no audio is streaming; this is the default operation in both Reaper and Ableton. For FX plugins, this creates a problem with underflow. Check the doBiQuad() function in the CBiQuad object in pluginconstants.h to see how I am checking for underflow. When underflow happens, you generate NaN (not a number) or DeN (denormalized number) data, which destroys your CPU processing and everything grinds to a halt with the CPU pegged at 100%. 

In the Synth Book code, you will see that in the filters, there are no underflow checks like in doBiQuad( )  - the reason is that when no note is playing, there is no data streaming through the filter, even if the DAW is trying to stream 0's through the plugin. However, you might want to check and see if you can catch an underflow problem, which would happen if the oscillator was running, but putting out a long stream of 0's -- this should not happen in any of the Synth Book projects, but in theory it could happen if you used some exotic oscillator (e.g. one-shot exponential).

One other inside note - when I did the Synth book I really had a difficult decision to make regarding the efficiency vs. ease of understanding. I've done synth plugins in much more efficient ways, but the code was extremely (crazy) tricky, including arrays of pointers to arrays of pointers, arrays of function pointers (function pointers are almost never taught in C++ courses), and pure-C synths with all data structures and no classes/objects. I remember looking at some of the C code for the Wavestation synths when I was at Korg - ridiculously complex, but also amazingly efficient! If I published code like that, not many people would be able to even understand the basic premise, much less how things like the virtual analog filters or BLEP oscillators are implemented in code. 

When I do a 2nd Edition of the Synth Book, I am going to do a fairly massive overhaul of those projects to greatly simplify them and make them more efficient, however it will also result in much more rigid architectures with reduced open-ended-ness. I think that in my zeal for the same kind of Open Architecture synths I've coded in the past, it created much less efficient code. 

Also file size is around 10mb for a plugin that is a volume control . I've tied JUCE this has similar issues with files sizes but WDL-OL makes a similar plug in under 500k. Is this correct? 

The reason the RAFX plugins are bloated like that has to do with the fact that they link to a static library (called Sock2VST3.._.lib) which contains all the code necessary to make them appear as a VST3 or VST2 plugin automatically - a sort of bonus feature for RAFX plugins. One of the things that bloats them out are the graphics files -- all of the ones you see in the GUI Designer are also included in that static lib file. Without linking to that library, the plugin size drops significantly, down to a few kBytes or so! One thing you can do is use the Make VST operation to port your project directly to a VST version. Then, in VS go into the .rc file (right click, choose View Code) and remove all the PNG lines you see for all the graphics you don't need, which will be most of them. For XCode you just delete the unused PNG graphics from the Resources tab. This will bring your plugin size back down to a tiny footprint after re-compiling.

Lastly, VST parameters is there a way to not show all the Joystick and midi etc parameters, if you view a plugin in a host GUI rather than custom GUI? Tried removing the various definitions in headers but they still appear. 

The VST parameter objects must be declared or else things like the GUI, user presets and automation won't work. The GUI in VST3 is especially bound tightly to the Parameter objects, as discussed in the thread-safety document I wrote; check the section on VST3 here:

http://willpirkle.com/Download.....essing.pdf

Unfortunately, there is still no way to create "hidden" parameter objects that won't show on the default GUI, though I will ping Steinberg again to see if this may be an option in the future (or there is some back-door way). Same is true with the proxy MIDI CC variables - unavoidable with the way VST3 now treats CCs. And I agree - it is a drag to deal with them on the default GUIs. If they do come up with an update that allows hiding these from the default GUI, I will post it on the Forum.

Any chance you could make a template that works as good in Ableton as Reaper? Now that would be great!!

I'm working on a new book, and a significant update to the RAFX API right now, but if you could refactor the Synth Book code and post it here, I'm sure you would have many fans! 

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
2 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143