Help! How to remove specific text from a [message]!
Hi guys. Thanks in advance for your help.
I have a project which needs to have a function to specify the location of a set of audio samples. I can get a combination of objects to output the filepath in the following way "Macintosh HD:/users/xxx/xxx/xxx." I have also worked out how to add the selected file extension path (.wav)
I cannot for the life of me however, work out how to remove the "Macintosh HD:" portion of text from the output message so that [sfplay~] will happily read the location.
Please see the patch below for context. I have tried [route] to no avail.
Thanks again
R
Perhaps you can escape the quotes in your [sprintf]. Here's an example of that, albeit much simpler than your patch. Click on the upper message box, select a file and it will play if the [ezdac~] is on:
And here it is for your example, more or less:
Point being: you don't want to remove the harddrive volume name portion of the file path. If, however, you would like to remove some text from a message, max easily lets you do that too via [regexp]:
Hi there! Thanks so much for your response - sorry for the massive delay, have't been working on that specific patch for a while and forgot I'd asked for help.
In the end, I have found the [conformpath max boot] message works very well for what I needed, but your methods will be invaluable in the future when I undertake some other projects I have planned.
Thanks again.
R