Search found 54 matches
- Wed Oct 18, 2023 12:47 pm
- Forum: Voltage Modular
- Topic: Spectral oscillator?
- Replies: 17
- Views: 28971
Re: Spectral oscillator?
A side note on CPU usage - generating partials using Chebyshev polynomials is somewhat cheaper than generating independent sine waves for each partial (plus I cheat a bit on the sine wave, using a good-enough approximation function) which enables Chebysynth to pump out 1280 simultaneous sine waves (...
- Wed Oct 18, 2023 12:37 pm
- Forum: Voltage Modular
- Topic: Spectral oscillator?
- Replies: 17
- Views: 28971
Re: Spectral oscillator?
Chebysynth is a polyphonic synth rather than a single harmonic oscillator, and might not fit the bill; however there is also Chebz , which took inspiration directly from Squinky Labs's excellent Chebyshev module for VCV, and which can also be demoed for free: chebz.png I don't have experience with t...
- Wed Oct 18, 2023 11:40 am
- Forum: Voltage Modular
- Topic: Spectral oscillator?
- Replies: 17
- Views: 28971
Re: Spectral oscillator?
Chebysynth may also be of interest here - a polyphonic MIDI synth with envelope-controlled modulation of 9 partials:
- Sun Aug 06, 2023 9:02 pm
- Forum: Module Designer
- Topic: Shared variables and volatile
- Replies: 22
- Views: 16472
Re: Shared variables and volatile
My basic attitude is that doubles passed between threads in VM are mostly like network packets representing individual bullets in an online multiplayer FPS: it doesn’t really matter if occasionally one gets dropped or arrives out of order. Besides the concern about transporter malfunctions causing t...
- Fri Jul 28, 2023 3:33 pm
- Forum: Module Designer
- Topic: Threading nightmares
- Replies: 48
- Views: 57784
Re: Threading nightmares
I didn't want to handle anything in the timer thread as it updates at too low a rate For audio processing, I agree. But do we need to be pushing updates into the UI any faster than once every 50ms? The way I'm picturing this is that, within a given module, there are at least three schedules running...
- Fri Jul 28, 2023 12:39 pm
- Forum: Module Designer
- Topic: Threading nightmares
- Replies: 48
- Views: 57784
Re: Threading nightmares
Is internalSetValue() ever called from ProcessSample()? This is the sort of case where I'd want to send a non-blocking signal that there was a new value from ProcessSample() and respond to that signal in a less time-critical thread. Since value is marked as volatile it can be set atomically, so one ...
- Thu Jul 27, 2023 10:46 am
- Forum: Module Designer
- Topic: Threading nightmares
- Replies: 48
- Views: 57784
Re: Threading nightmares
Yes, if you are accessing an unsynchronised collection both in ProcessSample() and in Notify(), you may well run into thread-safety issues. It's not necessarily a good idea to deal with these by synchronising the collection, since that involves placing locks around read/write access that might stall...
- Mon Jul 24, 2023 5:18 pm
- Forum: Module Designer
- Topic: Threading nightmares
- Replies: 48
- Views: 57784
Re: Threading nightmares
SetValue() on VoltageAudioJack is marked as native (GetValue() is not...)
- Mon Jul 24, 2023 5:11 pm
- Forum: Module Designer
- Topic: Threading nightmares
- Replies: 48
- Views: 57784
Re: Threading nightmares
One other thing I tend to do in ProcessSample() is grab all the values I'm going to use (samples from input jacks, smoothed knob values etc) at the start of processing and build up a "frame" that represents a snapshot of state for the duration of that sample - the sources for all the value...
- Mon Jul 24, 2023 2:01 pm
- Forum: Module Designer
- Topic: Threading nightmares
- Replies: 48
- Views: 57784
Re: Threading nightmares
It does make for a more complicated programming model, but the general rule is to treat all the UI components as a separate source of truth from the internal state of your processing engine: take advice from them about what's going on out there in user-land, and let them know when you want something...