[PD-dev] using the PD filepath in an external?

Iain Duncan iainduncanlists at gmail.com
Thu Jun 10 00:31:17 CEST 2021


Ah got it, presumably I get what I'm looking for in char *dirresult?

assumption taken from:
EXTERN int open_via_path(const char *dir, const char *name, const char *ext,
    char *dirresult, char **nameresult, unsigned int size, int bin);

thanks again!

On Wed, Jun 9, 2021 at 3:28 PM Miller Puckette <msp at ucsd.edu> wrote:

> Yeah... open_via_path and scoop up the full path it reports back - then
> close the file and let s7 reopen it :)
>
> M
> On Wed, Jun 09, 2021 at 03:26:35PM -0700, Iain Duncan wrote:
> > Thanks Miller. Looking at that example, this seems to be a way to open
> and
> > read in the whole file into C, which I could do, but the path of least
> > resistance for me so far has been to pass the actual loading to s7. Is
> > there a way to just get the full path for a file found from the Pd
> > filepath? (if not, I suppose I'll read the file in and the eval_string on
> > it or something...)
> >
> > thanks!
> > iain
> >
> >
> > On Wed, Jun 9, 2021 at 3:13 PM Miller Puckette <msp at ucsd.edu> wrote:
> >
> > > open_via_path() should do it.  See for instance open_soundfile() in
> > > d_soundfile.c
> > >
> > > cheers
> > > M
> > >
> > > On Wed, Jun 09, 2021 at 02:57:16PM -0700, Iain Duncan wrote:
> > > > Hi folks, I tried to google this, but of course am swamped with
> results
> > > on
> > > > how to load things in the patcher instead of what I'm looking for.
> Can
> > > > anyone point me at how to use the filepath to load files in an
> external?
> > > In
> > > > Max I have s4m find the fullpath for the bootstrap files and then
> load
> > > them
> > > > up through s7s native load function with the fullpath. If anyone has
> an
> > > > example of something similar for Pd, that would be lovely!
> > > >
> > > > thanks
> > >
> > > > _______________________________________________
> > > > Pd-dev mailing list
> > > > Pd-dev at lists.iem.at
> > > >
> > >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Ddev&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=39U4MIEK2DpJZblMb2hW4LrL86NA-Fm7lh9jTc1PtDw&s=uthX9eWCbvFepVl85UPukc4ORK0FbfTxuf-LSSYwmD0&e=
> > >
> > >
> > > --
> > >
>
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20210609/f4a2838e/attachment.htm>


More information about the Pd-dev mailing list