View Single Post
Old 04-16-2020, 06:47 AM   #262
Time Waster
Human being with feelings
 
Time Waster's Avatar
 
Join Date: Aug 2013
Location: Bowral, Australia
Posts: 1,638
Default

Hi Hermenator, thanks for your feedback. I'm not a mathematician, or a programmer for that matter, so any help is greatly appreciated.

The Chebyshev method you have used is a big improvement in efficiency, it almost makes this a viable oscillator for general use. If I may, I'll add this as a new version of the oscillator and add you in the credits.

Regarding the sweepmode section, IIRC what I'm attempting to do is to provide a method for cross fading the two highest harmonics, to provide a smooth frequency sweep if modulating the cutoff frequency. In addition, these harmonics can be boosted to provide a resonance effect. So, if I've coded it correctly, the loop section should only cover up to two harmonics below the cutoff frequency, with the last two harmonics calculated separately. The method I've used may not be the most efficient.

Regarding the triangular wave, good point. I'll need to look through the code a bit more to work out what I've done.

When I looked at the pulse wave DC offset, my code seemed to have zero offset, whereas yours didn't?? I replaced your last line with
Code:
    sample += (pw-$pi)/2;
and that fixed it.

I don't know how familiar you are with JSFX? Generally all MIDI is processed @block, regardless of whether it is sample accurate or not. There is no reason not to have sample accurate MIDI timing. The issue is more around the resolution used, in particular, for CC messages. Bearing in mind that I knew approximately nothing about MIDI when I began this project, ReaRack version 1 used a single CC message for modulation signals, which provides 7 bit resolution. 7 bit is pretty coarse and can be noticeably steppy. I was eventually convinced to implement 14 bit resolution using MSB/LSB paired CCs. This is certainly a lot smoother. The disadvantage is the amount of MIDI traffic, which can potentially spam your system.

Recently I tried a method for thinning out the MIDI data. The resolution can be reduced quite a lot without noticeable effect, so the idea would be to add a slider to allow the output resolution to be adjusted to suit. However, it adds yet another slider, and I'm not relishing the thought of going back through all of my modules to add it.

I haven't done any work on ReaRack3 recently. I've been trying to get a bit of actual music done I'm in a few minds about were to go with version 3. I've implemented using audio as a control signal and I'm also thinking about experimenting with using global memory as a third method, as there may be some advantages with simplifying setup. I've gotten a bit bogged down with developing the UI. It's a lot more work to code the graphics than the sound processing bits, but there are big advantages for simplifying the UI.

I have an idea for the ReaRack3 oscillator module, whereby it would become a multi oscillator module (up to 24). The oscillators will be able to be split into groups, making it polyphonic to varying degrees. This would necessitate having envelope generators built into the module, but I would retain the option of being able to use it as a stand alone oscillator. Overall, ReaRack3 is going in the direction of having fewer modules, but with more flexibility in each module. Is that less modular? I'm not sure.

Exchanging text files is fine, or upload to the stash if it's for general use, or there is ReaPack.
__________________
Mal, aka The Wasters of Time
Mal's JSFX: ReaRack2 Modular Synth
Time Waster is offline   Reply With Quote