Jump to content


Photo
- - - - -

Sampler - Keymapping files by name


  • Please log in to reply
12 replies to this topic

#1 midi error

midi error

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 951 posts
  • Gender:Male
  • Location:The Chemical Plant Zone

Posted 22 December 2017 - 21:34

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


Edited by midi error, 23 December 2017 - 08:49.


#2 4Tey

4Tey

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 413 posts
  • Gender:Male

Posted 24 December 2017 - 10:25

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?



#3 midi error

midi error

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 951 posts
  • Gender:Male
  • Location:The Chemical Plant Zone

Posted 26 December 2017 - 14:15

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!



#4 midi error

midi error

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 951 posts
  • Gender:Male
  • Location:The Chemical Plant Zone

Posted 26 December 2017 - 14:32

SX3m5Kq (1).png

 

 

this is the result i'm aiming for 

 

 

 


Edited by midi error, 26 December 2017 - 14:33.


#5 4Tey

4Tey

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 413 posts
  • Gender:Male

Posted 26 December 2017 - 14:51

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.


Edited by 4Tey, 27 December 2017 - 11:23.

  • midi error likes this

#6 midi error

midi error

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 951 posts
  • Gender:Male
  • Location:The Chemical Plant Zone

Posted 26 December 2017 - 17:52

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  


Edited by midi error, 26 December 2017 - 17:53.


#7 4Tey

4Tey

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 413 posts
  • Gender:Male

Posted 26 December 2017 - 17:54

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

 

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


Edited by 4Tey, 26 December 2017 - 17:57.


#8 midi error

midi error

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 951 posts
  • Gender:Male
  • Location:The Chemical Plant Zone

Posted 26 December 2017 - 18:16

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  ^_^



#9 4Tey

4Tey

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 413 posts
  • Gender:Male

Posted 26 December 2017 - 18:20

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

 

You'll have to give me a moment midierror while I simplify this script....



#10 4Tey

4Tey

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 413 posts
  • Gender:Male

Posted 26 December 2017 - 18:55

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.


Edited by 4Tey, 27 December 2017 - 11:19.

  • midi error likes this

#11 midi error

midi error

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 951 posts
  • Gender:Male
  • Location:The Chemical Plant Zone

Posted 27 December 2017 - 09:45

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



#12 4Tey

4Tey

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 413 posts
  • Gender:Male

Posted 27 December 2017 - 11:22

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

Attached Files


  • midi error likes this

#13 midi error

midi error

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 951 posts
  • Gender:Male
  • Location:The Chemical Plant Zone

Posted 04 January 2018 - 10:46

Cool, thanks! I'll check it out