I'm trying to create a subpatch where I pass in a filename as a parameter. I want to send in a 'loadbang' signal, and then a message 'open $1' to an oggread~ object. I've tried 'symbol,' I've tried a few things. 'makefilename' doesn't seem to do what I want. Any ideas?
-
Subpatch with filename parameter
-
umm, by the sound of what you just wrote, you are trying to do something like this?
[pd my-subpatch /audio/samples/elvis.ogg]
if so, the " /audio/samples/elvis.ogg " bit will be completely useless.
instead of a subpatch, to do what you want, you'd need to make an abstraction.
then you could do: [my-abstraction /audio/samples/elvis.ogg]
and [symbol $1] inside that abstraction would substitute $1 for the filename.
-
duh, right, it's an abstraction, not a subpatch. I beg your pardon.
My abstraction has
[inlet]
|
[symbol $1(
|
[oggread~]I send my loadbang signal in the inlet. What's the difference between what you're saying and what I'm already doing?
-
aaack--that's not right either.... never mind. Had to save the abstraction to pick up my changes. It works now.