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):
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.