Old 01-18-2015, 05:33 AM   #81
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default v20150118

I have just updated JS mono_synth & libs to v20150118.

Change:
  • colored_noise: Added LP/BP/HP filter.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 02-08-2015, 05:22 AM   #82
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default v20150208

I have updated JS mono_synth & libs to v20150208, and renamed it to Tale's JSFX Pack, see:
https://forum.cockos.com/showthread.php?t=155064

Changes:
  • drum_synth: Added simple drum synth (GM compatible, although incomplete).
  • wavetable_synth: Added paraphonic wavetable synth (work in progress).
  • Improved NSIS installer (added sections, formatted license/changelog).
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 02-08-2015, 05:40 AM   #83
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Your mono/poly synth already have a LP filter...
mine still do not have one.
I think that's why the CPU overhead is different.
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 10-13-2017, 05:53 PM   #84
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

Hey Tale, I just tried implementing PolyBLEP saw and it's dull at low frequency, used this code as reference: https://nbviewer.jupyter.org/github/...Polyblep.ipynb

Tried your mono synth and it works exactly as I would want an oscillator to work: sawtooth is sharp at low freuquency and approaches sine at high frequency and drops to 0 amplitude as you approach nyquist. How did you do that?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 10-13-2017, 09:50 PM   #85
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

Two problems I noticed: modulating pulse width too fast will cause clicks, why is that?

Other problem is that PWM causes square to suffer from DC offset.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 10-14-2017, 04:00 AM   #86
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

Quote:
Originally Posted by Argitoth View Post
Tried your mono synth and it works exactly as I would want an oscillator to work: sawtooth is sharp at low freuquency and approaches sine at high frequency and drops to 0 amplitude as you approach nyquist. How did you do that?
Well, the saw I use in mono_synth comes from my poly_blep.jsfx-inc library, so you can reuse it like this:

Code:
@init
osc.poly_setf(220);

@sample
spl0 = osc.poly_saw() * 0.25;
If you want to know how it works, then just have a look inside poly_blep.jsfx-inc.

Quote:
Originally Posted by Argitoth View Post
Two problems I noticed: modulating pulse width too fast will cause clicks, why is that?
How are you modulating the pulse width? Because if you do this at audio rate, then there should be no clicks:

Code:
desc:Simple PWM oscillator
slider1:1.0<0.01,20.0,0.01>LFO Rate (Hz)
slider2:220<20,20000,1>Osc Freq (Hz)

import Tale/lfo.jsfx-inc
import Tale/poly_blep.jsfx-inc

@slider

lfo.lfo_setf(slider1);
rect.poly_setf(slider2);

@sample

pwm = (lfo.lfo_para() + 1) * 0.5;
rect.poly_setpw(0.1 + 0.8 * pwm);

spl0 = spl1 = rect.poly_rect() * 0.25;
Quote:
Originally Posted by Argitoth View Post
Other problem is that PWM causes square to suffer from DC offset.
A pulse with a non-50% pulse width has a DC offset, but you can easily compensate.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 10-14-2017, 06:36 PM   #87
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

Quote:
Originally Posted by Tale View Post
A pulse with a non-50% pulse width has a DC offset, but you can easily compensate.
Are you speaking in general terms of naive rect or polyBLEP?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 10-15-2017, 01:56 AM   #88
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

Quote:
Originally Posted by Argitoth View Post
Are you speaking in general terms of naive rect or polyBLEP?
I mean the naive rectangle. Note that the DC offset doesn't matter to the polyBLEP, and that the polyBLEP itself doesn't include or cause any DC offset.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 10-15-2017, 11:33 AM   #89
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

I love the PolyBLEP sound, I think it is the perfect digital oscillator. It would only be more perfect if you modelled it with additive synthesis. The usual perfect sawtooths made with additive synthesis is incorrect, IMO, because of the gibbs. Gibbs create unnecessarily high frequency tones that are not musically useful. If you simply "filter" your fourier series with the right curve you will get an improved shape that is similar to PolyBLEP, but an even clearer sound.

Question: If PolyBLEP curvature occurs before and after a discontinuity, how can you do sync? You'd have to predict a few samples in advanced when a sync would happen. That doesn't seem possible.

Or what if PolyBLEP curve happens after discontinuity? Everything would be easier perhaps.

edit: What is blamp?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 10-15-2017 at 12:26 PM.
Argitoth is offline   Reply With Quote
Old 10-15-2017, 12:51 PM   #90
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

Quote:
Originally Posted by Argitoth View Post
Question: If PolyBLEP curvature occurs before and after a discontinuity, how can you do sync? You'd have to predict a few samples in advanced when a sync would happen. That doesn't seem possible.
If you delay your signal a few samples, then it is possible. You could even do this for more or less arbitrary waveforms (assuming they have discontinuities that can be corrected using a polyBLEP), but then you would have to guesstimate the exact time at which the discontinuity occurred, which is probably not so easy.

Quote:
Originally Posted by Argitoth View Post
edit: What is blamp?
A BLEP is used to correct e.g. a sawtooth or a square wave, while a BLAMP is used to correct e.g. a triangle.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 10-15-2017, 12:55 PM   #91
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

what does BLAMP stand for?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 10-15-2017, 02:00 PM   #92
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

Quote:
Originally Posted by Argitoth View Post
what does BLAMP stand for?
BLEP = BandLimited stEP
BLAMP = BandLimited rAMP
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 10-15-2017, 02:46 PM   #93
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

PolyBLEP mimics an FIR filter, right? Because you have pre-post "ringing" on the discontinuity, well, not ringing, but a nice curve.

If you applied PolyBLEP curve *after* the discontinuity, you'd mimic an IIR filter.

Why not do an IIR style waveshape?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 10-15-2017, 11:30 PM   #94
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

Quote:
Originally Posted by Argitoth View Post
Why not do an IIR style waveshape?
Well, here is one way to create a BLEP: Filter a naive waveform, then subtract the unfiltered naive waveform; the difference is your BLEP. If your filter isn't linear phase (most IIRs are not), then subtracting the unfiltered naive waveform will mess things up, because the waveforms won't align. This means you will likely need more then just 2 samples. Also, you would need a really steep IR for somewhat reasonable results.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 10-15-2017, 11:51 PM   #95
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

Would you use a 2 sample delay to BLEP any signal with 1 sample discontinuities?

Would you... just make the entire synth a 2-sample-delay synth?

I have some arbitrary waves to anti-alias, all of which have 1-sample discontinuities, triangle and square edges. So you could detect a discontinuity by simpling doing.

if (abs(sampleA - sampleB) > someFactor) applyBLEP(sampleA, sampleB, dt);

or something.

That's how you would do hard sync?

Instead of having all these individual wave BLEP functions, why not just do everything like this? Take care of all possible discontinuities in one smack.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 10-15-2017 at 11:58 PM.
Argitoth is offline   Reply With Quote
Old 10-16-2017, 02:09 AM   #96
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

I am hardly an expert on all this, so here are some pointers:

Rounding corners with BLAMP:
http://dafx16.vutbr.cz/dafxpapers/18...aper_33-PN.pdf

Modulating (poly)BLEP hard-sync saw:
https://www.kvraudio.com/forum/viewtopic.php?p=5944009

I hope that helps.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 02-12-2019, 05:04 AM   #97
dub3000
Human being with feelings
 
dub3000's Avatar
 
Join Date: Mar 2008
Location: Sydney, Australia
Posts: 3,831
Default

Quote:
Originally Posted by Argitoth View Post
Would you use a 2 sample delay to BLEP any signal with 1 sample discontinuities?

Would you... just make the entire synth a 2-sample-delay synth?

I have some arbitrary waves to anti-alias, all of which have 1-sample discontinuities, triangle and square edges. So you could detect a discontinuity by simpling doing.

if (abs(sampleA - sampleB) > someFactor) applyBLEP(sampleA, sampleB, dt);

or something.

That's how you would do hard sync?

Instead of having all these individual wave BLEP functions, why not just do everything like this? Take care of all possible discontinuities in one smack.
I know this is an ancient thread, but I was struggling with this a bit recently - the polyblep magic depends on knowing exactly *where* in-between the two samples the discontinuity actually occurs, so that approach isn't practical.

For something like a naive square wave, it's easy - discontinuity is at transition points i.e. phase = 0 and pi. Things get very gnarly with more complex waves though.
dub3000 is offline   Reply With Quote
Old 02-13-2019, 03:43 AM   #98
beerzel
Human being with feelings
 
beerzel's Avatar
 
Join Date: Jul 2018
Posts: 9
Default Simple mono/poly synth features request

Hello Tale

I love your concept, because I need a synth that is clean-pure digital, that doesn't try to emulate an analog one with modeling, keeps the simple GUI and isn't CPU hungry.

Would it be possible to add these features to a second version of your simple mono/poly synth?

- second oscilator with tuning (for sub or for fine detune)
- the LP filter should react to the main ADSR with an amount control, like on the Roland Juno-6, no need for me to have a seperate ADSR
- keytrack follower slider for the LP filter

And I have a question about working on 96kHz Sample rate:
Does it use the higher samplerate in the processing?


Cheers Beerzel
__________________
www.michaelbeermusic.com
beerzel is offline   Reply With Quote
Old 02-14-2019, 02:46 AM   #99
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

Quote:
Originally Posted by beerzel View Post
I love your concept, because I need a synth that is clean-pure digital, that doesn't try to emulate an analog one with modeling, keeps the simple GUI and isn't CPU hungry.
Thanks! Well, it is pure digital, but not entirely clean (there is some aliasing). Also, JSFX is not as CPU efficient as C/C++ (i.e. VST/AU), but nowadays it is pretty decent.

Quote:
Originally Posted by beerzel View Post
Would it be possible to add these features to a second version of your simple mono/poly synth?

- second oscilator with tuning (for sub or for fine detune)
- the LP filter should react to the main ADSR with an amount control, like on the Roland Juno-6, no need for me to have a seperate ADSR
- keytrack follower slider for the LP filter
It would be possible, but I'm not sure I'm up to it ATM... But I will think about it.

Quote:
Originally Posted by beerzel View Post
And I have a question about working on 96kHz Sample rate:
Does it use the higher samplerate in the processing?
It doesn't use oversampling, if that's what you mean.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 02-15-2019, 12:09 PM   #100
beerzel
Human being with feelings
 
beerzel's Avatar
 
Join Date: Jul 2018
Posts: 9
Default

I mean if I work at 96khz, do I get a higher resolution, like for example with ReaEQ?

I noticed that the CPU efficency wasn't great when I tried ReaRack - ModularSynth. The possibilities are so amazing and the oscillators are so cool. So I tried to do a polyphonic 8-voice synth combination but it used just way to much CPU, because it needed then 8 oscillator, envelope and filter modules.

So then I found your JSFX Pack which is better suited for my digital polyphonic synth research.

Before I even got to all these JSFX, I just created a polyphonic 8-voice synth with ReaSynth and ReaEQ.
The trick was to use for each voice a ReaSynth for the oscillator, ReaEQ for LP Filter and then another ReaSynth (set to a squarewave) that is sent via parameter modulation to the filter cutoff frequency of ReaEQ. This gives a very musical ADSR and it is possible to tweak then each voice at the same time via midi controller.
I also used Robert Randolphs Keytrack generator and Malcom Smiths Poly Splitter (changed release to 5s to match the release of ReaSynth) for the midi routing.

I have attached the project here, with the additional JS Plugins.

It works really well and is very CPU efficient! But...the only problem is that ReaSynth has no option for a monophonic oscillator...so when you increase the release time, it creates a mess :-(
Attached Files
File Type: zip REASYNTH POLY 8 v01.zip (16.0 KB, 16 views)
__________________
www.michaelbeermusic.com
beerzel is offline   Reply With Quote
Old 02-16-2019, 01:43 AM   #101
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 275
Default

@beerzel
Did you try this one?
https://www.kvraudio.com/product/mod...l-bucket-music
Ivannn Bennnettt is offline   Reply With Quote
Old 02-19-2019, 01:18 AM   #102
beerzel
Human being with feelings
 
beerzel's Avatar
 
Join Date: Jul 2018
Posts: 9
Default

Thanx Ivannn

I didn't know that one. I tried it this weekend. Really cool...but what didn't work for me is:

- ModulAir can't produce a pure sine wave, the one that is selectable has already some harmonics in it (I also checked it with an analyzer)
- it crackles each time when you adjust a knob


Here some infos on my hardware:
I use Lynx AES16 with Aurora16 at home which is solid in latency and performance.
For my mobile rig I use a Sound Devices MixPre 10M, which is great in sound and flexibility, just the USB interface isn't the best at latency. The synth plugin I'm looking for has to perform well on this rig, which would be the proof of its lightness. So I always test the synth on this one.
All on Windows 7 32Bit (If it works, don't touch anything :-) )

For example Synth1 was almost the solution but it doesn't use the higher resolution of 96kHz, it cuts all off above ~22kHz, so it must be stuck internally at 44.1kHz
Phutura is also a good example for what I'm looking for, but it's buggy in Reaper (5.63) when you save presets and reload the session and you can't deactivate the filter which tames a little bit the highend at his highest setting.
Tunefish4 is the best in its performance, never crackels and has a really creative wavetable oscilator. I use it a lot. The only thing it can't do is a pure sine, saw square or pulse wave...

The best solution would be: ReaSynth with a monophonic option so you can create what you want, as in my example REASYNTH POLY 8

(...or Tale is going to be the hero ;-) )

(...or perhaps there is a plugin outhere that I didn't find yet, curious for suggestions)
__________________
www.michaelbeermusic.com
beerzel is offline   Reply With Quote
Old 02-19-2019, 01:46 AM   #103
Time Waster
Human being with feelings
 
Time Waster's Avatar
 
Join Date: Aug 2013
Location: Bowral, Australia
Posts: 868
Default

Quote:
Originally Posted by beerzel View Post

I noticed that the CPU efficency wasn't great when I tried ReaRack - ModularSynth. The possibilities are so amazing and the oscillators are so cool. So I tried to do a polyphonic 8-voice synth combination but it used just way to much CPU...
Which version of ReaRack were you using? I recently made some changes to the version 3 trapezoidal oscillator which should make it more efficient. I would also recommend using audio rather than MIDI CC for control signals between modules, if you weren't already, as audio uses significantly less CPU.
__________________
ReaRack JSFX Modular Synth - Mostly harmless: https://stash.reaper.fm/v/28403/ReaR...dularSynth.zip
The Wasters of Time: https://soundcloud.com/thewastersoftime
Time Waster is offline   Reply With Quote
Old 02-24-2019, 09:23 AM   #104
beerzel
Human being with feelings
 
beerzel's Avatar
 
Join Date: Jul 2018
Posts: 9
Default

Hey Time Waster, I don't think you do :-)

I tried your ReaRack3 Beta, better performance with audio for control signals. But unfortunately still to CPU hungry when used with 8-voices. Perhaps there is a way to make the envelope ,oscillator and filter module polyphonic to save CPU?

The oscillator sounds really great I love it!
__________________
www.michaelbeermusic.com
beerzel is offline   Reply With Quote
Old 02-24-2019, 06:57 PM   #105
Time Waster
Human being with feelings
 
Time Waster's Avatar
 
Join Date: Aug 2013
Location: Bowral, Australia
Posts: 868
Default

Quote:
Originally Posted by beerzel View Post
Hey Time Waster, I don't think you do :-)
Depends who you ask :-)

Quote:
Originally Posted by beerzel View Post
I tried your ReaRack3 Beta, better performance with audio for control signals. But unfortunately still to CPU hungry when used with 8-voices. Perhaps there is a way to make the envelope ,oscillator and filter module polyphonic to save CPU?
I tried this setup here (8 x oscillator, EG and filter + poly splitter). On a 3.5 GHz 6 core machine I get a peak of about 7% CPU usage.

It may be possible to get more efficiency by adding polyphony to the EG and Osc modules, but it is a bit of a redesign and is outside the current scope of this project (ReaRack). It is something to think about though. I suspect that true modularity and efficiency may be mutually exclusive, hence all in one synths.

Tale, apologies for the thread hijack.
__________________
ReaRack JSFX Modular Synth - Mostly harmless: https://stash.reaper.fm/v/28403/ReaR...dularSynth.zip
The Wasters of Time: https://soundcloud.com/thewastersoftime

Last edited by Time Waster; 02-24-2019 at 10:40 PM.
Time Waster is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.