Q: I need to dynamically build the name of the fmat (using sprintf, for example), and I can't find a way to do it with ftm.mess. (Mathieu Chamagne)
A (global): Organising your data into FTM structures is the way to go, because it is the only efficient way. You may need to change your coding style, but you will gain a better control over the data, to store and retrieve them, even with automated processes. (Jean-Philippe Lambert)
- Example Patch 1: Each fmat is created dynamically so you can add more buffers at any time in your piece. (Miguel Ortiz)
- Example Patch 2: Load each sound in a directory in a dynamically created fmat. (Jean-Philippe Lambert)
- Example Patch 3: Load soundfiles using drag and drop (files or entire folders) into a mat in dynamically created fmats (Adrian Gierakowski)
A (particular): Normal max messages won't work in this case because they only output a string (the message itself) while ftm.mess outputs a reference to the object you are calling. This creates then the problem that when you try to manipulate the names in the ftm.mess it treats $buf not as a string but as an object. It actually does this for anything that starts with '$', this character is not treated as a character but as a reference to a variable. (Miguel Ortiz)
Ref: This mailing list thread contains the original discussion and *many* example patches.