Can't get final quote right in the Text object

Apr 26, 2012 at 10:14am

Can't get final quote right in the Text object

Hi all,

I’m having a problem showing quotes after a string right in the Text object.
I attach the patch.

If you don’t have Jamoma and sigmund installed you should still be able to click this message:
open “Macintosh HD:/0RubenCsound/Samples/TrasuntinoFullRegisterSamplesDENOIS/Silv8-4-050denois.wav”

I want the remove “Macintosh HD:” since csound doesn’t need it, then add the quotes again. Removing anything before the first / would be even better, since it would also work when the disk has a different name.

prepend ” does the right thing, it’s ” in message box, and ” in the text.
append ” however shows as ” both is message box and in text.

What’s the secret code to get:
strset 5 , “/0RubenCsound/Samples/TrasuntinoFullRegisterSamplesDENOIS/Silv8-4-006denois.wav”
And not:
strset 5 , “/0RubenCsound/Samples/TrasuntinoFullRegisterSamplesDENOIS/Silv8-4-006denois.wav”

I can’t manage to do it with sprintf or tosymbol.
I would be happy for ideas!

Ruben

#63171
Apr 26, 2012 at 10:48am

don’t use [prepend "] [append ”], use [tosymbol] instead.

edit : ah. didn’t read it all. my bad. did you try [regexp] ?

edit : ah yes. my bad again. will have a more thorough look…

#227921
Apr 26, 2012 at 11:05am

so, it seems a message box won’t accept a symbol containing no space and with quote marks at each end. However hard you’ll try forcing him to do so, he’ll remove it. Didn’t know.

But… it seems to work this way :

– Pasted Max Patch, click to expand. –
#227922
Apr 26, 2012 at 11:08am

Why do you need the quote marks for a single symbol by the way ? Is it a format requirement for Csound strings or something ?

#227923
Apr 26, 2012 at 11:45am

Thank you very much! That patch solves the problem.

Yes, it’s the csound string format. I don’t think it will find the file if there are extra spaces.

Ruben

#227924

You must be logged in to reply to this topic.