The above code are all parameters that arent needed. So I want to delete them from all 250 presets. The value can be different for all presets… And then other certain parameters I need to scale, all values are scaled from 0 to 1, I want to be able to scale them from e.g. -1 to 1.
My main question is, how do I go about this?
I tried using regex, but that quickly got out of hand ( or out of my league) with multiple lines, etc…
I tried python, but python syntax gets in my way because of all the tabs and python syntax present in the blocks I wanna delete.
Are there simpler ways to do this? Or is getting deeper into python my best option?
I would likely go the Python route since it is more accessible and can later be more easily modified. Perhaps chose “scaling” or “deleting” as your first topic, write some code and ask for advice here, if something is not working as expected…? There are some Pythonistas around and we will surely figure this out.
I don’t have my device nearby, can you attach a preset file? I don’t recognize the format, but there’s likely a parser available and if not it looks easy enough to handle with a few lines of code.
As a starting point, here’s a script that will take a preset file and remove the “0-value” items:
import rdflib
from rdflib.namespace import RDF
# Define the namespaces
LV2 = rdflib.Namespace('http://lv2plug.in/ns/lv2core#')
PSET = rdflib.Namespace('http://lv2plug.in/ns/ext/presets#')
def remove_zero_value_ports(file_path):
# Create a graph
g = rdflib.Graph()
# Parse the Turtle (TTL) file
g.parse(file_path, format='turtle')
# Find all lv2:port triples and store the ones with value 0
ports_to_remove = []
for _, _, port_node in g.triples((None, LV2.port, None)):
value = g.value(port_node, PSET.value)
if value is not None:
try:
value_float = float(value)
if value_float == 0.0:
# Mark the entire port node for removal
ports_to_remove.append(port_node)
except ValueError:
# Handle the case where the value is not a number
pass
# Remove the identified port nodes from the graph
for port_node in ports_to_remove:
# Remove all triples associated with this port node
for triple in g.triples((port_node, None, None)):
g.remove(triple)
# Remove the triple that links this port node to the preset
g.remove((None, LV2.port, port_node))
# Saving the modified graph back to a Turtle file (optional)
g.serialize('modified_preset.ttl', format='turtle')
# Print the graph (optional)
print(g.serialize(format="turtle"))
# Replace with the path to your .LV2 file
remove_zero_value_ports('/Users/brian/Downloads/Piano_mod_default.ttl')
Thanks for the responses, I ended up using regex mostly.
Got all the original TAL presets up and running on my mod, but still alot of them are silent.
Got to still figure out how that comes…
I like these presets alot, because they are ordered on type : FX, PD (pad), KB (keyboard), DR (drum), etc… which gives you the possibility to rapidly find something in the genre you look for, and then alter it untill you like it.
So I got them working, turned out that the bitcrusher was reversed, being fully on apparently crushes the patch silent. 260+ Presets.
Conclusions so far:
the sound is … well rough. Noise one could almost say without the additional effects present in the original TAL, its more rough. Defo need to add reverb, delay and chorus to most of the patches at minimum, but here comes the mod power into play as that you can add alot more effects even…
names not always reflect the sound anymore, e.g. “clouds in the rain” , well if the rain is generated from white noise (vintage noise in the original TAL), well that wont be present in the MOD version. Add your own noise
Also, how do I share this? Do I ask trough github for an update for the presets? Upload a fork with my presets on github?
Edit: also, does anyone ever use this synth for drums? I am contemplating removing the drum presets.
SSH into your mod, go to the .lv2 folder containing TAL Noisemaker ME. Replace both manifest.ttl and presets.ttl
This way you don’t have to build the plugin again. I have created a pull request with the MOD TAL noisemaker so they can update if they want, but it’s unclear if they still support the noisemaker even.
So, to recap:
Added all the original presets present in the TAL noizemaker. I also added the original MOD ones.
presets are arranged according to the type of sound they produce. Preset types
include:
• Arpeggiated (ARP)
• Bass (BS)
• Chords (CH)
• Special Effects (FX)
• Keyboards (KB)
• Leads (LD)
• Pads (PD)
This will improve overal usability for the mod version of this synth imho, showcasing the capabilities of the noisemaker.
I deliberately removed the drum patches, as I suspect most will use the noisemaker as a synth.
I honestly don’t know. I made a pull request, so for MOD it shouldn’t be much work to recompile and update on their platform.
But the original maintainers, @BramGiesen has last been seen here 3 yrs ago, @jesse has been seen in febr '23 last in these forums.