Sampler - Keymapping files by name


(midi error) #1

Hi,

How possible is it to import a load of samples to renoise and have it map them based on filename?

Eg

Synth_Bass_C1

Synth_Bass_C2

Synth_Bass_C3

Would it be possible to set this parameter as the root note of the sample, as well as the low/high note?

Would appreciate any help with this!

thanks

midierror


#2

How possible is it to import a load of samples to renoise and have it map them based on filename?

I would imagine (from the little info above) that it is scriptable midierror?


(midi error) #3

i think it probably is, ive got no idea where to start though!

scripting and terminal editor… ive done guru patches before but no idea what to do here.

any help is appreciated!


(midi error) #4

7840 SX3m5Kq (1).png

this is the result i’m aiming for


#5

Well, the only real advice I can give you merror (from what you’ve said so far) is to look at pattern matching strings in lua and the interface from the API to the samples and keymaps in Renoise.

But to try and give you an example that you can look at yourself I’ll attach a starter. This should add a menu item to the instrument sample box (right click) ‘Import Samples…’ It should bring up a file requester. The way the sample filename is now encoded is (for example):

choirsample!!bn_c3 nr_c2,f3!!.wav

that should load in that sample and set the base note to C3 and the note range from C2 to F3. As you can see the settings for the sample are surrounded by two exclamation marks !!..!!

Other example filenames:

testsamp!!bn_d#4!!.wav <- set base note to d#4
testsamp!!nr_f#5,a9!!.wav <- set note range to f#5 to a9
testsamp!!bn_c2 nr_c3,c3!!.wav <- set base note to c2 and note range to c3-c3
testsamp!!bn_f#3 nr_d3,d3 vl_08,7c!!.wav <- base note=f#3 note range=d3-d3 and velocity level 8-7c

Might give you some idea midierror of how you would go about writing it.


(midi error) #6

cool thanks for your help! with this much code i should be able to work it out.

a great help…although none of the samples are importing?

Essentially, I want it to find (A-G)(0-9) in any filename and place it on that key only, and set that as the root note


#7

Sure midierror, if you have this filename (for example):

midierrorsample_A1.wav

that won’t work. But if you rename it to:

midierrorsample!!bn_a1 nr_a1,a1!!.wav

then it might :slight_smile:

Edit: of course it would be up to you to modify the script for what you want it to do.


(midi error) #8

Right… I really don’t want to rename the files!

I’d like it to find those characters in any filename and assign it a note from that. So the data will be in the filename anyway as each file will only span one note

I understand I cant ask you to make this but i’m already struggling to understand what you sent me! - is it possible that you can annotate what youve made already so i can understand what each part is doing?

im very grateful for your help :slight_smile:


#9

Sure, I’ve written a more advanced script so annotating probably wouldn’t help all that much…and why did I just know you wouldn’t want to rename the files? :slight_smile:

You’ll have to give me a moment midierror while I simplify this script…


#10

So given a filename like:

midierrorsample_A1.wav

should set the base note and note range to A1. Can’t guarantee that it is exactly fool proof or anything with every filename midierror.


(midi error) #11

thanks… it would be very useful to annotate the code so i can see whats happening… that way i can develop it


#12

With a touch more annotation… Although I would take with a pinch of salt midierror as it is just a quick hack up :slight_smile:


(midi error) #13

Cool, thanks! I’ll check it out