Author Topic: Pfm2 : unison discussion  (Read 37358 times)

matrix12x

  • Team Member
  • ***
  • Posts: 200
    • View Profile
Re: Pfm2 : unison discussion
« Reply #45 on: February 22, 2021, 04:05:55 AM »
@Xavier very cool. I really like the option of the +1 and -1 range like you implemented.

Would it be possible for you to set unison voices 2 and 3 to close to (but not exactly) 90 degrees and 45 degrees respectively before you finalize the OS? I've been playing in audacity with offsetting the phase of detuned voices, and the 2nd and 3rd unison voices set to those values (near 90 and near 45) seems to sound nice.


Or, can you let me know what values to change the line below to- to try this out? (I'll compile it on  my end)
           float copyPhase[] = { .11f, .37f, .67f, .53f, .03f, .19f, .89f, 0.23f, .71f, .19f, .31f, .43f, .59f, .97f };

I'm assuming I should play with changing the .37f and the .67f.
Are those values in radians? What values would give me 45 degrees (or so) and 90 degrees (or so).

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Pfm2 : unison discussion
« Reply #46 on: February 22, 2021, 09:32:09 AM »
If you have any values that work better than the ones i set, i'll happily change them.

Those values are multiplied by the size of the waveform to set the starting sample to use.
0.0f : first sample
1.0f : last sample
0.5f middle sample etc.

so if you want 90 degree between 2 voices they must have a difference of 0.25f.
45 degree difference : 0.125f

There are 14 values because there are 14 voices at maximum.
So yes first values is for voice 1, second for voice 2 etc...
I agree that the 3 first values are the more important, as i don't detect any big improvement with the current algo for high number of voices.

Let me know what you find, thanks for your help !

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Pfm2 : unison discussion
« Reply #47 on: February 22, 2021, 10:34:37 AM »
Great discussion! Will you remerge the stuff to pfm3 (phase offset etc.)

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Pfm2 : unison discussion
« Reply #48 on: February 22, 2021, 11:10:30 AM »
Great discussion! Will you remerge the stuff to pfm3 (phase offset etc.)

Yes :)

matrix12x

  • Team Member
  • ***
  • Posts: 200
    • View Profile
Re: Pfm2 : unison discussion
« Reply #49 on: February 22, 2021, 02:30:50 PM »
@Xavier

Before tweaking the code I decided to approach this in a semi organized manner. I am going to start with an initial simple patch with nothing special going on and record 3 unison voices and 9 unison voices at the same detune settings before and after making any  code changes.

I started a new preset, saw wave for OP 1, algorithm 1. No modulation of any sort.

... (a few min later) ...

However, I'm not sure the last build (2.20u) is shifting the phase of any of the unison voices when detune is set to a positive value.

I set Detune to any value and it sounds the same for both + values as - values of Detune. For example +0.12 and -0.12. prior to making any changes. Also, the waveforms look identical between the + and - value, which indicated that something is not happening. Based on the waveform, it looks like everything is still starting at a phase of zero regardless of setting.

I then changed the first few values in timbre.cpp as discussed above, and the sound and recorded waveform are still identical to the sound and look of the original values. (I.e., I think everything is still starting at phase=0.)

Any ideas?

Edit: Also, can anyone else confirm if they are getting the same results with a positive and a negative detune value?
« Last Edit: February 22, 2021, 02:46:43 PM by matrix12x »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Pfm2 : unison discussion
« Reply #50 on: February 22, 2021, 05:34:32 PM »
Aouch, cannot try right now.
But it seems i made a typo while refactoring a small part :
https://github.com/Ixox/preenfm2/blob/Unison/src/synth/Timbre.cpp#L559
Can you try to replace != by =  ::)

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Pfm2 : unison discussion
« Reply #51 on: February 22, 2021, 06:26:23 PM »
« Last Edit: February 22, 2021, 06:46:36 PM by Xavier »

matrix12x

  • Team Member
  • ***
  • Posts: 200
    • View Profile
Re: Pfm2 : unison discussion
« Reply #52 on: February 22, 2021, 06:33:52 PM »
Thanks.

I tested it and it works.

Then I shifted the 2nd and 3rd unison voice to .125f and .25f and it makes an improvement.
 
I suggest making this change.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Pfm2 : unison discussion
« Reply #53 on: February 22, 2021, 06:52:44 PM »
Then I shifted the 2nd and 3rd unison voice to .125f and .25f and it makes an improvement.

Shifted ? or replaced ?
Can you let me know your float array ?

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Pfm2 : unison discussion
« Reply #54 on: February 22, 2021, 07:03:03 PM »

I made a .125f difference between voice 1 and 3 (so that the 45° is between left and right when using 3 voices).
 and tried to keep primary numbers for others.
Let me know if  { .37f, .11f, .495f, .53f, .03f, .19f, .89f, 0.23f, .71f, .19f, .31f, .43f, .59f, .97f };
sounds the same as yours.

matrix12x

  • Team Member
  • ***
  • Posts: 200
    • View Profile
Re: Pfm2 : unison discussion
« Reply #55 on: February 22, 2021, 07:33:47 PM »
I meant replaced. e.g.: { .11f, .125f, .25f, .53f, .03f, .19f, .89f, 0.23f, .71f, .19f, .31f, .43f, .59f, .97f };


Let me try these new values out:
{ .37f, .11f, .495f, .53f, .03f, .19f, .89f, 0.23f, .71f, .19f, .31f, .43f, .59f, .97f };

... (a few min later)...

I compiled your new values and they also sound good (slightly different but very good). { .37f, .11f, .495f, .53f, .03f, .19f, .89f, 0.23f, .71f, .19f, .31f, .43f, .59f, .97f }


edit: I tried at 3 voices and at 14 voices and at 14 voices it sounds dead on the same for either array. at 3 voices there are some subtle differences but both arrays above sound good.
« Last Edit: February 22, 2021, 07:43:24 PM by matrix12x »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Pfm2 : unison discussion
« Reply #56 on: February 22, 2021, 09:42:06 PM »
Thanks a lot for the feedback i kept the first list.

Here is the 2.20u firmware for those who wants to try to this new unison :)
https://drive.google.com/file/d/1JvdvFUr3iiqil1mkbZKQsNctCgQVKetz/view?usp=sharing

The instrument stops playing now if you change the number of voice while playing unison, to make sure following played note is OK.

Reminder :
Unison detune is now [-1 : +1].
Negative value set the same phase for all voices.
Positive values set a different phase.
I find that preenfm unison sounds best with 3 or 4 voices...
« Last Edit: February 22, 2021, 09:54:56 PM by Xavier »

solipsvs

  • Team Member
  • ***
  • Posts: 222
    • View Profile
Re: Pfm2 : unison discussion
« Reply #57 on: February 24, 2021, 01:54:26 AM »
ok thats MUCH better!  this is definitely useful and makes preenfm sound updated.  im not sure spread does much tho.  its supposed to add stereo width?

solipsvs

  • Team Member
  • ***
  • Posts: 222
    • View Profile
Re: Pfm2 : unison discussion
« Reply #58 on: February 24, 2021, 02:02:01 AM »
another thing that might be nice is a volume balance between the fundamental note frequency and the rest of the unison layers...  has a way of allowing unison to just flavor the effect rather than be full strength only...  there is room for one more knob!

yes this will be amazing in a layered patch!
« Last Edit: February 24, 2021, 02:35:45 AM by solipsvs »

solipsvs

  • Team Member
  • ***
  • Posts: 222
    • View Profile
Re: Pfm2 : unison discussion
« Reply #59 on: February 24, 2021, 05:05:39 AM »
oh yeah, very happy with this!  nice choice with the 2 modes too.  i think this is what preenfm2 needed.  bravo!  this thing now has donkey balls