Zyn out of tune upon re-opening

Official support for: zynaddsubfx.sourceforge.net
Post Reply New Topic
RELATED
PRODUCTS

Post

I'm using the latest VST version, v2.4.1.496, on my Win PC. DAWs are Bitwig and Sonar. When I open a previously saved project that has Zyn in one or more of the tracks, Zyn is always detuned by several semitones. I have to re-select the patch. Not a big deal with only one instance of Zyn, but a pain when I have multiple instances. Have any of your experienced this? Do you know what causes this? Other than that, Zyn works great!

Thank you,

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

Let me guess... you're operating your DAW at 48.000 Hz?
If so, can you check to see if it still happens at 44.1k?
The only thing that pops in my head is some sampling frequency miscalculation...

Could you please specify how many semitones, and in which direction? higher or lower?
Does the same happen if you save zyn's setup in a file and open that file (inside zyn)?
== VDX == One Man can make a difference!
My music is on https://soundcloud.com/vdxi | Info | More Info

Post

Hi jackoo,

Yes, 48K. I didn't change the DAW to 44.1, instead I changed the Zyn settings (it was on 44.1 and 192) to what my DAW and interface are set to, 48 and 128. Semitones appears to be +1.

I may try to some deeper experimentation this weekend, when I've got more time. But for now, I "discovered" something weird. My latest piece where I have had this issue uses three instances of Zyn. After changing Zyn, in settings, to 48 and 128, I opened the project, and noticed that the first instance was +1 semitone, but that the 2nd and 3rd instance are fine. Weird. like I said, now I'm even more curious, and will try to work with this some more this weekend.

Not sure what you mean by your last question: "Does the same happen if you save zyn's setup in a file and open that file (inside zyn)?"

Thanks,

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

jackoo, just checked one more time, it is also not a perfect +1 semitone. It's +1 semitone plus several cents.
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

Hi Jackoo,

OK, I ran the full test this weekend. Both single instance of Zyn and multiple instances at both 44.1 and 48 host sample rate.

You are right on target. All is well at 44.1 for single or multiple instances. At 48, though, the first instance is always up 1 semitone and a few cents. At 48, 2nd and 3rd instances are fine. Weird.

And, it didn't seem to make a difference if I change the sample rate in Zyn's File/Settings/Main Settings.

I hope this feedback helps. And, do you think that this will be able to be fixed? Or are you saying that Zyn requires me to use 44.1?

Thank you,

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

Hi Todd,

I knew this was a problem on older versions of the VST (pre 496).
I was hoping this was solved. Now zyn reads sample rate information when the dll is first loaded.
Are your hosts loading the dll, telling it to run at 44.1 (for scanning) and then reload it at 44.8???

The one semitone came from the different sampling freqs. 44.1 and 48kHz.

The problem is now, I cannot replicate your bug. I don't have either Sonar nor Bitwig.
I've tried 3 hosts: an older version of Reaper, EnergyXT, and an old Cubase @44.8kHz.
I've just put 3 Zyn instances and another synth for reference, and all are playing the same note.

I'm saving the project, reopening it and again when I playback, all of them play the exact same note.
I'm not sure what's going on.
Can you please try in another host? Maybe one I've mentioned above?

Can you give some quick instructions on how to replicate this?

PS: forgot to say, but I don't think it matters: all tests I made were on WinXP 32bit SP2.
== VDX == One Man can make a difference!
My music is on https://soundcloud.com/vdxi | Info | More Info

Post

Wow, not sure what happened... I replied to your post earlier today, hist submit, yet don't see it. Glitch in the forum SW?

Hi jackoo,

"Are your hosts loading the dll, telling it to run at 44.1 (for scanning) and then reload it at 44.8???" --- I don't know how to find this out?

I only have Sonar and Bitwig, so can't try this in any other hosts. My DAW is Win7x64.

I tried again earlier today in Sonar, loading 3 instances of Zyn. I was incorrect earlier in this thread. When I reopen the project in Sonar, all 3 tracks are up a semitone. In Bitwig, only the first instance of Zyn is up.

As far as how to repro: I just create 3 tracks with a single instance of Zyn in each. Exact same MIDI notes in each so that each track is identical. No other tracks, no FX. By the way, 3 tracks is arbitrary... just be sure it is more than 1. Save the project, restart either DAW, open the project, and the semitone shift is present. To correct, I have to go into Zyn and re-select the preset. Then all is back to normal (until I save, close, re-open).

I hope this helps.

Thanks again for all your help with this,

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

Seems like I'm out of luck.
My environment is dating back to 2008...
I can't replicate this bug on any of my old DAWs.
Demo versions of the DAWs you mention don't allow saving the project so I'm not able to test anything.

I simply checked the code to see If I could add any more 'getSampleRate' calls, added one in the setChunk function. So this is a blind try, but I did a compile anyway.

Try it on my dropbox:
https://dl.dropboxusercontent.com/u/130 ... FX_500.zip

Another thing you can try:
This version actually displays the active sample rate when you go to the settings window, not just the default value in the config.
Can you check that in the 3 instances where you have problems, the numbers used for the Sample Rate are different or are they the same for all 3 instances?
== VDX == One Man can make a difference!
My music is on https://soundcloud.com/vdxi | Info | More Info

Post

Thank you, Jackoo, this one works!!! OK, now let me provide some detail that might be helpful.

I first tried it in Bitwig. I didn't write this down, but I seem to remember that the first instance showed 44100/48000/512 in the first line of the main settings. I added the second instance, and it showed 48000/48000/512, and then the same for the third. Saved the project, closed Bitwig, reopened Bitwig and the project, played it, and all was in tune! :) I went back in to look at the settings, and ALL THREE were now showing 48000/48000/512. So Bitwig is happy, and I'm happy (because Bitwig is my primary DAW).

Quick note: In Bitwig, when I added the second instance, I got a dialog box that said "synth_transfer error". (And the box title said ERROR).

OK, now onto Sonar... First of all, I got the error mentioned above, so it took several tries to successfully load three instances into a project so that I could save that project. After opening, ALL THREE tracks were up a semitone. Because of the synth_transfer error, I could view settings for only two of the three, and they were 48000/48000/512. Not sure which two those were though, so I don't know if either of them was instance #1.

I now get the synth_transfer error every time I open up the project in Sonar. Not that concerned though, because Sonar is not my primary DAW, but I wanted you to have this data point in case it is relevant. I occasionally get it in Bitwig, but not often. Having a hard time identifying repro, steps, but it seems to happen when I try to add another instance of Zyn or an altogether different synth. Just opening and closing Bitwig, no error.

I hope all of this helps further. Again, looks like your getSampleRate call was the answer!!

Thanks!

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

Re-compiled:
https://dl.dropboxusercontent.com/u/130 ... FX_501.zip

Moved the 'getSampleRate()' call from setChunk() to VST::open().
Should get rid of the 'synth_transfer_error'.

This is another blind compile as I can't test it.
== VDX == One Man can make a difference!
My music is on https://soundcloud.com/vdxi | Info | More Info

Post

Hi Jackoo,

OK, tried 501 very briefly. No synth transfer error, but the semitone increase issue is back. In Bitwig, only on the first instance, as before. I checked the settings, and first instance is 44.1 and the other two are 48. I also checked the .cfg file and it has 44.1 sample rate. I haven't had a chance to try Sonar yet. Will be out of the studio next two days, and can report back mid week.

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

Hi Jackoo,

I just tried rev 501 in Sonar, and same results as in Bitwig. Rev 500 fixed the out of tune problem but there was still the synth_transfer error. Rev 501 fixed the synth_transfer but now the out of tune problem is back. Was 501 an update of 500? Or were both 500 and 501 updates of the same rev (like 496)?

Also note, as I mentioned above, that the sample rate in the .cfg file is 48000 with rev 500, but it is 44100 with rev 501.

Thank you,

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post

Hi Todd,

I gave this another try:
https://dl.dropboxusercontent.com/u/130 ... FX_502.zip

This time, *every time* Zyn is being asked to output sound, it will ask the host for the sample rate. If there is a difference to its internal sample-rate, it will restart its internal audio engine and purge all audio data from memory, hopefully re-tuning to the correct sample rate.

Hope this will work for you!

PS: The version numbering is incremental for every compile, so every new version is an 'update' of the previous versions. However sometimes I undo some changes (like from 500 to 501).
== VDX == One Man can make a difference!
My music is on https://soundcloud.com/vdxi | Info | More Info

Post

Hi Jackoo,

Thank you for your continued updates! I tried 502 last night. I got the synth transfer error when I loaded the 2nd instance, and that caused problems when I tried to close the project and Bitwig; I had to force it to close. I restarted Bitwig and reopened the project a few times, even installed new instances, and all was OK. No more transfer errors, and all instances are in tune. So that’s good!

But now, I am getting occasional notes on any of the instances that are way high in level. As in, meter pegging high. This is bizarre.

I will try 502 in Sonar to see what kind of results I get there. I am inclined for now, though, to go back to 500. That fixed the wrong notes problem

Thanks again, I'll report back.

Todd
https://www.reverbnation.com/toddsilva
Ryzen 9 5950x with 64G, i7 5820K with 32G DDR4, networked using AudioGridder, Bitwig, NI, U-he, and Arturia soft synths to name a few
Eurorack system https://www.modulargrid.net/e/racks/view/432465

Post Reply

Return to “ZynAddSubFX”