-
Notifications
You must be signed in to change notification settings - Fork 68
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
Same output for all TALNoisemaker presets #122
Labels
bug
Something isn't working
Comments
Here is the code in case the colab goes down: # !wget -c https://tal-software.com/downloads/plugins/TAL-NoiseMaker_64_linux.zip && unzip -o TAL-NoiseMaker_64_linux.zip && rm TAL-NoiseMaker_64_linux.zip
# !mkdir presets && cd presets && wget 'https://tal-software.com//downloads/presets/TAL-NoiseMaker%20vst3.zip' && unzip -q -o "TAL-NoiseMaker vst3.zip"
# !pip3 install dawdreamer
# #!pip3 install git+https://github.com/csteinmetz1/auraloss.git@librosa
import glob
import dawdreamer as daw
# %matplotlib inline
import IPython.display as ipd
import matplotlib.pyplot as plt
import numpy as np
from scipy.io import wavfile
SAMPLE_RATE = 44100
BUFFER_SIZE = 128 # Parameters will undergo automation at this buffer/block size.
PPQN = 960 # Pulses per quarter note.
SYNTH_PLUGIN = "libTAL-NoiseMaker.so"
# Shuffle the order of the presets
import random
random.seed(0)
presets = list(glob.glob("presets/*.vstpreset"))
random.shuffle(presets)
def generate_sound(preset):
# TODO: Don't know why I have to do this over and over again
engine = daw.RenderEngine(SAMPLE_RATE, BUFFER_SIZE)
# Make a processor and give it the unique name "my_synth", which we use later.
synth = engine.make_plugin_processor("my_synth", SYNTH_PLUGIN)
assert synth.get_name() == "my_synth"
synth.load_state(preset)
# We can also add one note at a time, specifying a start time and duration, both in seconds
# synth.add_midi_note(60, 127, 0.0, 3.0) # (MIDI note, velocity, start, duration)
synth.add_midi_note(60, 60, 0.0, 3.0) # (MIDI note, velocity, start, duration)
# For any processor type, we can get the number of inputs and outputs
print("synth num inputs: ", synth.get_num_input_channels())
print("synth num outputs: ", synth.get_num_output_channels())
# don't do reverb
graph = [
(synth, []), # synth takes no inputs, so we give an empty list.
]
engine.load_graph(graph)
engine.render(4)
output = engine.get_audio()
# wavfile.write("foo.wav", SAMPLE_RATE, output.transpose())
print("mean", np.mean(np.abs(output)))
print("max", np.max(output))
print("min", np.min(output))
print("std", np.std(output))
# Can't get this to work
# ipd.Audio(np.mean(output, axis=0), rate=int(SAMPLE_RATE))
# plt.show()
preset = random.choice(presets)
print(preset)
generate_sound(preset)
preset = random.choice(presets)
print(preset)
generate_sound(preset) |
|
Okay. Curious what you can determine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are there any synths (not effects) that work under Linux. I have gotten Surge working under Linux but only using their Python API.
You can try yourself in this colab
Basically, it picks a random preset, plays it with fixed f0, note on, note off, and duration.
It does that again.
But both sounds are the same, as indicated by their summary statistics:
Why? Is this because
.so
plugings aren't working on Unix?Potentially related to #86 and #120
The text was updated successfully, but these errors were encountered: