Problems getting 64 bit VSTi to work with jBridge

Started by Frank, November 25, 2012, 16:28:16

Previous topic - Next topic

Frank

Hi all,
I'm having problems getting 64 bit VSTi's to work with OpenMPT. According to the release notes of version 1.20.04 (which I have installed), it now has built-in support for jBridge. The manual states the following:
QuoteCan I load 64-Bit VST plugins into OpenMPT?
Yes, this is possible if you have jBridge installed. However, in order to use jBridge, you will have to run
OpenMPT with administrator privileges. You can then simply add 64-Bit VST plugins like 32-Bit VST plugins to OpenMPT's list of known plugins.

So I downloaded and installed the demo version of jBridge (fully functional but will go silent after 20 minutes).
I start OpenMPT by right-clicking the program icon and select "Run as administrator". I have also set mptrack.exe file properties to run as administrator, according to the jBridge installation guide (and also auxhost.exe, auxhost64.exe and jBridger.exe).

Now it should be possible to add 64 bit VSTi's into OpenMPT, right? Well, it doesn't for me. I always get the message "At least one selected file was not a valid VST Plugin.".
And I'm sure that I have selected the correct file. I've even tried every single dll file just to be sure. 32 bit versions work fine, but I still can't add 64 bit versions. I've tried a number of plugins from both Native Instruments and Applied Acoustics. I have tried starting the auxhost.exe and kept the dialogue box open to keep the process active in task manager. Same thing for auxhost64.exe.

Can anyone tell me what am I missing here? What step(s) have I forgot?

Saga Musix

Since I don't really have any 64-Bit plugins available, I only tested this feature with a small number of plugins when implementing it. Simply installing jBridge should actually do the job. To confirm whether it's a plugin issue or a host issue, can you please test if the problem also occurs with this plugin? I used the 64-Bit version of TubeAmp most of the time when implementing jBridge support, so I am fairly sure that this plugin should load if everything is set up correctly. If it doesn't, something might be broken; In that case, you can still try creating stub versions of your 64-Bit plugins using the jBridge configuration tool.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Frank

Hi,
The plugin you linked to didn't work either, so I assumed the problem was on my side. After reinstalling both OpenMPT and jBridge, it could do the initial load of the 64 bit VST plugs without problems. After that, things go bad.

When loading the 64 bit version of Native Instrument's Kontakt and adding a drumkit (less than 100Mb sample data), I experienced the Severe Popping bug logged here as 0000138. That issue was closed and deemed as not an OpenMPT bug, and rather a jBridge bug. I've read through the thread described in the bug log, but couldn't get a definite answer on if this is fixed in jBridge 1.5. But based on when that bug was described and when 1.5 came out, I would guess it should have been fixed by now.

I have played around with a bunch of settings but can't get rid of the popping and buzzing. The same thing happens at first with the Tube Amp VST you asked me to test. Any channel that used that VST got completely buzzed, but after restarting OpenMPT, that VST worked fine - until I let a single pattern loop for 10-15 minutes, than the distortion came back. No new samples or input during that time.

The 64 bit version of Applied Acoustics' Strum Acoustic GS-1 has even more problems. Clicking the Edit button to open the VSTi GUI will take about 30 seconds, and an error message will appear: "Strum-acoustics GS-1 1.0 (ID: 140139057 has crashed. Last audiomaster opcode: 42. Last dispatcher opcode: 14". In the background the VST GUI window will be visible as a gray box with an inactive title bar, and will stay open after clicking the error confirmation. After closing this window OpenMPT will be very sluggish, taking about 15 seconds to go from the Instruments tab to the General tab. This sluggishness will remain every time you go to the General tab, until you select another plugin or VST Slot.

I have also tried using jBridger to create stub versions as you suggested - the results are the same.

Any suggestions? If anyone have gotten 64 bit VST(i)s to work using jBridge 1.5, can you please share your exact settings for both jBridge and the OpenMPT sound card settings (ASIO, buffer length, mixing quality etc.)?

By the way, are there any plans for native 64-bit support in the future, or is it a complete no-go?


Thank you.

Saga Musix

Quote from: Frank on November 25, 2012, 21:05:34
The plugin you linked to didn't work either, so I assumed the problem was on my side. After reinstalling both OpenMPT and jBridge, it could do the initial load of the 64 bit VST plugs without problems. After that, things go bad.
There's no reason why reinstalling OpenMPT would fix that problem, so it must have been a problem with jBridge to begin with.

Quote from: Frank on November 25, 2012, 21:05:34
When loading the 64 bit version of Native Instrument's Kontakt and adding a drumkit (less than 100Mb sample data), I experienced the Severe Popping bug logged here as 0000138. That issue was closed and deemed as not an OpenMPT bug, and rather a jBridge bug. I've read through the thread described in the bug log, but couldn't get a definite answer on if this is fixed in jBridge 1.5. But based on when that bug was described and when 1.5 came out, I would guess it should have been fixed by now.
That bug within jBridge has been fixed even before I implemented jBridge support, so I could never confirm it. There might of course be another bug in Kontakt which I'm not aware of, however when I installed the Kontakt 5 demo, it ran without problems back then. Are you maybe using an older version of Kontakt?

Quote from: Frank on November 25, 2012, 21:05:34I have played around with a bunch of settings but can't get rid of the popping and buzzing. The same thing happens at first with the Tube Amp VST you asked me to test. Any channel that used that VST got completely buzzed, but after restarting OpenMPT, that VST worked fine - until I let a single pattern loop for 10-15 minutes, than the distortion came back. No new samples or input during that time.
Tube Amp works perfectly within jBridge here, even after letting a module play for a while. Can you maybe provide a recording (try WAV export) of this buzzing? Does the problem also appear when using the 32-Bit version of this particular plugin?
The only way I could get OpenMPT to crackle when using this plugin is by generating excessive CPU load through other programs - maybe this is also your problem?

Quote from: Frank on November 25, 2012, 21:05:34The 64 bit version of Applied Acoustics' Strum Acoustic GS-1 has even more problems. Clicking the Edit button to open the VSTi GUI will take about 30 seconds, and an error message will appear: "Strum-acoustics GS-1 1.0 (ID: 140139057 has crashed. Last audiomaster opcode: 42. Last dispatcher opcode: 14".
That's a message generated by jBridge, not OpenMPT, so I dunno what it's doing there. Again, does the 32-Bit version of this plugin work in OpenMPT?

Quote from: Frank on November 25, 2012, 21:05:34Any suggestions? If anyone have gotten 64 bit VST(i)s to work using jBridge 1.5, can you please share your exact settings for both jBridge and the OpenMPT sound card settings (ASIO, buffer length, mixing quality etc.)?
I didn't change any settings in jBridge. OpenMPT is executed in administrator mode for it to work, using an ASIO driver at 5ms and 44KHz - pretty standard. I know that when I started using ASIO many years ago, I only had problems with in in OpenMPT, and the only solution to fix that was to reinstall the complete operating system.

Last but not least, it might help to try Psycle, which is very similar to OpenMPT and also has built-in jBridge support. If the plugins are broken in Psycle as well, it's definitely not an OpenMPT problem.

Quote from: Frank on November 25, 2012, 21:05:34By the way, are there any plans for native 64-bit support in the future, or is it a complete no-go?
Maybe in the far future. It would be far more important to get other things up to shape first before even attempting to do a 64-Bit build.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Frank

#4
Man, do I feel like a fool..
Turns out that the VSTi's mentioned that caused crashes didn't work for the 32bit versions either. I was so sure thay worked before, but that was with Cubase - which I have since uninstalled.
After uninstalling Cubase, I remember I wanted to clean up my VSTi Library a bit and therefore renamed and moved some of the VSTi folders to keep them all in one place for OpenMPT. I've never had problems with that before in OpenMPT, and most VSTis doesn't seem to care as long as all subfolders and other files than the actual VST dll remain the same. Turns out that was not the case.
FYI, VSTs from Edirol, Native Instruments, Rob Papen, SONiVOX, Steinberg and Waldorf doesn't seem to mind renaming the main VST folder and/or the dll name to have it more organized and look better in the OpenMPT Plugin Manager. But don't do this for VSTs from Applied Acoustics. They will crash your host app. To verify this and help others in the future, I even tried it on an old laptop that still had a copy of Cubase LE5 and did the same thing. Even Cubase crashed.

Side note: There might be more people than me that wants to (re)organize VSTis. It might be nice to be able to rename the VSTi title in OpenMPT. Today it just takes the file name of the .dll, making some of them hard to decipher.

Regarding the Tube Amp plugin, I can't reproduce the problem in songs that contain no VSTis. And at the time I was testing it before, I might have had a jBridged VSTi loaded, I'm not sure.

I am really, really sorry for getting you to investigate parts that I should have tested myself first.

I still have problems with the Kontakt 5 VSTi though.

The 32 bit problem
The main reason I want to get away from the 32 bit version is the memory limit. I often use a lot of "symphonic" instruments like different kinds of strings, brass, percussions, harps, grand pianos etc. Those sample banks tend to be quite large, and when using several of those banks at the same time in Kontakt, it results in a crash. This usually happens when the memory used by Kontakt goes to about 1GB. In Cubase this limit is around 3GB for the 32bit version. What happens in OpenMPT when (about) 1GB has been loaded by Kontakt is that the following Kontakt 5 message appears:
"PANIC: could not allocate enough memory. Application is likely to be unstable.
followed by "Kontakt 5 has encountered a major problem and has been terminated. A crashlog file has been created at the following location..."
. The crashlog is there, but it's a 0 byte file.

After that I get an OpenMPT Crash message:
"Unhandled exception 0xC0000005 at address 5DEDD192 occured in the notify thread. Debug information has been saved to...". A file named crash-notify.dmp in the mentioned folder exist, but this is also a 0 byte file so there is really nothing to analyze. The modified (.it) song is also there - nice feature by the way!

The 64 bit problem (using jBridge)
Sound gets distorted. Usually I can play a few notes, sometimes even for a few minutes without the distortion, which then hits full blast. I have attached a zipped mp3 file of me playing "live" using the 64 bit version of Kontakt in OpenMPT (quite a masterpiece, I'm very proud). Which sample library being used doesn't seem to matter, nor is the total size loaded the key. In the example, I have loaded a single instrument. Just to be absolutely detailed, there was about 15 seconds of silence in the middle of the song while I was fiddling with my headphones  that I cut away, but this is how it usually comes - quite abrupt.

Regarding your other answers/questions
Quote from: Saga Musix on November 25, 2012, 21:31:05
Are you maybe using an older version of Kontakt?
5.0.3.5812, last updated 2 months ago.

Quote from: Saga Musix on November 25, 2012, 21:31:05
The only way I could get OpenMPT to crackle when using this plugin is by generating excessive CPU load through other programs - maybe this is also your problem?
No, the CPU load rarely goes over 15%, most of the time it stays below 8%, even with multiple VST/VSTi plugins playing.
CPU: Intel Core i7-2600K (Quad 3.4Ghz)
RAM: 16GB DDR3, 1.6Ghz

Quote from: Saga Musix on November 25, 2012, 21:31:05
OpenMPT is executed in administrator mode for it to work, using an ASIO driver at 5ms and 44KHz - pretty standard.
I also have Max. Polyphony set to 256 (maximum) and SSE acceleration enabled. On the MIDI tab I only have two boxes checked: Respond to Play/Continue... and Pass MIDI to active instrument plugin.
Anything out of the ordinary?
Btw, the problems occur both when I have my external (USB) MIDI keyboad connected and when only using the computer mouse/keyboard.

Quote from: Saga Musix on November 25, 2012, 21:31:05
Last but not least, it might help to try Psycle, which is very similar to OpenMPT and also has built-in jBridge support. If the plugins are broken in Psycle as well, it's definitely not an OpenMPT problem.

I installed it and tried to figure out how to add and open VSTis, but didn't get it. Too tired now to start reading manuals (after midnight and haven't even had lunch yet). If it's vital for you that I do this I can make another try the coming weekend.

Thanks for trying to help, I really do appreciate it.

Saga Musix

Quote from: Frank on November 27, 2012, 23:09:56
Side note: There might be more people than me that wants to (re)organize VSTis. It might be nice to be able to rename the VSTi title in OpenMPT. Today it just takes the file name of the .dll, making some of them hard to decipher.

Maybe when I decide to move the plugin cache to a SQLite (or similar) database one day. Right now it's kinda difficult to store all this information. Besides, I think many hosts actually rely in the file name, so most plugin authors do actually consider this and use meaningful file names, don't they?

Quote from: Frank on November 27, 2012, 23:09:56
Regarding the Tube Amp plugin, I can't reproduce the problem in songs that contain no VSTis. And at the time I was testing it before, I might have had a jBridged VSTi loaded, I'm not sure.
It should be apparent from the plugin GUI if it's jBridged or not.

Quote from: Frank on November 27, 2012, 23:09:56The crashlog is there, but it's a 0 byte file.
Quote from: Frank on November 27, 2012, 23:09:56but this is also a 0 byte file so there is really nothing to analyze.
That really sounds like the application was severaly short of memory, so it couldn't even create a minidump (which is just a few KB in size) anymore. Anyway, I guess there's not much to analyze anyway in that case, because it's obvious what's going wrong...

Quote from: Frank on November 27, 2012, 23:09:56The 64 bit problem (using jBridge)
Sound gets distorted. Usually I can play a few notes, sometimes even for a few minutes without the distortion, which then hits full blast. I have attached a zipped mp3 file of me playing "live" using the 64 bit version of Kontakt in OpenMPT (quite a masterpiece, I'm very proud). Which sample library being used doesn't seem to matter, nor is the total size loaded the key. In the example, I have loaded a single instrument. Just to be absolutely detailed, there was about 15 seconds of silence in the middle of the song while I was fiddling with my headphones  that I cut away, but this is how it usually comes - quite abrupt.
This sounds indeed quite broken and like the CPU is starving. Does the problem persist or does it appear and disappear randomly? Have you tried using a higher audio buffer length? Have you tried adjusting quality settings in Kontakt? Does the problem also exist with WAV export?

Quote from: Frank on November 27, 2012, 23:09:56Anything out of the ordinary?
Nope, and it all doesn't really have anything to do with the problem.

Quote from: Frank on November 27, 2012, 23:09:56Btw, the problems occur both when I have my external (USB) MIDI keyboad connected and when only using the computer mouse/keyboard.
So are these reliable steps for reproducing the problem?

Quote from: Frank on November 27, 2012, 23:09:56
I installed it and tried to figure out how to add and open VSTis, but didn't get it. Too tired now to start reading manuals (after midnight and haven't even had lunch yet). If it's vital for you that I do this I can make another try the coming weekend.
This could be interesting for checking if it's just an OpenMPT problem. You'll have to set up a plugin path in Psycle (or create a NTFS hardlink to the Kontakt folder in Psycle's own "VstPlugins" folder, if that's easier for you), then double-click somewhere in the main window to add the plugin to the song. Then drag a connection from the added plugin to the "master" output  by using a right-drag. You should then be able to focus the instrument and use the keyboard to send notes to it.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

sso

wait, i thought ompt could not use 64bit?

and not fully utilize f.e all the 8 cores of a 2700k?


that would mean that when you are hitting 16% on the processor , thats about what ompt could use? so really starving the processor hitting those numbers?


i use a 2700k and i never run into cpu problems, i ran into problems though with amplitube3 but only memory vise, could only get 3 instances of amp3 to work at once, though only have 4gb memory and each instance of amplitube3 takes 1gb, so that was pretty neat actually. lol (yeah, i spent all my money on the processor:))


so, openmpt can actually use 64bit? i didnt even bother with installing the 64bit version of some of my vsts.

Saga Musix

#7
Quote from: sso on November 29, 2012, 16:45:27
wait, i thought ompt could not use 64bit?
Frank has quoted the important part from the FAQ in his very first post. In short: You need jBridge.

Quoteand not fully utilize f.e all the 8 cores of a 2700k?
OpenMPT's render thread uses one core, it's up to VST plugins to use more if they want. Of course it should be monitored if those 16% come all from one core (which would explain the issue) or if they are spread across multiple cores.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

sso


Frank

I just thought I should follow up.
I still have problems and have been trying all possible combinations of settings in MPT, jBridge, Kontakt and my sound card. Even updated my bios (since it is an on-board souncd card), completely reinstalled all drivers, Kontakt and jBridge with clean settings. Didn't help.
But I think that the fault is not in MPT or jBride, but in Kontakt iself. Sure, some of the problems seems to be related to jBridge since it sometimes crashes and leaves the processes open (and in turn crashes MPT), and when using the 32 bit version of Kontakt it can not load large banks without crashing MPT (not using jBridge at all).

I noticed that the problem most often occur when the CPU meter inside Kontakt peaks, which it does for brief moments sometimes along with the disk meter even though all samples are loaded to RAM and the CPU meter in the Windows Task Manager remains very low on all 4 CPU cores.

I don't know what this meter actually measures, as there seems to be no real correlation between the Kontakt CPU spikes and the actual CPU levels as seen in Task Manager. Anyone has any idea? I'm probably completely wrong here, but could it be that the sound card has it's own processor and that's what the Kontakt CPU meter shows? If so, could a new sound card solve this?

People seems to have this problem with Kontakt 5 also in other apps/DAWs, and from what I have found so far there is no real solution apart from waiting for a software update.

I will continue my investigation and report back if I find a solution, to help others in the same situation.

Saga Musix

Yeah, that sounds really weird, but CPU meters in applications can be very arbitrary sometimes. Sound cards don't usually come with any kind of processor that could be used to do anything but mixing audio down, so no, that CPU meter most certainly shows what your actual CPU is doing (or what Kontakt thinks it is doing). Is there maybe a "draft" setting in Kontakt that would reduce the sound quality but provide more stable sound?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Frank

#11
FINALLY!!
;D ;D ;D
I finally got it to work!
The problem seems to be based in the bitrate selected and the sound device used.

I was unaware that you could actually go in and edit the standard bitrate used for the sound card itself in windows, and though that the bitrate set in the applications (OpenMPT, Kontakt, ASIO4All) was the one actually being used. That didn't seem to be the case, at least not with the onboard SB X-Fi MB2 card (sound hardware actually made by Realtek).

To access this setting in Windows 7, I did the following. Note that I am using a Swedish version of Windows 7, so everything is roughly translated by me:

1. Open Control Panel > Sound.
2. Select the output unit (in my case Realtek High Definition Audio) and click the Properties button.
3. Click the advanced tab. Here you can set the standard sample rates. In my case, I can select 44000-192000 Hz, but only 16 or 24 bits - and for me it was pre-set to 24 bit, 48000 hz - this was the root cause of the problem!

The settings in OpenMPT doesn't allow you to use 24 bits, only 8, 16 and 32.

I then set the sample rate to 16 bit 96000 Hz, and did the same in OpenMPT using ASIO4ALL as sound device. No go. Tried both the stable 2.10 and the 2.11 beta, same thing. Turns out that no matter what settings you put in this dialogue in OpenMPT, they will be directly reset to 24 bit 48000 Hz if using ASIO4ALL.

I'm not sure if this is a bug in ASIO4ALL, OpenMPT, Windows or the driver, as it didn't matter if I also checked the Exclusive Mode settings (also in the Advanced tab) or not.

So I changed the sound device in OpenMPT to "Generic Low Latency ASIO Driver" - success! No more sample rate resets in OpenMPT, and I could keep the 16 bit 96000 Hz settings there as well!

I of course had tried all of available devices in OpenMPT with all sample rates possible before, but since none of them were 24 bit, the problem remained.

I recently rebuilt my complete music environment to solve this problem with fresh installs of everything. The Kontakt sample libraries on a brand new striped raid array easily reading 200MB/s, the program files on a very fast SSD, and I also overclocked my Core i7 to 4.4Ghz, so all 8 cores(threads?) was between 2-5% at all times. It simply couldn't be a performance issue for the machine itself.
My theory is that the sound card tried to convert all sounds to 24 bit with the previous standard settings, and couldn't keep up with it. This was likely done directly in the onboard sound card hardware, not using the main CPU. That's why task manager still showed very low CPU usage levels, and the resource manager (click the bottom button in Task Manager > Performance) showed no throttling in disk activity at all.

Sounds reasonable?

Anyway, I hope this helps someone in the future having similar problems.
:)

Saga Musix

Bit rate is not the same thing as bit depth, so this was a confusing read at first. You are talking about bit depth.
QuoteTurns out that no matter what settings you put in this dialogue in OpenMPT, they will be directly reset to 24 bit 48000 Hz if using ASIO4ALL.
That is correct, the appropriate bit depth is chosen by the ASIO driver, not by the client. The bit depth setting is only relevant for WaveOut and DirectX normally, since most ASIO drivers only allow for one setting, as far as I can see.

QuoteSounds reasonable?
Not really, since OpenMPT does convert between buffers of multiple bit depths (32-bit integer -> 32-bit floating point -> 32-bit integer -> final output resolution) multiple times during the mixing process, and I doubt that anyone could release a driver that would make the final bit depth conversion after OpenMPT's output so slow that it would make things stutter. This can't be the root of the problem. Glad to hear that it works, though.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Frank

Quote from: Saga Musix on December 31, 2012, 00:57:36
Bit rate is not the same thing as bit depth, so this was a confusing read at first. You are talking about bit depth.
Right you are, sorry for the mix up.

QuoteOpenMPT does convert between buffers of multiple bit depths (32-bit integer -> 32-bit floating point -> 32-bit integer -> final output resolution) multiple times during the mixing process, and I doubt that anyone could release a driver that would make the final bit depth conversion after OpenMPT's output so slow that it would make things stutter. This can't be the root of the problem. Glad to hear that it works, though.

Is this conversion done per sample? In some of my songs, I can see the current voices (as it says in Kontakt) going up to around 200, all instruments being used combined. If these voices are converted by the audio hardware one by one, it sounds to me like a lot of work to be done. And it doesn't stutter, more like distort. And if I stop the music and just play a single key with one of the instruments, it is still distorted, the only way to clear it is to restart OpenMPT. I also noticed that this distortion doesn't always affect all instruments. In a single instance of Kontakt I can have  the piano completely distorted while the drums (on a different MIDI channel) plays normally. Since the distortion is so severe, this can be hard to hear, but by muting the affected channel it's easy.
I can reproduce the problem easily by simply changing the bit depth back to 24 bits in the Windows settings, so it at least seems to have something to do with this.

Again, I have no idea how the audio is actually processed by the software, the drivers and then the hardware. Just thinking out loud. I'll shut up now about that.

Anyway it works now, and I can go back to actually making music and not just troubleshooting. :)

Saga Musix

QuoteIs this conversion done per sample?
No, it is first done per channel (to feed all pattern channels that route their audio to that specific plugin into it), and when the audio data leaves the plugin again, there are obviously just two streams to convert back (left and right audio channel), since a plugin doesn't output one stream per voice, but rather a mix of all voices.

QuoteIf these voices are converted by the audio hardware one by one, it sounds to me like a lot of work to be done
Give up the thought of hardware mixing - it's not 1995 anymore. All mixing is performed in software, even in Kontakt. It would have been a lot of work many years back, but converting a sound buffer between two formats is a trivial task for any halfway modern CPU these days.

QuoteI can reproduce the problem easily by simply changing the bit depth back to 24 bits in the Windows settings, so it at least seems to have something to do with this.
Yes, probably crappy drivers.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.