How to correct errors in definition file for custom samples

R
Rajiv Deo posted Nov 1 '17, 07:40:

While using Dhilowitz version of Samplebox, I am getting following error -

Error in definition file, skipping line 1.
Preset empty: 0

How to debug this error?

My definition file contains -

%midinote_*vel%velocity_%seq.wav

G
Glenn posted Nov 3 '17, 21:33:

Error in definition file, skipping line 1
This error message may appear if there is a blank line in the definition file (i.e. the second line)

R
Rajiv Deo posted Nov 5 '17, 13:22:

There is no blank line after the first line in my definition file. Samples get loaded if I replace "_%seq" with "*"

Please help...

G
Glenn posted Nov 6 '17, 18:16:

It would be useful if the "Error in definition file" message would indicate exactly what the error is, or at least show the part of the text it did not understand.

H
HansEhv posted Nov 7 '17, 23:49:

@Rajiv:
You might add a recognition string in the wav name:
%midinote_vel%velocityseq%seq.wav
That way the patternmatching won't be confused by the "
" appearing earlier in the line.
If this works, "%midinote_
vel%velocity*seq%seq.wav" will also work, giving you more flexibility.

@Glenn:
True, that would be nice.
Because of the way the pattern matching works this is not possible: the script does not break on a particular part of text. Instead after trying all possibilities it concludes that it can't make enough sense of it so it decides to skip the line with this rather obscure message.
But it's DIY, so....

H
HansEhv posted Nov 7 '17, 23:51:

sorry, got caught by the formatting: please ignore the italics and read "" as _

H
HansEhv posted Nov 7 '17, 23:53:

.and a _ between %velocity and seq%velocity...

R
Rajiv Deo posted Nov 9 '17, 05:45:

Sorry. I am still confused about the exact syntax to be used in the definition file for realizing randomization of samples

my sample files are -
48_sample5_vel_60
48_sample1_vel_80_1
48_sample2_vel_80_2
48_sample4_vel_80_3
48_sample3_vel_100_1
49_sample6

Some samples for a note (48_sample5_vel_60) are not to be randomized as no random number is specified in the file name.
Some samples (49_sample6) should be played at all velocities as no velocity or random number is specified in the file name.

My definition file is -
%midinote_*vel%velocity_%seq.wav

What corrections I need in file names or definition file so that randomization works? I hope parsing logic has been tested for all these conditions.

I know this is "DIY" but any help would be highly appreciated. Many thanks.

H
HansEhv posted Nov 9 '17, 06:31:

Hello Rajiv,
My answer got blurred by the way the forum treats underscores. I will use - now where I mean underscore.
I suggest to rename your files, so you would get things like :
48-sample2-vel80-seq2
And use pattern:
%midinote*-vel%velocity-seq%seq.wav

I don't have this build, so can't check. But guess the pattern matching chokes on the first underscore as it expects a seq# after a dash.
The matching does not work left to right but by keyword.
As this is a built-in procedure it is not possible to indicate what keyword is the culprit.
...hence the diy: if better error messages are needed, the pattern matching should be written out.

Hope this helps.

R
Rajiv Deo posted Nov 9 '17, 13:32:

Thanks for clarification. What would be naming guidelines for the other two use cases -

  1. Some samples for a note (48_sample5_vel_60) are not to be randomized as no random number is specified in the file name.
  2. Some samples (49_sample6) should be played at all velocities as no velocity or random number is specified in the file name.

Please provide clarity on the two above use cases for me to try out my sample set and post the results back for the benefit of others.

H
HansEhv posted Nov 9 '17, 15:15:

Sorry Rajiv, I don't know.
I did not build and even never used this fork. I also will not include this feature in mine.
Just tried to help you in making filenames that pattern matching might like.
But logic dictates that when the recognition string of a keyword is not present in the filename, a default action should be taken. In this case I'd say no randomization.

R
Rajiv Deo posted Nov 17 '17, 06:31:

Can you suggest some stable build in the form of image file which supports both velocity sensitivity and randomization of samples?

H
HansEhv posted Nov 17 '17, 14:50:

Alex's build has image, velocity, randomization and documentation

...

  (not published)
  I want to post as guest
 

Post