PreenFM Forum

PreenFM => preenfm2 and preenfm3 => Topic started by: Xavier on November 16, 2020, 09:46:47 PM

Title: Pfm2 : unison discussion
Post by: Xavier on November 16, 2020, 09:46:47 PM
would you have interest in reducing polyphony and adding more sound shaping stuff like maybe a master effects section with filters and distortions etc maybe a comb delay...   i think enough people use preenfm2 as a bass synth...  if it were a mono synth per part that would shave off a lot of cpu at least.  i mean i mostly use mine as a mono synth with 4 layers.

I don't have any plan for that.
But i'm as usual of course ready to help anyone who wants to give that a try.

another great feature would be to allow unison + detune + spread.  this could make the preenfm2 into a big fuzzy bulldozer!  and with a master effect like distortion etc. look out!

What does prevent you to do that today ? (OK there's not master effect).
But unison is doable.
It requires a little work, load the same preset in the 4 instruments.. assigne same midi channel or use global midi channel.
Detune and pan the different operators of the 4 instruments.
Reminder to make your life easier : "Mix, pan, env edit: hold 3 to modify all other operators of the same type (carrier/modulator) at the same time"


Title: Re: Pfm2 : unison discussion
Post by: solipsvs on November 17, 2020, 06:03:13 AM
im not opposed to work, but this would make a unison count of 4 when im trying to access as many as ive got.

but i see.  i dont want to annoy so i guess ill learn to code
Title: Re: Pfm2 : unison discussion
Post by: baxgas on November 17, 2020, 09:44:39 AM
The preenfm2 respond to midi CC10 to pan an instrument. It's not reset when you load a new preset.
>> Thanks, works like that, I can make it from my Sequencer

But adding a shortcut (button + enoder) to modify the panning should be easy.
>> Do you mean by Performance P1-4 buttons via the Modulation Matrix?
Title: Re: Pfm2 : unison discussion
Post by: Xavier on November 17, 2020, 10:32:24 AM
Quote from: Xavier
But adding a shortcut (button + enoder) to modify the panning should be easy.
Do you mean by Performance P1-4 buttons via the Modulation Matrix?

I mean in the code  :)
Actually you can use P1 to modify "Pan*" in the matrix. But that will be part of the preset, so it will reset when loading a new one.

Title: Re: Pfm2 : unison discussion
Post by: solipsvs on November 17, 2020, 05:15:31 PM
would you have interest in reducing polyphony and adding more sound shaping stuff like maybe a master effects section with filters and distortions etc maybe a comb delay...   i think enough people use preenfm2 as a bass synth...  if it were a mono synth per part that would shave off a lot of cpu at least.  i mean i mostly use mine as a mono synth with 4 layers.

I don't have any plan for that.
But i'm as usual of course ready to help anyone who wants to give that a try.

another great feature would be to allow unison + detune + spread.  this could make the preenfm2 into a big fuzzy bulldozer!  and with a master effect like distortion etc. look out!

What does prevent you to do that today ? (OK there's not master effect).
But unison is doable.
It requires a little work, load the same preset in the 4 instruments.. assigne same midi channel or use global midi channel.
Detune and pan the different operators of the 4 instruments.
Reminder to make your life easier : "Mix, pan, env edit: hold 3 to modify all other operators of the same type (carrier/modulator) at the same time"

im not overstepping my bounds by asking for features most other synths already have am i?
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on November 17, 2020, 11:23:48 PM
I like this idea of adding a unison + detune. I've been doing this manually with the 4 parts.

another great feature would be to allow unison + detune + spread.  this could make the preenfm2 into a big fuzzy bulldozer!  and with a master effect like distortion etc. look out!

Title: Re: Pfm2 : unison discussion
Post by: Xavier on November 18, 2020, 09:30:38 AM
im not overstepping my bounds by asking for features most other synths already have am i?

Where would you add this option in the user interface ?
The idea sounds good, but how to integrate that in a easily usable way ?

The editing is really dedicated to one instrument.
Adding a LoadUnison, so that it's done at loading time ?
Browsing unison required to save in memory all 4 instruments. in Case of "Back" button. Not sure the pfm2 has enough free memory for that.
Adding detune and spread option woudl require to keep in memory the original sound. Nothing is designed for that.

Adding a specific setting option to switch between multi timbral / Mono timbral unison... Maybe the better solution, but that would require some heavy modification i don't have time to do.

All detailed ideas how that could be done are welcome.


Title: Re: Pfm2 : unison discussion
Post by: solipsvs on November 18, 2020, 03:20:58 PM
i dont really understand the technical problems you mentioned.  i think it might fit in the polyphony screen:  make the unison setting by turning the knob past 1 and dynamically limit the settings according to how many voices you have left that are unallocated.  example:  U2, U3, U4... U14 etc, and maybe detune can live in the mod matrix?  if its impossible technically then i understand but i have no idea about technical limits.  maybe its an idea for preenfm3?
Title: Re: Pfm2 : unison discussion
Post by: Toltekradiation on November 18, 2020, 08:48:09 PM
hi guys !
if it were me, i would go the ambika way to handle unison : each timbre ("part" in ambika terminology) has a number of voices, a mode and a spread parameter :
Quote
mode: Polyphony handling. When this is set to mono, all voices assigned to this part are simultaneously played in unison, and you cannot play chords (only the most recently played note is heard). When this is set to poly, the notes you play are dispatched to the voicecards. Obviously, the polyphony is limited by the number of voices assigned to the edited part! Finally, 2x unison works like the polyphony mode except that every time you play a note, it is played by 2 voices - this effectively divides the polyphony by two.
(from https://mutable-instruments.net/archive/ambika/manual/#keyboard-and-sequencing)

the spread parameter is used to detune voices (zero to -+1 semi tone).

it's very flexible and effective on the ambika.

the good news is that the code is available here :
https://github.com/pichenettes/ambika/blob/8cef027a5da278b61ad9e49dd43bc5f169934aa0/controller/part.cc#L661
https://github.com/pichenettes/ambika/blob/master/controller/voice_allocator.cc

all this would also add some benefit to poly handling, as it use a note stack to keep track of pressed keys.

but, yes, it's a lot of work to refactor such a big part of the code pool. :P
Title: Re: Pfm2 : unison discussion
Post by: Xavier on November 18, 2020, 09:55:40 PM
i dont really understand the technical problems you mentioned.  i think it might fit in the polyphony screen:  make the unison setting by turning the knob past 1 and dynamically limit the settings according to how many voices you have left that are unallocated.  example:  U2, U3, U4... U14 etc, and maybe detune can live is the mod matrix?  if its impossible technically then i understand but i have no idea about technical limits.  maybe its an idea for preenfm3?

I don't know why i had in mind about using the 4 instruments with voice = 1.
Now i got what you mean  ;D

Quote from: Toltekradiation
if it were me, i would go the ambika way to handle unison : each timbre ("part" in ambika terminology) has a number of voices, a mode and a spread parameter :

Nice to see you back  here ;)
Not sure the ambika way would be the best thing to do with the preenfm.
Each card is a small Shruthi. So it looks like a way to have polyphony from several monophonic synth.
It took me some time to undertand how it works to write the editor ;)
https://github.com/Ixox/Shruthi-And-Ambika-Editors/blob/master/Images/ambika4.PNG
I think we can have something more simple in a all digital synth.
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on November 19, 2020, 02:10:17 AM
ambika is actually a synth card with 6 filter boards.  ive had one for a long time

so... unison would probably not need a filter for every voice, reducing cpu and perhaps ram?  i dont know.
Title: Re: Pfm2 : unison discussion
Post by: Toltekradiation on November 19, 2020, 10:25:31 PM
@Xavier, i forgot you do know well the ambika !
yes, ambika is quite different from pfm, but there is also similarities : both are digital for the midi part, they are multitimbral and a voice card is still a voice ;)

For now, in the pfm, the voice allocation is handled by Timbre.cpp, but i found it quite difficult to modify when i tried, because i found it a bit entangled ..
the ambika voice allocation mecanism add a code layer between timbre/part and the voices, which is a good thing in my opinion.
implementing unison (and unison x2) would then be quite easy to do.

But that's just my opinion, there is maybe an easier/better way to do it ! :)
Title: Re: Pfm2 : unison discussion
Post by: Toltekradiation on November 20, 2020, 07:34:11 AM
@solipsvs,
yes, on the ambika, each voice cards do both : oscillators and filter.
look at the file list in the voicecard directory of the ambika project :
https://github.com/pichenettes/ambika/tree/master/voicecard
Title: Re: Pfm2 : unison discussion
Post by: Xavier on November 20, 2020, 09:03:06 AM
Biggest difference is that voices in the preenfm2 don't contain the timbre. They are attached to a timbre and uses its parameter.

pfm2 :
. 4 * timbres
. 14 * voices
Ambika :
. 6 * (voice + timbre).

Anyway... I won't change the timbre/voice thing. I quite like it.  And the preenfm2 does not have enough memory for 14 timbres.
And i think Unison can be added by adding a new (ANOTHER  ::) ) page in the "engine" on the preenfm2.
There is one Filter is for all voices of one timbre on the pfm2 so it's OK.

(i have 100 things to do on my free-time TODO list, before doing that :) )

Title: Re: Pfm2 : unison discussion
Post by: solipsvs on November 20, 2020, 01:19:47 PM
i was always under the impression ambika had the synth on the mainboard while the exchangeable filters had their own board.  oh well, you learn something new every day
Title: Re: Pfm2 : unison discussion
Post by: Xavier on December 06, 2020, 06:59:38 PM
Thanks for this discussion.
Unison is implemented in the pfm3 (v0.99)
I don't have time to port it back for the preenfm2 in the short term in  but it's on my list.




Title: Re: Pfm2 : unison discussion
Post by: Toltekradiation on December 06, 2020, 07:16:19 PM
that's great, many thanks Xavier !
i can't wait to check it out (..but my pfm3 is still to built  ::)).
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on December 06, 2020, 09:10:28 PM

Thanks for this discussion.
Unison i implemented in pfm3.
I don't have time to port it back for the preenfm2 in the short term in  but it's on my list.

Thanks! :-)
I saw that you implemented it in PFM3. Looking forward to it's implementation in the PreenFM2.
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on January 04, 2021, 10:22:59 PM
xavier just wondering if you found the time to copy and paste the code over from pfm3
Title: Re: Pfm2 : unison discussion
Post by: Xavier on January 05, 2021, 08:43:06 AM
xavier just wondering if you found the time to copy and paste the code over from pfm3

Unfortunately it's not just copy and paste (UI page with parameter saved and midi controllable has to be added and is different).
And unfortunately my free time is very limited and always lots of things to do.
If someone wants to give a try, i can guide...
Title: Re: Pfm2 : unison discussion
Post by: lokki on January 13, 2021, 08:34:11 PM
i don't think your criticism is at the right place here. xavier is a single person doing this! no reason to be so "hateful"...

btw. there are many synth companies that sell synths that are no longer actively maintained, even if there are bugs in the firmware...xavier always had open ears to such reports and tried to fix those.

 nice to hear that you found your synth, happy patching with the virus!

Title: Re: Pfm2 : unison discussion
Post by: matrix12x on January 14, 2021, 04:17:04 PM
I agree with Lokki.

Also, the code is available for anyone to try to implement themselves if they are in a rush.

Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 13, 2021, 09:00:27 PM
@Xavier,
I'm up for trying to add Unison to PFM2. Which file(s) for the PFM3 should I start looking at to see how its implemented?

xavier just wondering if you found the time to copy and paste the code over from pfm3

Unfortunately it's not just copy and paste (UI page with parameter saved and midi controllable has to be added and is different).
And unfortunately my free time is very limited and always lots of things to do.
If someone wants to give a try, i can guide...
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 13, 2021, 10:04:27 PM
OK i have a little time to spend on that too.
The preenfm3 does not have any critical bugs and the editor does what i wanted it to do.

The 2 pfm3 commits are (hope i don't forget anything):
https://github.com/Ixox/preenfm3/commit/366b72ffdf8a21360d2276f7effbe1200f5ef8d8
https://github.com/Ixox/preenfm3/commit/4757eefde1121c9c3bf9a5cf840071ca1487fc7e

Not sure the second one is relevant for the pfm2 and the first on contains many variables refactoring that has nothing to do.
Look at Common, timbre, synthstate,voices classes.

What will be more complicated is to integrate the new parameters in the UI of the pfm2.
What i have in mind is to add a second Engine page after
Algo / Velo / voice / glide

Which would be enabled only if voice is >=2
Mode (poly or unison) / spread / detune

My biggest concern is that i'd like it to be compatible with the preenfm3 and the editor.



Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 13, 2021, 11:51:06 PM
Thank you very much for the direction. It is appreciated.

This makes sense to add the unison page as the second Engine page and it seems to match what you did with your PFM 3 code.

I just started going through the PFM3 code in the commits and comparing to the latest PFM2 code on github. It looks like many of the functional changes for unison are in Timbre.cpp.

Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 14, 2021, 09:11:01 AM
You can have a look if you're interested.
But I'll likely include it myself in the next couple of weeks.
(2 weeks : I Don't have much time per day ;)  and i want to make sure i can include that easily in the editor a bit later)
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 15, 2021, 06:56:58 PM

Or maybe sooner :)
I created a git branch Unison of my work in progress.
https://github.com/Ixox/preenfm2/tree/Unison

Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 16, 2021, 12:36:54 AM
Wow you are fast.

I compiled it with no errors and flashed it.
 
However, I cannot seem to access the new Unison page. I may be missing something. My understanding is that I would press ENG and the Unison page would be the second Engine page.
After the first Engine page it goes straight to the Modulation page.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 16, 2021, 12:39:28 AM
My error. I just looked through your code and found it.

Edit: I think I found a bug. The Unison menu does not seem to appear if voices is set to 1 only if Voice is set to 2 or higher.
Edit again: oh, now that I've played it for a few hours this makes sense because if Voice is only set to 1, what is there to detune. So never mind. It's not a bug.

Also, if I have voice set to 1 and press MOD enough times the Unison screen shows as well. But does not function (because voice is 1). That is changes to Spread and Detune don't change the sound.

If I go back to change Voices to anything greater than 1, then Spread and Detune do correctly change the sound.

Ok, so if I change Voices to any number over 1, "Glide" no longer disappears if unison is on. EDIT: ahh I think this makes sense since unison is monophonic.

BTW unison sounds AMAZING!! I started making some sick sounding pads.
Title: Re: Pfm2 : unison discussion
Post by: vurt on February 16, 2021, 08:12:16 AM
Unison is something i've really wanted for preenfm2  ;D
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 16, 2021, 09:51:17 AM
@matrix12
Thanks for the feedback  :)
There are still some UI bugs to fix.
Unison menu should no show up among the modulator pages.

Yes i think you figured out how it works, but the preenfm2 UI can be a bit confusing.
So i confirm :
. Glide only shows up for mono sound (voice = 1 OR voice >1 and Unisons).
. The engine2 ("Play mode" menu) only shows up when voice > 1.

Will try to upload fixes tonight (france time).

@vurt
Yest that can be usefull for you as you mainly use mono sound in your Eurorack.

Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 16, 2021, 07:45:59 PM
@matrix12x
Please If you have time, let me know if you find some bugs with the latest Unison branch.
Thanks :)
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 17, 2021, 01:33:33 AM
Xavier,
I compiled it and played with it for an hour trying to find bugs and did not find any.
I read through the changes to the code as well. I see you fixed the items in common that caused the Engine2 page to also appear as the last page in MOD.

It works perfect. Great work.  :)

Ive been making all sorts of new sounds with unison since yesterday. With unison, the PFM2 sounds soooo fat, with such a beautiful beating sound.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 17, 2021, 09:16:00 AM
Great !
Thanks a lot for testing and for the feedback :)

I'll include a couple of fix that i found while developping the pfm3 (poly note choser, small midi note (<4ms) are not played), and then create the zip.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 17, 2021, 09:36:58 PM
Here is a link of a compiled version for those who wants to give a try :
https://drive.google.com/file/d/1IGHz_fjZTfmmGBk1qzq7rgYY6UQ9ADMG/view?usp=sharing

It's called 2.20t, not sure yet if that will be 2.21 or not.
CV/Eurorack version is not tested at all, as i don't have any Eurorack where i am for the week.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 18, 2021, 03:10:45 AM
I tried out the 2.20t that you compiled and found no issues. Again, thank you for all your work on this great synth.
Title: Re: Pfm2 : unison discussion
Post by: vurt on February 18, 2021, 07:42:01 AM
Tried the CV version with my eurorack. Playing from a euro sequencer it sounds like unison mode (set to 8 voices) is 1 fixed pitch for all notes, just getting a short clicky sound. If i change to poly and press a key on the sequencer then first press is fixed tone, second press (same key) is the real pitch.

Tried it with MIDI and it sounds pretty good :) I do agree with Solipsvs that randomness to pitch could do wonders.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 18, 2021, 09:02:45 AM
Thanks for the feedback.
I need to try with the Eurorack version but that won't be before this week end.

I don't want to add any new parameters in the UI.
I'll see if i can add randomness somewhere to mitigate the phasing effect.
Title: Re: Pfm2 : unison discussion
Post by: vurt on February 18, 2021, 10:49:55 AM
Cool :)

Here's a video of the bug i'm getting, if you need it.
https://www.youtube.com/watch?v=4VZKEjcxP7U&feature=youtu.be&ab_channel=Vurt_NexusMods

i can get some notes if i use Slide Output from my sequencer. For some reason.
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 18, 2021, 11:58:25 PM
one way to mitigate the phasing might be to stagger each voice, even randomly, (by less than one phase of the root)  all they need is to be out of phase i think.  actually manipulating the pitch gives a very interesting knotty warbling.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 19, 2021, 02:23:40 AM
@solipsvs I believe this just sounds like typical unison behavior. Also, we may be making different types of sounds.
The analog synths that I have that can do unison have this phasing sound to it. I also think my Access Virus (digital synth) has this effect when using unison. Personally I like it. What is an example of a synth where you don't hear the phasing when using unison? Would you mind posting a sample? I would love to compare. I'm very much into new sounds.

However, even if the unison voices are out of phase, there will still be phasing because there is a phase difference between the voices. The reason unison sounds stick out is because of the beating.

Some suggestions for reducing the phasing during sound design are:
1) use more unison voices
2) don't do unison on low frequency sounds
3) try different waveforms. for example unison on a saw sounds is less likely to have this phasing than with a sine wave


Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 19, 2021, 05:58:08 AM
ok heres an example from serum. one clip is where each layer starts at the same phase and then diverge creating a phasing sound and the next is an example of each layer starting with a random phase, creating no phasing sound.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 19, 2021, 02:13:24 PM
Thanks. Good samples for the explanation.
 
The random start phase sample you posted does sound better.

Looking at the difference in waveforms in an editor, one can see that the in-phase sample has distinct peaks, whereas the random phase one has no discernible peaks.

I'm assuming each unison voice in serum starts at a random phase, e.g., not the pairs of unison voices (assuming an odd number of unison voices).
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 19, 2021, 05:13:33 PM
that was 16 layers and im not sure if they are actually random as much as just deliberately out of phase with each other.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 21, 2021, 09:29:21 AM
Here is the next beta Unison firmware for the preenfm2  2.20u
https://drive.google.com/file/d/104UNZ-R6j8ukwVbELv4xVnOZ2ii47ixH/view?usp=sharing

. CV/Eurorack should work much better :)
  I can still hear some weird random glitch in the sound. Not sure what it is (maybe the CV i send ?). Still have to investigate.

. Now the Unison Detune is between -1.0 and +1.0.
  With positive detune there is a different starting phase for each voices of the unison
  With negative number phases are all the same (as in 2.20t).
  The difference is not huge but i had the feeling in my quick tests that different phases sound a bit better specially with bigger detune value.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x 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).
Title: Re: Pfm2 : unison discussion
Post by: Xavier 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 !
Title: Re: Pfm2 : unison discussion
Post by: lokki on February 22, 2021, 10:34:37 AM
Great discussion! Will you remerge the stuff to pfm3 (phase offset etc.)
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 22, 2021, 11:10:30 AM
Great discussion! Will you remerge the stuff to pfm3 (phase offset etc.)

Yes :)
Title: Re: Pfm2 : unison discussion
Post by: matrix12x 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?
Title: Re: Pfm2 : unison discussion
Post by: Xavier 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 =  ::)
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 22, 2021, 06:26:23 PM
I just pushed a fix in github :
https://github.com/Ixox/preenfm2/commit/691f54d16e847a26fab8a00844e5191675e873d0
Title: Re: Pfm2 : unison discussion
Post by: matrix12x 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.
Title: Re: Pfm2 : unison discussion
Post by: Xavier 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 ?
Title: Re: Pfm2 : unison discussion
Post by: Xavier 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.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x 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.
Title: Re: Pfm2 : unison discussion
Post by: Xavier 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...
Title: Re: Pfm2 : unison discussion
Post by: solipsvs 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?
Title: Re: Pfm2 : unison discussion
Post by: solipsvs 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!
Title: Re: Pfm2 : unison discussion
Post by: solipsvs 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
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 24, 2021, 06:17:41 AM
are there cc left to assign? maybe matrix destinations?
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 26, 2021, 03:37:05 PM
@ solipsvs are you suggesting using a CC or a mod destination for unison detune.

Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 26, 2021, 06:09:34 PM
indeed! but i also posted about an amplitude ratio parameter of ‘fundamental (not detuned) to unison layers’.  perhaps it would be appropriate?

also the spread doesnt seem to do anything
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on February 26, 2021, 06:29:08 PM
On my unit "spread" seems to affect the stereo field. I've mostly been doing unison using 3 or 4 voices max.

Looking at the code, it definitely effects the pan.
for example in Timbre.cpp:
float opPanInc = 2.0f / numberOfCarrierOp * params.engine2.unisonSpread;


Regarding the amplitude ratio, sounds like a cool idea. Might you have a sound example from another synth?
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 26, 2021, 11:18:33 PM
thats not hard to imagine?  it adjusts the volume ratio between the fundamental and detuned layers.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 27, 2021, 12:02:42 PM
Detune is only calculated when a new note is pressed.
So it would not work in the matrix.

Spread works for me too.

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!

Actually no. Or not as easy as it seems.  But for technical reason.
The preenfm2 as a strong link between what you see  and what parameter is stored.
And at the free knob position there is the version of the preset that is stored.
That would requires a bit more work.


Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 27, 2021, 01:21:21 PM
ah well, unison is a massive improvement so it was successful.  can you tie parameters to cc tho?
Title: Re: Pfm2 : unison discussion
Post by: vurt on February 27, 2021, 06:28:22 PM
Tried the latest unison version, it sounds really great.

Something else seems to have changed too since a tiny few of my patches now has a terrible overdrive sound, which was fixed by turning down the internal volume. Really odd kind of distortion because if you play for a bit you notice some sounds comes out without any kind of distortion and the next note is distorted beyond belief lol
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 27, 2021, 09:52:21 PM
Tried the latest unison version, it sounds really great.

Something else seems to have changed too since a tiny few of my patches now has a terrible overdrive sound, which was fixed by turning down the internal volume. Really odd kind of distortion because if you play for a bit you notice some sounds comes out without any kind of distortion and the next note is distorted beyond belief lol

Do you mean distortion when you enable Unison ?
Or distortion on your old mono presets ?
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 27, 2021, 10:20:48 PM
ah well, unison is a massive improvement so it was successful.  can you tie parameters to cc tho?

Yes i'll add that.
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on February 27, 2021, 10:53:06 PM
fanks bruv.
Title: Re: Pfm2 : unison discussion
Post by: vurt on February 28, 2021, 11:49:03 AM

Do you mean distortion when you enable Unison ?
Or distortion on your old mono presets ?

Mono. Filters off. it's perhaps 30% of my patches that are affected and needs lower volume to not distort.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on February 28, 2021, 05:39:19 PM
Mono. Filters off. it's perhaps 30% of my patches that are affected and needs lower volume to not distort.

Ouch...
With filters OFF ???
OK so that's a regression. I have to understand what's wrong.
Could you share a preset that is impacted ?
Title: Re: Pfm2 : unison discussion
Post by: vurt on February 28, 2021, 06:37:25 PM
Mono. Filters off. it's perhaps 30% of my patches that are affected and needs lower volume to not distort.

Ouch...
With filters OFF ???
OK so that's a regression. I have to understand what's wrong.
Could you share a preset that is impacted ?

sure. i also checked to see if it was my own waveforms making it too loud, but no (i have one that is super loud, much louder than the default square).. i think i have your email so i should be able to send you a patch later.

edit: sent. I only used presets which uses the default waveforms.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on March 02, 2021, 04:39:44 AM
@vurt do the patches that distort use a particular algorithm? Also does the volume knob have to be at full, or does it also distort on less than max?

Are the patches short envelope times or long envelopes (like a pad)?

I run my PFM2 at maybe 3/4 max volume. I have not noticed any distortion. but maybe I just lucked out.
Title: Re: Pfm2 : unison discussion
Post by: vurt on March 02, 2021, 06:22:56 AM
@matrix12x
volume often full (2.0), but it really depends since some patches can be very quiet otherwise, i've spent a long time making every patch the same level.. if i turn down the internal volume its fine. but yeah it probably shouldn't change the patches in such a way that suddenly they distort.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on March 02, 2021, 08:51:32 AM
volume often full (2.0), but it really depends since some patches can be very quiet otherwise, i've spent a long time making every patch the same level.. if i turn down the internal volume its fine. but yeah it probably shouldn't change the patches in such a way that suddenly they distort.

Thanks again for the presets you sent me.

Full volume is 1.0 not 2.0.
The preenfm2 adjust the volume per voice depending on the number of instrument enable (voices > 0) and number of voices.

I tried your patches, the 3 of them have volume > 1.0.

I did not notice any difference between 2.20 and 2.20u (unison) firmwares. And I don't see in the code any reason for that.
When they distort in 2.20u they also distort in 2.20 with the tests i've done.

A possibility is that when you played them in 2.20 you had another instrument enabled (with voices > 0). So the volume was divded by 2.
And when trying them in 2.20u instrument you don't have other instrument enabled, so they use the full DAC resolution and because of volume > 1.0, the DAC buffer saturates.

Do you think that can be the reason ?
If not, please let me know how you tested.





Title: Re: Pfm2 : unison discussion
Post by: vurt on March 02, 2021, 12:45:34 PM
max volume (gain, in filter section) says 2.0, that's what i meant. at least it does for me, and that's where the volume is for at least 2 of the patches i sent you.
i've not changed voices or instruments enabled..

but it's no biggie to me, i'll just lower the gain and re-save. if its just me who's affected i guess it's on my end anyways.
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on March 03, 2021, 06:37:13 AM
@vurt I didn't realize you meant the gain in the filter section. I thought you had meant the volume knob.

I always set gain to less than 1.0 (usually at 0.85 or so), as I had interpreted 1.0 as full gain to avoid any overdrive that I did not intend.
Title: Re: Pfm2 : unison discussion
Post by: vurt on March 03, 2021, 08:03:12 PM
i go to 2.0 for the quieter patches so that i can have all patches at pretty much the same volume, it's very irritating to browse for sounds and suddenly something is extremely quiet (or loud).. in fact i wouldn't mind if it went to 3... i still have sounds that are too low in volume, though not too many.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on March 06, 2021, 07:57:01 AM
Just compiled a new version this morning 2.20w
https://drive.google.com/file/d/134BZ5ynOieO-ALGhXGHc_6dFoDJ3eTh3/view?usp=sharing
. Midi CC 13 for Unison Detune (only use at note on event cannot do real time modificaiton during a note).
. Midi CC 14 for Unison Spread
. Fix a display problem (preset name all over the screen) when receiving a patch from the editor
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on March 06, 2021, 03:32:57 PM
I checked 2.20w out. CC13 and CC14 work as described.

I checked out the display after sending presets from the editor and that seems to work as well. (no weird names all over the display)

Good work.
Title: Re: Pfm2 : unison discussion
Post by: Xavier on March 06, 2021, 03:58:30 PM
I checked 2.20w out. CC13 and CC14 work as described.
I checked out the display after sending presets from the editor and that seems to work as well. (no weird names all over the display)

Thanks a lot !  :)
Title: Re: Pfm2 : unison discussion
Post by: matrix12x on March 06, 2021, 04:21:39 PM
I just noticed a bug (when using 2.20w and the current version of the editor)... when I push a patch from the editor, it "zeros" out the voices in the PFM2. regardless of the voice setting in the editor.


If I turn the voice knob in the editor the number of voices is correct, its just when I press "push."

Not sure if its an editor bug, or a PFM2 bug. However, this behavior does not exist at PFM2 2.20u.
Title: Re: Pfm2 : unison discussion
Post by: solipsvs on March 07, 2021, 09:20:54 AM
i was wondering if we could get a much bigger range for the detune parameter, say up to maybe 3 semitones since there are some tricks you can do with sinewaves that would benefit from being phase reset at key on...