Author Topic: paraphonic effects  (Read 10870 times)

Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
paraphonic effects
« 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.
« Last Edit: April 23, 2023, 05:08:21 PM by Toltekradiation »

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: paraphonic effects
« Reply #1 on: February 19, 2023, 02:14:27 AM »
Nice!!! I'm going to check these out this weekend!

Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: paraphonic effects
« Reply #2 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.

Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: paraphonic effects
« Reply #3 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.

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: paraphonic effects
« Reply #4 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.

Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: paraphonic effects
« Reply #5 on: February 20, 2023, 08:29:43 PM »
uh, sorry for that, i hope it works now as expected  ;D!

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: paraphonic effects
« Reply #6 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!!


Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: paraphonic effects
« Reply #7 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.

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: paraphonic effects
« Reply #8 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 )
« Last Edit: February 21, 2023, 10:11:04 PM by matrix12x »

Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: paraphonic effects
« Reply #9 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.
« Last Edit: February 21, 2023, 07:35:04 AM by Toltekradiation »

Cluso

  • Team member
  • *
  • Posts: 9
    • View Profile
Re: paraphonic effects
« Reply #10 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!

Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: paraphonic effects
« Reply #11 on: February 24, 2023, 09:25:09 PM »
hi Cluso,
thanks for the appreciation !

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: paraphonic effects
« Reply #12 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 :)
« Last Edit: February 25, 2023, 09:38:35 PM by Xavier »

Toltekradiation

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: paraphonic effects
« Reply #13 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.
« Last Edit: March 04, 2023, 11:49:48 AM by Toltekradiation »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: paraphonic effects
« Reply #14 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.