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 Topic RSS sp_TopicIcon
Clock for Precise Measurements
Avatar
Frodson
Member
Members
September 23, 2015 - 6:30 pm
Member Since: September 7, 2015
Forum Posts: 45
sp_UserOfflineSmall Offline

Hi there,
I'm expiriencing a weird bug, where my CPU-usage seems to be ok most of the time, but peaks every half second or so, causing heavy clicking to the sound. I'm looking for a clock to measure timings within the plugin.
I came across QueryPerformanceCounter() from "windows.h", but using TRACE and debug-mode causes the CPU to overload anyway.
Is there a way to get the times while still running in real time?
Cheers, Frodson

Avatar
W Pirkle
Admin
September 23, 2015 - 8:14 pm
Member Since: January 29, 2017
Forum Posts: 573
sp_UserOfflineSmall Offline

For realtime profiling of code (to find bottlenecks or other timing issues), use GetTickCount( ). There is a thread about this here:

http://www.willpirkle.com/foru.....s-express/

The thread above describes writing the timing values to the RackAFX Status Window. But you could also write this out to a file instead, then examine the file after the run is completed.

I have not seen the CPU usage issue you describe in RackAFX, but I have seen it in Cubase when working with VST3s compiled in Debug mode in VS. This includes the NoteExpressionSynth VST3 sample that ships with the VST3 SDK.

- Will

Avatar
Frodson
Member
Members
September 23, 2015 - 10:35 pm
Member Since: September 7, 2015
Forum Posts: 45
sp_UserOfflineSmall Offline

THANK YOU! I didnt even know I compiled in debugging mode. After switching it off polyphony increased from 4 to 30 without any clicks :)

Avatar
W Pirkle
Admin
September 24, 2015 - 12:03 am
Member Since: January 29, 2017
Forum Posts: 573
sp_UserOfflineSmall Offline

Yeah, debug mode kills polyphony. For MiniSynth, I get 4 or 5 notes in debug mode, and 24 notes in the release version (this is true on all platforms, RAFX, VST3, and AU) on my current computer; newer/faster CPUs will give even more polyphony. The same applies to FX projects that are time intensive (like FFT-based processing).

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 51

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

jim: 34

JimmyM: 33

Gwen: 32

Member Stats:

Guest Posters: 1

Members: 696

Moderators: 1

Admins: 5

Forum Stats:

Groups: 13

Forums: 41

Topics: 757

Posts: 2894

Newest Members:

Jas, Rowan, sojourn, fabhenr, rg1, Niklas, Wutru, Tim Campbell, Danny Jonel, Valentin

Moderators: W Pirkle: 573

Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 573, VariableCook: 3