DBraun / DawDreamer

Digital Audio Workstation with Python; VST instruments/effects, parameter automation, FAUST, JAX, Warp Markers, and JUCE processors
GNU General Public License v3.0
929 stars 66 forks source link

VSTs doing nothing #143

Closed ggenesum closed 1 year ago

ggenesum commented 1 year ago

Hello,

Im trying to add reverb to an audio file using a vst plugin. Ive tried fabfitler and many other vst2/vst3 plugins I have. However, when I listen to the ouput.wav file, i hear the playback unchanged, with no reverb. When I display the plugin GUI, i can see the aggressive settings I should easily be able to hear if they were applied.

import dawdreamer as daw
import numpy as np
import random
from scipy.io import wavfile
import librosa

def load_audio_file(file_path: str, duration=None):

    file_path = str(file_path)

    sig, rate = librosa.load(file_path, duration=duration, mono=False, sr=SAMPLE_RATE)
    assert(rate == SAMPLE_RATE)

    return sig

DURATION = 120.

SAMPLE_RATE = 44100

engine = daw.RenderEngine(SAMPLE_RATE, 512)  # 512 block size
data = load_audio_file("edge.wav", DURATION+.1)
# Create a Playback Processor
playback_processor = engine.make_playback_processor("playback", data)

vst3_processor_proR = engine.make_plugin_processor("Pro-R", "C:\Program Files\Common Files\VST3\FabFilter\FabFilter Pro-R.vst3")

num_params = vst3_processor_proR.get_plugin_parameter_size()
for i in range(num_params):
    param_name = vst3_processor_proR.get_parameter_name(i)
    if param_name == "Mix":
        vst3_processor_proR.set_parameter(i, 1) #random.uniform(0, 0.4)
    else:
        vst3_processor_proR.set_parameter(i, random.uniform(0, 1))
print(vst3_processor_proR.get_parameters_description())
vst3_processor_proR.open_editor()
vst3_processor_proR.record = True

duration = 120.
# Load the processors into the render engine
engine.load_graph([
        (playback_processor, []),
        (vst3_processor_proR, ["playback"])
    ])

engine.render(duration)

output = vst3_processor_proR.get_audio()

wavfile.write("output.wav", SAMPLE_RATE, output.transpose())

# Get the processed audio data
processed_audio = engine.get_audio()
ggenesum commented 1 year ago

Is there a free VST that have been tested on windows i can use to test this code ?

DBraun commented 1 year ago

Can you try this plugin: https://github.com/DBraun/DawDreamer/blob/main/tests/plugins/Dimension%20Expander_x64.dll

Maybe you can test one parameter at a time rather than using random.uniform? That would be more reproducible and helpful for me.

Maybe it’s an issue of DawDreamer 0.6.15? Could you try 0.6.14? I’ll try it later today.

ggenesum commented 1 year ago

You were right, the random parameters where causing the reverb to be bypassed. I did not know fabfilter pro-R as a bypass as it is not shown in their interface.

elif not 'input' in param_name and not 'output' in param_name and param_name != 'Bypass' and param_name != 'Host Bypass':

fabfilter Pro-R is working perfectly with DAWDreamer on Windows.

ggenesum commented 1 year ago

Fabfilter Pro-Q is working on windows

DBraun commented 1 year ago

Great! Is there a remaining issue?

DBraun commented 1 year ago

Closing, please re-open if an issue persists.