Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only mono for vst3 #119

Open
DaveScream opened this issue Sep 6, 2022 · 3 comments
Open

Only mono for vst3 #119

DaveScream opened this issue Sep 6, 2022 · 3 comments

Comments

@DaveScream
Copy link

DaveScream commented Sep 6, 2022

C:\Program Files\Vstplugins\Flux\LevelMagic.vst\Contents\x64\LevelMagic.dll
C:\Program Files\Vstplugins\Flux\SpatV3.vst\Contents\x64\SpatV3.dll
play = e.make_playback_processor("play", np.zeros((2, 1)))
print(play.get_num_output_channels())

show 2 channels

play.set_data(audio)
print(play.get_num_output_channels())

show 2 channels

vst_plugin = e.make_plugin_processor(vst_name, vst_path)
print(f"{vst_name} i:{vst_plugin.get_num_input_channels()} o:{vst_plugin.get_num_output_channels()}")

show 1 output 1 input channels

trying to set 2 input 2 output or 2,1 or 1,2

print(vst_plugin.can_set_bus(2,2)) # false
print(vst_plugin.can_set_bus(2,1)) # false
print(vst_plugin.can_set_bus(1,2)) # false
print(vst_plugin.can_set_bus(1,1)) # true

Incompatible VSTs?

@DBraun
Copy link
Owner

DBraun commented Sep 6, 2022

Seems like the rare case of a mono VST. You could try making sure audio is shaped (1, T) where T is the number of samples before passing it to play.set_data(audio). Let me know if that works.

You can also use Faust to mix N channels to mono.

faust = e.make_faust_processor("faust")
N = 2
faust.set_dsp_string(f"process = si.bus({N}) :> _;")

@DaveScream
Copy link
Author

Seems like the rare case of a mono VST. You could try making sure audio is shaped (1, T)
You can also use Faust to mix N channels to mono.

No no, I need stereo. On input I have stereo, playbackprocessor have stereo output, but when im load these VSTs they have only 1 channel, and I cant set_bus to (2,2) to get stereo.

I got some VST chain host "VSTForx" it allow to load multiple VST. And it shows that 2 problematic VSTs above have multiple inputs and multiple outputs, but even with VSTForx they dont work in stereo.

If I use them in other daws (Ableton, FL Studio) - they work okay in stereo. But in dawdreamer only mono(((

@DBraun
Copy link
Owner

DBraun commented Sep 7, 2022

This one is different than the last example.

Expand mono to N channels:

faust = e.make_faust_processor("faust")
N = 2
faust.set_dsp_string(f"process = _ <: si.bus({N});")

Then

graph = [
    (play, []),
    (vst_plugin, [play.get_name()]),
    (faust, [vst_plugin.get_name()])
]
e.load_graph(graph)

The output will then be VST_plugin's mono output duplicated into 2 channels. Is that what you'd want?

Or maybe the output of VST plugin is supposed to be multiplied by both channels of play? Then try

faust = e.make_faust_processor("faust")
N = 2
faust.set_dsp_string(f"process(x, y, z) = x*z, y*z;")

graph = [
    (play, []),
    (vst_plugin, [play.get_name()]),
    (faust, [play, vst_plugin.get_name()])
]
e.load_graph(graph)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants