Skip to content

Can't set any parameters for TAL-BassLine-101 #191

@turian

Description

@turian

I am not able to get any sound from TAL-BassLine-101 if I try to set any parameters of the plugin.

To start, I demonstrate the plugin works fine from pedalboard:

from pedalboard import Pedalboard, load_plugin
from mido import Message # not part of Pedalboard, but convenient!
import torchaudio
import torch
import dawdreamer as daw

# Load a VST3 or Audio Unit plugin from a known path on disk:
instrument = load_plugin("/Library/Audio/Plug-Ins/VST3/TAL-BassLine-101.vst3")
instrument.load_preset("presets-TAL_BassLine_101/Solidtrax/Piano/ST_Electric_Piano_01.vstpreset")

# Render some audio by passing MIDI to an instrument:
sample_rate = 44100
audio = instrument(
  [Message("note_on", note=60), Message("note_off", note=60, time=1)],
  duration=2, # seconds
  sample_rate=sample_rate,
)

torchaudio.save("pb1.wav", torch.tensor(audio * 32767, dtype=torch.int16), sample_rate)

which gives us
pb1.webm

Now, let's load the plug-in using DawDreamer:

engine = daw.RenderEngine(sample_rate, 512)
engine.set_bpm(120.)

synth = engine.make_plugin_processor("synth", "/Library/Audio/Plug-Ins/VST3/TAL-BassLine-101.vst3")

# (MIDI note, velocity, start sec, duration sec)
synth.add_midi_note(60, 127, 0.0, 1)

engine.load_graph([
  (synth, []),
  ])

engine.render(2.)  # render 4 seconds.
audio = engine.get_audio()

torchaudio.save("dd10.wav", torch.tensor(audio * 32767, dtype=torch.int16), sample_rate)

An error message is thrown:

error: attempt to map invalid URI `/Library/Audio/Plug-Ins/VST3/TAL-BassLine-101.vst3'

but inspecting synth.get_parameters_description() suggests that the plug-in did load anyway (?!) and we do save audio:
dd10.webm

However, if I trying setting the parameters to values between 0 and 1:

engine = daw.RenderEngine(sample_rate, 512)
engine.set_bpm(120.)

synth = engine.make_plugin_processor("synth", "/Library/Audio/Plug-Ins/VST3/TAL-BassLine-101.vst3")
for i, p in enumerate(instrument.parameters.keys()):
    synth.set_parameter(i, instrument.__getattr__(p).raw_value)

# (MIDI note, velocity, start sec, duration sec)
synth.add_midi_note(60, 127, 0.0, 1)

engine.load_graph([
  (synth, []),
  ])

engine.render(2.)  # render 4 seconds.
audio = engine.get_audio()

torchaudio.save("dd11.wav", torch.tensor(audio * 32767, dtype=torch.int16), sample_rate)

then the rendered output is silence:
dd11.webm

Even if I just try loading a .vstpreset:

engine = daw.RenderEngine(sample_rate, 512)
engine.set_bpm(120.)

synth = engine.make_plugin_processor("synth", "/Library/Audio/Plug-Ins/VST3/TAL-BassLine-101.vst3")
synth.load_vst3_preset("presets-TAL_BassLine_101/Solidtrax/Piano/ST_Electric_Piano_01.vstpreset")
for i, p in enumerate(instrument.parameters.keys()):
    synth.set_parameter(i, instrument.__getattr__(p).raw_value)

# (MIDI note, velocity, start sec, duration sec)
synth.add_midi_note(60, 127, 0.0, 1)

engine.load_graph([
  (synth, []),
  ])

engine.render(2.)  # render 4 seconds.
audio = engine.get_audio()

torchaudio.save("dd12.wav", torch.tensor(audio * 32767, dtype=torch.int16), sample_rate)

again, the output is silence
dd12.webm

What am I doing wrong here?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions