preenfm Forum

PreenFM => preenfm2 and preenfm3 => Topic started by: Toltekradiation on February 18, 2023, 01:06:45 PM

Title: paraphonic effects
Post by: Toltekradiation on February 18, 2023, 01:06:45 PM
hi,
lately i did some research about the opportunity to add some fx to the pfm3,
the goal was to add some time domain fx in the timbre layer, instead of in the voices, to save cpu and allow some ram to be used.

So, with 2kb per timbre, interesting things can be done, like flangers, chorus, pitch shifter, frequency shifter...,
Even a delay can be done by dividing the sample rate by 4 : this give a 170ms lofi delay which may be quite usable with enough lowpass.

A small trick had to be done to do all of this, one must calculate the modulation matrix of the last played note, even after the note ended :
https://github.com/pvig/preenfm3/blob/fe19cdc612f00cf5129821376742faefc2a53d3f/firmware/Src/synth/Timbre.cpp#L775

Something different from the existing filters is the behaviour of the filter gain param : with these new effects, it work like a dry / wet, which is better suited for this kind of effects.

Some raw audio snippets :

flanger, various kind of chorus, then the double pitch shifter fx (like on the eventide h3000) :
http://sndup.net/g5mj

frequency shifter, then the crunchy delay, then the pitch shifter :
http://sndup.net/wqhj

Current effect list is :
Flanger, triphase chorus, dim d chorus, pitch shifter, harmonizer (double pitch shifter for large intervals), frequency shifter, widener (double pitch shifter suited for small intervals), lofi delay.


Further effects may be done, like oversampled filters, but for now i'm happy with this set  :)

Edit :
I forgot to add the fact that i found a memory optimisation in the reverb section : by halving the sample rate of the predelay, 8 kb of ram can be saved.
It's barely noticable as the reverb input diffuser wash a bit that part of the signal anyway.

(fw bin attached)

Edit 2 :
i talked about kilobyte above, when i should have say kilo-float which is 4 time more kilo bytes.
Title: Re: paraphonic effects
Post by: matrix12x on February 19, 2023, 02:14:27 AM
Nice!!! I'm going to check these out this weekend!
Title: Re: paraphonic effects
Post by: Toltekradiation on February 19, 2023, 09:57:05 AM
Something worth noting : as the new effects are outside the current effect list, those can be reached only with external CC 70.
Title: Re: paraphonic effects
Post by: Toltekradiation on February 19, 2023, 01:54:25 PM
better audio demo for the chorus (slightly ::) ):
http://sndup.net/ndbp

triphase chorus then dim chorus.

For the triphase chorus, it work best with a double lfo modulation, as on the solina chorus : one slow (freq 1~2), one faster (freq 4~6)

There is room for improvements, please let me know if you have any comment about it.
Title: Re: paraphonic effects
Post by: matrix12x on February 20, 2023, 02:17:04 PM
Something worth noting : as the new effects are outside the current effect list, those can be reached only with external CC 70.

I was just going to ask where they were. lol.
First I looked everywhere, then I decided to re-read the posts.
Title: Re: paraphonic effects
Post by: Toltekradiation on February 20, 2023, 08:29:43 PM
uh, sorry for that, i hope it works now as expected  ;D!
Title: Re: paraphonic effects
Post by: matrix12x on February 20, 2023, 10:12:35 PM
It worked great!!
My favorites were the flanges, the triphase chorus and the delay.
No real complaints. Great work!!

Title: Re: paraphonic effects
Post by: Toltekradiation on February 20, 2023, 10:50:52 PM
Great !
i'm finetuning the delay : lower frequencies tend to saturate too much when feedback dialed up, need some highpass.
Title: Re: paraphonic effects
Post by: matrix12x on February 21, 2023, 02:29:17 AM
Are you going to have the highpass proportional to the feedback value? (edit to fix autocorrect misspelling of highness as highness )
Title: Re: paraphonic effects
Post by: Toltekradiation on February 21, 2023, 07:26:37 AM
hmm, yes it may be the way to do it, i will try it.
Anyway, the cutting should be very low, like cutting below 100Hz or so.
Title: Re: paraphonic effects
Post by: Cluso on February 23, 2023, 10:17:04 PM
Hi Toltekradiation,

Pretty cool. I tried out your new additions. I especially like the widener and delay. The chorus and flanger are quite subtle. The diminished chorus has a nice tone to it. I am curious to see where this is going...

Cheers!
Title: Re: paraphonic effects
Post by: Toltekradiation on February 24, 2023, 09:25:09 PM
hi Cluso,
thanks for the appreciation !
Title: Re: paraphonic effects
Post by: Xavier on February 25, 2023, 09:31:58 PM
Toltekradiation strikes again  8)
That seems incredible  !!!

I'm not at home and cannot try this before 8 days at least :(

I don't understand where this new Fx list show up in the UI ? with the voice FX ?

What is the CPU impact of those FX for 1 timbre ?
I could wait to give a try a check but i'd love to know that :)
Title: Re: paraphonic effects
Post by: Toltekradiation on February 26, 2023, 11:42:55 AM
Hi Xavier,

these fx can be found in the FILTER_TYPE list, so on the Filter page. (after unlocking access with CC70 = 54 for example)
the code is in Timbre.cpp, is starts here :
https://github.com/pvig/preenfm3/blob/532fcac3ccb117e609c812c4b0ef09173416787e/firmware/Src/synth/Timbre.cpp#L759

the bigger cpu impact is up to 5.6 % for the Harmonizer and the Widener algo (both are double pitch shifters),
the least is for the delay which is like 2%.

Attached file is  a fw iteration of this :
- delay has now some highpass in the feedback path (more feedback, more hp)
- the Bode fx sounds more like it should on pure sine (bug fix). It's also a bit less harsh when feedback : did put some lowpass in there.

About the Bode fx, the frequency shift may be up or down : for values above or below 0.5
Same behaviour for the pitch shifting algo : The pitch is one octave below for value 0.25, one octave above for val = 1.
Title: Re: paraphonic effects
Post by: Xavier on February 26, 2023, 07:00:35 PM
Thanks for the CPU details.
All that sounds very good.
Cannot wait to give a try when i'm back.
Title: Re: paraphonic effects
Post by: Toltekradiation on March 04, 2023, 11:55:53 AM
Still a work in progress...
I attached on the first post of this thread a new fw version, with 2 more fx :
- ping pong delay : very short one, but may be of some use
- Karplus Strong : 2 plucked voices on top of the instrument
 
Title: Re: paraphonic effects
Post by: ElVicente on March 06, 2023, 05:42:40 AM
Hi toltekradiation.

I did a quick test with the fx and they are really a great addition to the machine imo. Choruses and flanger are great once modulated with an lfo, but it obviously would be quicker that lfo was included already in the fx.
The widener sounds definitely great to my ears, I like less the harmoniser. I'll do more testing...

Did I read correctly that you could add some oversampling filter. Would that mean that it could lower the aliasing of the synth ? That would be awesome !

Title: Re: paraphonic effects
Post by: Toltekradiation on March 06, 2023, 08:07:00 AM
Hi ElVicente,

yes, oversampling is definitively doable, but i'm sure it would be so useful :
it would be good to make a very clean filter, but the aliasing already there is not easily removable.
however, i have to do some tests.

I agree about the harmonizer : as it does not use the scala tuning and not even regular tuning, it's difficult to have a usefull result, works best on drums  ;). I will try to change that.
I did tuned delay line with the pluck algorithm, it may be usable in the harmonizer.

About the chorus and flanger, i agree it is not ideal, but i'm not sure how to do it : one may like using multiple lfo and other modulation source.
Title: Re: paraphonic effects
Post by: ElVicente on March 09, 2023, 11:52:33 AM
Ah so the aliasing would have to be taken off at Oscillators levels I guess, (sorry I know very little about dsp!)
The aliasing in the filter don't bother me as much as the oscillator ones, especially when sliding those high notes...
So I was hoping it could got better with thoses oversampling ideas...  :P
Anyway, thanks for your work on these effects, they already open quite a bit new sonic possibillities!
Looking forward to what it becomes.
Title: Re: paraphonic effects
Post by: Toltekradiation on March 09, 2023, 09:37:35 PM
I wish there were a way to cure aliasing but i fear we must live with it.
The usual way to lower aliasing is by using the note scaling in the modulation matrix, with modulation index as destination.
For example, full modulation at C4 up to pure sine at C8 (only the carrier left, no more modulation).
Title: Re: paraphonic effects
Post by: Toltekradiation on April 23, 2023, 05:20:55 PM
Hi,
after some bugfix & enhancements, here is a quite mature version of these fx.
I removed the karplus strong fx, it was not so useful as an effect. Instead, there is a diffuser, to blur transients or add a light reverb "touch" to the sound.
There was improvements in some fx : the pitch shiters were simplified to lower cpu usage, it allowed to add some Eq ing in these to retrieve the lost bass, same for Bode filter.

@Xavier : pull request done in github.
Title: Re: paraphonic effects
Post by: matrix12x on April 24, 2023, 04:59:12 AM
@Toltekradiation thanks for the great work!! I'll probably install the update tomorrow. Did you add menu options for the new FX yet? or do we still use them via MIDI CC?
Title: Re: paraphonic effects
Post by: Toltekradiation on April 24, 2023, 07:10:42 AM
yes, the menu option is unlocked, no need for CC access.
Title: Re: paraphonic effects
Post by: Xavier on April 27, 2023, 08:50:58 PM
Oh nice that's a PR against the rebased version :)

I'll seriously have a look at this after the vacations in 10 days i think.
Thanks a lot !
Title: Re: paraphonic effects
Post by: superfake on May 05, 2023, 09:25:34 PM
Hi Toltekradiation!
Thank you so much for the excellent work done!
I noticed that some delay effects (Delc, Ping, Diff) have a high -frequency whistle around 12 kHz, regardless of feedback, which complicates their use somewhat. Attached the screen.
The rest is wonderful effects. ))

Do you plan the effects of delay with longer time values, if possible? ::)
Title: Re: paraphonic effects
Post by: Toltekradiation on May 06, 2023, 12:04:38 PM
Hi superfake,

The delay fx could be done with a sample rate reduction trick, which is x4 factor, so yes, the 12khz noise is awaited..
I did put some lowpass to soften this, but it's far from perfect, let's say it's a feature and call it vintage delay ^^
Though i will try some notch filtering to minimize the noise.

about the delay length, there is not so much ram left... better keep it for other features.
Title: Re: paraphonic effects
Post by: Toltekradiation on May 07, 2023, 01:47:23 PM
Hello @superfake,
thank you for your detailled report, i previously did not use spectrum analysers, only my ears, which has now some hf loss i fear.
So here is a version with more lp + notch filtering around 12khz on those fx, i hope it will make it usable, though it remains some aliasing.
Please, let me know if that's ok for you.

While i was at it, i added an optimisation i found lately on all the pitch shifter fx, which save quite some precious cycles !
Title: Re: paraphonic effects
Post by: superfake on May 12, 2023, 01:15:05 AM
Hello @toltekradiation
Wow! This is incredible! Now it works perfect for me. ))
Thank you for these effects now Preenfm3 has become much more self-sufficient. ))
Title: Re: paraphonic effects
Post by: Xavier on May 12, 2023, 09:19:47 AM

Any git commit i can cherry pick ?  :)
I really have to merge that in master i know
The biggest work is done with the last rebase. I'll do that in the coming days.
Title: Re: paraphonic effects
Post by: Toltekradiation on May 12, 2023, 05:43:26 PM
Sure, here is the commit :
https://github.com/pvig/preenfm3/commit/dbab9d26872e675900df2eb76705185d585e0cde
Title: Re: paraphonic effects
Post by: Xavier on May 12, 2023, 10:34:58 PM

Thanks  :)
I merged it
Title: Re: paraphonic effects
Post by: Xavier on May 13, 2023, 12:48:41 PM
I made some changes to have the new paraphonic effects in a separated menu slot. They deserve that, great job Toltekradiation ;)
So that we can have voice effect and timbre effect and reverb all at the same time.
New FXs also have their own matrix targets.

I think it works, didn't make much tests though.
I'll continue testing a bit later.
I attached the 0.999b firmware bellow with this modificaiton + the latest optimization/fix by Toltekradiation.

I noticed a noise/click when browsing the FX2>Type effect. When i arrive on "Diff"  coming from "Off".
Anything we could do ? Some variable to set when we switch FX ?

Patrice can you please take a look please at the PR ?
https://github.com/Ixox/preenfm3/pull/40
I merged all the latest change in master. So this PR is against master.
Thanks  :)

I attached this firmware if someone wants to give try.
If you saved presets with new FX in the latest betas, those presets may fail.
Title: Re: paraphonic effects
Post by: Toltekradiation on May 13, 2023, 11:46:28 PM
Hi Xavier,
excellent addition !
it will be very useful to have both fx layer.

about the Diffuser click, i'm not sure what's happening, i need to do some tests,
but I'm currently on vacation so i can't do anything until next week.

I had a look at the PR : nothing to complain on my side.

can't wait to test that firmware !
Title: Re: paraphonic effects
Post by: superfake on May 14, 2023, 12:10:56 AM
Hello Xavier!
It's just incredible!  :o I only began to dream of how good it would be to have the effects of delay on a separate slot.
Thank you!

Indeed, presets saved in the old firmware do not work. But it’s good that you can first turn off the effects, save and then open the presets in a new firmware.


Toltekradiation, I apologize, hurried with the conclusion in the last message and did not test carefully.
Delc now works fine. But Ping and Diff still have a whistle around 12 kHz, it seems at the same level as in the previous firmware.  ::)
Title: Re: paraphonic effects
Post by: Toltekradiation on May 14, 2023, 10:27:47 AM
No problem, thanks for reporting.
i'll have a look at this issue next week.
Title: Re: paraphonic effects
Post by: Toltekradiation on May 22, 2023, 10:54:55 PM
I hopefully fixed the two issues :)
- fix for the aliasing in Ping & Diff fx : added extra filtering in those
- fix for the bad noise click when going to the Diff fx

Here is an attached fw file.

There is a pull request as well !
https://github.com/Ixox/preenfm3/pull/41
Title: Re: paraphonic effects
Post by: Xavier on May 23, 2023, 10:41:54 AM
There is a pull request as well !
https://github.com/Ixox/preenfm3/pull/41

Awesome, thanks a lot  !!  :)
I added a couple of question in the review.
Title: Re: paraphonic effects
Post by: superfake on May 23, 2023, 01:44:32 PM
I hopefully fixed the two issues :)
Oh yeah! Thank you!
Title: Re: paraphonic effects
Post by: t8p on May 27, 2023, 03:22:56 PM
Great work.
Being a happy PreenFM3 user for two weeks now and checking the recent development process via the github link above I‘d love t to test the latest firmware version with the refined parafonic effects.

Regards,
Tobias.
Title: Re: paraphonic effects
Post by: Toltekradiation on May 27, 2023, 07:05:38 PM
Hi Tobias,
thanks for the appreciation !
if you want to check the latest features, the p3_timefx_7.bin firmware some post above would do : latter work done is mainly code cleaning and optimisation, there is very few difference about sound, only slight changes on the diffuser fx .

Best regards
Patrice
Title: Re: paraphonic effects
Post by: Xavier on May 28, 2023, 08:36:58 PM

All Toltekradation fantastic work has been integrated in the all new 1.00 firmware.
https://ixox.fr/forum/index.php?topic=69696.msg76458#msg76458
Title: Re: paraphonic effects
Post by: t8p on May 28, 2023, 11:11:22 PM

All Toltekradation fantastic work has been integrated in the all new 1.00 firmware.
https://ixox.fr/forum/index.php?topic=69696.msg76458#msg76458

Great work
Title: Re: paraphonic effects
Post by: Toltekradiation on July 15, 2023, 10:22:33 AM
as seen in another thread https://ixox.fr/forum/index.php?topic=69989.0 (https://ixox.fr/forum/index.php?topic=69989.0), i did add two granular thingy, which i hope you will like.

So here is a version with various improvements :
- fine tuning of the grain fx
- some rework of the flanger
- better bass handling for the chorus
- various cpu & ram optimisation..
- much more delay & pingpong decay on maximum feedback
Title: Re: paraphonic effects
Post by: Toltekradiation on July 30, 2023, 08:45:05 AM
ok, no one complains so i PR !

https://github.com/Ixox/preenfm3/pull/43
Title: Re: paraphonic effects
Post by: superfake on July 30, 2023, 04:43:37 PM
I found a strange bug with saving envelopes in the preset.
I don't know if this bug was in the past firmware, there is no time to check yet.  ::)

For example, if you change the envelope curves to Exp, then save the preset, turn off Preen, turn on and load this preset, then the envelopes sound like linear, although the value of Exp is shown. But if you switch the value back and forth, then everything returns to normal.
Moreover, the bug manifests itself if you turn off and turn on Preen. If you just restart the preset, the bug does not appear.

Correction: the bug is relevant for the sustain stage.
Title: Re: paraphonic effects
Post by: Toltekradiation on July 31, 2023, 09:31:33 AM
i'm far from my synths right now but will have a look at this in a week or so.
thanks for reporting.
Title: Re: paraphonic effects
Post by: Toltekradiation on August 08, 2023, 11:00:58 PM
i could reproduce the issue around the mixer loading : envelope curves were not reloaded properly.
I did a fix for this, you can test it with the attached fw.

Details of the modifications here :
https://github.com/pvig/preenfm3/commit/ddb5fac8d0b416bc3764925cc02b5dea884b4300

i'm not sure i made the best possible fix, maybe Xavier would find a better way...
Title: Re: paraphonic effects
Post by: Xavier on August 09, 2023, 09:35:55 AM

Hi,
A quick note.
Between my vacations and a following travel for my Job, i won't be at home before september.
I'll release then a firmware with the PR and bug fixes.
Thanks  :)
Title: Re: paraphonic effects
Post by: Toltekradiation on August 09, 2023, 10:50:19 AM
Hello Xavier,

i did another little fix, about refreshing display of the envelopes after mixer loading..

these two commit are in this PR :
https://github.com/Ixox/preenfm3/pull/44
Title: Re: paraphonic effects
Post by: UltraBlack on August 12, 2023, 04:08:16 PM
Taking the following from the other thread, because I think it fits here better:
Quote
I have just had another thought: Currently, the delay effect resides in the paraphonic FX section of each timbre. What about moving that into a global kind of effect, just like the reverb? You'd have much more memory available (six times the memory to be precise!), so the effect could sound for much longer, with less downsampling. I love the global reverb, but the delay is just too short, and too downsampled for my taste. The only thing I'd imagine using it for is slap-back delay, but that's just not what I love delay for.

I think I also understand, why the delay effect sounds so weak and barely noticeable. It only delays the tail of the sound, but the initial attack, which is what you want the delay effect for, is just never present.
Title: Re: paraphonic effects
Post by: Toltekradiation on August 12, 2023, 08:24:07 PM
Sorry, i won't change the design now: i prefer fx embedded in patch,
the memory is also needed for all other time domain fx (pitch shift, etc..),

It is what it is, and one can always use external fx for particular needs ;)
Title: Re: paraphonic effects
Post by: UltraBlack on August 13, 2023, 12:08:10 AM
itiiswatitiis

I guess I'll be getting an FX pedal (or two ;))
Title: Re: paraphonic effects
Post by: superfake on August 17, 2023, 12:19:03 AM
It works great!
Thanks!  ))
Title: Re: paraphonic effects
Post by: Toltekradiation on October 10, 2023, 08:10:32 AM
Choruses and flanger are great once modulated with an lfo, but it obviously would be quicker that lfo was included already in the fx.

Hello,
@ElVicente, you were right, i finally went this way as it's much faster to use, and it suit better existing patches , which may already use their own lfos...
The Dim fx lost resonance for a Mid/Side parameter, as the aim of this fx was the Roland Dim D chorus anyway, not a flanger.
The Chor fx now has a Vibr parameter, which is a fast second lfo, to make it sound like the classic ensemble chorus of the 70's.

So, here is a firmware file if anyone want to check it out.

@Xavier, these mods are pushed to the current pull request as well.
Title: Re: paraphonic effects
Post by: matrix12x on October 11, 2023, 12:09:04 AM
@Toltekradiation nice work
Title: Re: paraphonic effects
Post by: Toltekradiation on October 11, 2023, 09:28:00 PM
Thanks you and greetings !

Sorry for people who already did some patching with the previous version, i dare to make some change now as these fx are still quite fresh ..
Title: Re: paraphonic effects
Post by: ElVicente on October 11, 2023, 09:48:54 PM
Thanks Toltekadiation!

This is looking great !
Title: Re: paraphonic effects
Post by: Xavier on October 13, 2023, 11:12:55 PM
@Xavier, these mods are pushed to the current pull request as well.

OK thanks a lot for continuously improving your effects !  :)
And thanks for the PR.

Yes I'll make a release with your latest patch. Very soon !
I should have more free time than the previous month.
Title: Re: paraphonic effects
Post by: Xavier on October 22, 2023, 11:57:18 AM
Hi Patrice,

I finally have a PR ready for all your changes.
I squash all your commit into a single one.
https://github.com/Ixox/preenfm3/pull/46
I hope i didn't mix up anything.
Can you take a look and also please summarize what this patch contains ?  gra1 and gra2 ? + other adjusment fix ?

I noticed some high volume noise when browsing the FX type and when i arrive on "Bode".
That happens from time to time.
Is there a solution to get rid of this ?

Thanks again for you work  :)
Title: Re: paraphonic effects
Post by: Toltekradiation on October 22, 2023, 01:52:28 PM
Hello Xavier,

great news !

i added a new commit on the initial PR, to tame the clicks on fx change, transition is now cleaner :
(https://github.com/Ixox/preenfm3/pull/43/commits/2be747d9122ad221bdbbf913b8194e82f7fdb50f (https://github.com/Ixox/preenfm3/pull/43/commits/2be747d9122ad221bdbbf913b8194e82f7fdb50f))

to resume the PR, i would list as this  :

Two new granular fx : gra1 (Size, Spread) & gra2 (Pitch, Spread), those go in loop mode when Spread param = 1
Flange, Chorus, Dim rework : now have their own lfo
Dim rework : param2 is now mid/side param, 0 = mono, 0.5 = regular stereo, 1 = expanded stereo
Chorus rework : param2 control the amount for a second faster lfo ("Vibr" for vibrato)
Envelope display bug fix : no init on mixer load
FILTER_CRUSHER bug fix : no init on fx change

 
I found a bug that i could not fix for now : Fx1 has wrong type in timbre1 on default mixer load, only on synth start, not in manual load.

 
Title: Re: paraphonic effects
Post by: Xavier on October 22, 2023, 03:19:04 PM
Thanks a lot for the quick fix for the smoother transition.  :)

I set FX1 in Instrument 1 and save as default mixer.
On preenfm3 start, i have FX1 correct type.

Do you have a step to reproduce ?
Title: Re: paraphonic effects
Post by: Toltekradiation on October 22, 2023, 06:09:50 PM
no i have no more step than save the default mixer, then power cycle.

I tried to start from Mixer/Default/Clear but no luck, after power cycle, Fx1 in Timbre1 is always Alkx.

i will try to dive a little bit more with the debugger to understand what's happening..