Page 2 of 3

Re: HardSync FM problem

PostPosted: Sun Aug 04, 2019 4:07 pm
by tulamide
This may sound silly, in which case it is due to my difficulties with the DSP module's general concept, but since it only affects the very first cycle, could you get away with setting the amplitude to 0 during that cycle?

Re: HardSync FM problem

PostPosted: Sun Aug 04, 2019 5:04 pm
by Spogg
I think I’ve sorted this.

The Osc2Ramp was not taking into account the offset caused by Phase1, which is why setting it to anything other than 0 or 1 messed it all up.

Now you can set any value on any knob and you get identical cycles, and the first part-cycle is represented correctly.

Have a look and see if it’s working correctly for you.

Cheers

Spogg

Re: HardSync FM problem

PostPosted: Sun Aug 04, 2019 7:28 pm
by tulamide
Spogg, that looks like you solved it. So it wasn't an unknown phase shift all the time, but simply phase offset from osc 1!

I didn't see that. Well done!

Re: HardSync FM problem

PostPosted: Sun Aug 04, 2019 8:23 pm
by trogluddite
Bravo, Spogg! :ugeek: I must admit, I also opened Adam's schematic a couple of times and had a few stabs in the dark without quite getting my head around how the two phases interacted.

Re: HardSync FM problem

PostPosted: Sun Aug 04, 2019 8:26 pm
by adamszabo
Nice one Spogg! It is ALMOST there, now it seems the sync points are in the wrong place. It seems they are in the middle of the wave now? Try to compare my original and your schematic, if all the phase knobs and the FM knob is 0 but Semitone 1 is 0 and Semitone 2 is 5. You can see your new one broke something else now.

Re: HardSync FM problem

PostPosted: Mon Aug 05, 2019 12:46 pm
by Spogg
In my excitement I didn’t notice that Adam. :oops:

I’m not sure of the audible effect but that’s not the point. :lol:

Version 3 uses a 2nd Osc1 Master Ramp generator to create a 180° phase-shifted x ramp (there may be a more efficient way to achieve this). The sync point is now as it was before and the wave cycles are still all the same.
This has the advantage of not needing a sync bool, since the code takes care of it due to the new x ramp. Also, I noticed that the sync bool caused a glitch and the new version doesn’t seem to.

See what you think and say if it’s still not what you wanted.

Cheers

Spogg

Re: HardSync FM problem

PostPosted: Tue Aug 06, 2019 12:09 pm
by adamszabo
Hey Spogg,

Thanks for your efforts! Interesting concept, its what Martin said, to use another oscillator to generate the sync point with the phase. Unfortunately its still not really working the way I hoped. To help you, I have made a project where I condensed the original code into a single module, and included it in your project. That outputs the ramp in the red graph. That should be the "correct" one, except the first cycle as we know. You can use that as a reference to what the ramp should look like and how it should behave. I am trying to figure out how to solve it as well, I spent the majority of yesterday trying different things but no luck.

Re: HardSync FM problem

PostPosted: Wed Aug 07, 2019 4:34 pm
by Spogg
I’m sorry to say Adam that I’ve spent a lot of time thinking and experimenting with this and I’ve come up with nothing better. :cry:

My version works differently to yours, so I guess it’s inevitable that you’ll get different characteristic behaviour. It seems that, if you rely on a sync pulse for the slave oscillator, you have to take into account of what happens before the first sync pulse arrives when you have different phase shifts adjusted.

I even decided to make my own version from the ground up, using sync, but I hit the same issue every time: the first part-cycle was incorrect at various combinations of settings.

This may not help, but I think my last version will sound acceptable, because there is immediate consistency and the FM waveform looks reasonably symmetrical. Also, when you get a discontinuity (step) in the wave, it creates high harmonics independent of the point in the cycle where it happens. I proved this to myself using my Wavemaker 4 ages ago.

I would suggest you audition it against yours, for a sustained note, and judge the results accordingly. If mine is not fit for purpose then it would be down to someone more capable than me to figure out a better method. I did try my best!

Cheers

Spogg

Re: HardSync FM problem

PostPosted: Wed Aug 07, 2019 6:36 pm
by adamszabo
Hi Spogg,

Absolutely no worries, your attempts have given me some more insight, so I can try to come up with a solution. I will keep on working on it and hopefully one day find the perfect solution. I will upload it when I do!

Cheers!

Re: HardSync FM problem

PostPosted: Thu Aug 08, 2019 6:52 am
by adamszabo
martinvicanek wrote:What you can do is simulate one full cycle. Then you know at each instant the amplitudes and phases, and you can take those values to initiate the real oscillator.


Martin, would you mind elaborating a bit more on this tip? Should I simulate a full cycle of the master or slave oscillator, and should that cycle include the sync as well, or just a clean ramp?