< Back to IRCAM Forum

Help with patch

Hi All,

I am working to patches for selecting sounds inside conTimbre library.
I have a problem with the enclosed patch, that is a part of a more general patch.
Even if output A and output B are of the same type, I suppose, connecting them to input C the first one runs, the second one not.

Every help is welcome, thanks in advance

Fabio
help.omp (489.8 KB)

Dear Fabio,

We are missing a function: escape-space-in-list
So I am not able to test your patch. Moreover, the textfile in c is empty
If you can send the complete thing it will help debugging the patch :slight_smile:
Best
Karim

Dear Karim,

Sorry, I had not embedded the text into textrfile. Anyway here is the patch and the text to put inside C textfile.
help.omp (489.8 KB)
Anyway here is also the link to the text to paste inside the textfile:

About escape-space-in-list function I don’t know: I can put it in a OM patch simply by double clic and digiting complete name followed by enter, as usual for other functions. Only, this one as no autocompletion, you must write it completely.
I hope you have everything, thanks in advance, ciao

Fabio

Dear Fabio,

thank you for the missing file. However, the escape-space-in-list function is inaccessible to me. I believe it is a lisp code you use somewhere in your lisp files. Do you have some extra code loaded somewhere? what libraries are you using for this patch. Strangely, the patch has no library required. So i assume it is some lisp code you sliped somewhere in your init or user file.

If you happen to get across this function please send it to me, so i can see what’s wrong in your patch.

Best
K

Dear Fabio,

In fact, can you describe to me what are you trying to achieve in this patch? finding similarity names in files?

Best
K

hi Karim,

Really sorry, my fault: the functin is a new one I have saved in my workspace user. I enclose the file. Really sorry, I did not remember…

Ciao

Fabio
escape-spaces-in-list.lisp (565 Bytes)

I am developing some retrieve functions for the mp3 files of conTimbre library. So a part of the patch give me some dsounds names that I have selected searching for some spectral features, and the enclosed patch should retrieve the path of the file with that name. I hope it is clear…

Dear Fabio,

Thanks. Now i can see what the output is. In fact it is unnecessary tu use this function with A nor B, since there are no blank spaces in the namestring.
However, What are really you want to do here. If I understand you well, you need to output the complete pathname of the files you are selecting from A or B. Is it correct?

If it is so, it is running, but always returns a list of nil. I think the problem is in the loop ‘selezioni suoni’
Please do tell me what you want to do. We can manage a solution.

Best
K

Dear Fabio,

After analysis of your patch, I understood what you are doing here.
The problem with the B file, is that the names inside (the strings) are all downcase. that is why the search doesn’t find the corresponding string.

For instance in B you have: “viola.m0.ppp.jsv2773.mp3” and it should be viola.m0.ppp.Jsv2773.mp3
The A file is correct. Searching strings in lisp is case sensitive.

Distinti saluti

Karim

Dear Karim,

Thank you, now perhaps I can understand the problem. In B process I manage lists and only in a second phase strings. So I suppose that in managing lists the case sensitive has gone. Tomorrow I am out for examinations all day, as soon as possible I can to set again the process in B.

About spaces, yes, in this example there are no sound names wth spaces, but in the whole reservoire there are some, for example the names with the term “al ponticello”.

I think that by your suggestion I can afford the problem under another point of view, if I can not be able to resolve I will get in touch with you again. If I resolve I will put the solution in this diuscussion, if useful to someone other.

Meanwhile thank you very much.

Ciao

Fabio

Of course Fabio, please do.

Ciao
Karim

Dear Karim,

I think I have resolved. Perhaps in a not very elegant way, but it seems to me it runs. I enclose the last version of the patch if useful to someone.

Thank you again, ciao

Fabio

help.omp (2.1 MB)