Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
You can also use [declare -path] to set paths for soundfile ala [declare -path .] etc. > On Jan 11, 2022, at 2:50 PM, pd-list-requ...@lists.iem.at wrote: > > Message: 2 > Date: Tue, 11 Jan 2022 14:11:59 +0100 > From: Roman Haefeli mailto:reduz...@gmail.com>> > To: Pd-List mailto:pd-list@lists.iem.at>> > Subject: Re: [PD] Install path assumptions for [soundfiler] vs [file > glob] > Message-ID: <8fa2486ced7b36ea837d36be535d1202ad20bfe8.ca...@gmail.com > <mailto:8fa2486ced7b36ea837d36be535d1202ad20bfe8.ca...@gmail.com>> > Content-Type: text/plain; charset="utf-8" > > On Tue, 2022-01-11 at 11:31 +, Pierre Alexandre Tremblay wrote: >> Dear all >> >> I am wondering if I my assumptions are wrong, or if there is a >> discrepancy that needs solving (or not.) >> >> Setup: if one installs objects like our flucoma.org <http://flucoma.org/> >> bundle, one might >> have stuff included in the help, like media files. To make a clean >> install, we have put all of them in a folder called media/ >> >> The behaviour I rely on for the held-files is that [soundfiler] will >> find, for instance, [read -resize media/mysound.wav] (see attached >> file) > > > If 'media' lies near the patch, yes. From what I understand, when given > a relative path to [soundfiler] (and many other objects), it'll try all > search paths, starting with the directory of the path. Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/> ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
On Tue, 2022-01-11 at 17:46 +0100, Christof Ressi wrote: > > I wondered if there was a way to get the path to a given object > > help, like in SuperCollider > > > > FluidBufAmpGate.class.filenameSymbol > Yes, that's possible with [file which] Yay, we finally have a way to programmatically check if dependencies have been installed/configured correctly :-) Roman signature.asc Description: This is a digitally signed message part ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
Indeed I can ask for the help file!!! Thanks! > On 11 Jan 2022, at 16:46, Christof Ressi wrote: > > >> I wondered if there was a way to get the path to a given object help, like >> in SuperCollider >> >> FluidBufAmpGate.class.filenameSymbol > Yes, that's possible with [file which] > > > > > ___ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list smime.p7s Description: S/MIME cryptographic signature ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
I wondered if there was a way to get the path to a given object help, like in SuperCollider FluidBufAmpGate.class.filenameSymbol Yes, that's possible with [file which] ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
> > I was hopeful to get [file which] to give me the path of [media/] but no > luck. It should allow you to get the path of [media/mysound.wav] though. Le mar. 11 janv. 2022 à 14:41, Pierre Alexandre Tremblay a écrit : > Thanks Roman for the fabulous answer. > > > If 'media' lies near the patch > > It doesn’t actually. It seems to work from wherever I am on my machine. > > > TLDR: Unlike many other file accessing objects like [soundfile], > > [reasf~], [textfile], etc. [file] doesn't use search paths¹. > > With that footnote, I was hopeful to get [file which] to give me the path > of [media/] but no luck. > > I’ve also tried to find a way to get [dir] from pdcontrol… I wondered if > there was a way to get the path to a given object help, like in > SuperCollider > > FluidBufAmpGate.class.filenameSymbol > > Anyway. Good to know that it is not me. Thanks again for the > reply.___ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list > ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
On Tue, 2022-01-11 at 13:41 +, Pierre Alexandre Tremblay wrote: > > With that footnote, I was hopeful to get [file which] to give me the > path of [media/] but no luck. [file which] only searches for files in all search paths. It doesn't work for directories. > > I’ve also tried to find a way to get [dir] from pdcontrol My suggestion was to use the message 'dir' sent to [pdcontrol] object: [dir( | [pdcontrol] This returns the directory of the patch. You said that the media folder is not located near your patch. So, I assume it is in your search paths then. Then I don't know to get its location as absolute path. Sorry. Roman signature.asc Description: This is a digitally signed message part ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
Thanks Roman for the fabulous answer. > If 'media' lies near the patch It doesn’t actually. It seems to work from wherever I am on my machine. > TLDR: Unlike many other file accessing objects like [soundfile], > [reasf~], [textfile], etc. [file] doesn't use search paths¹. With that footnote, I was hopeful to get [file which] to give me the path of [media/] but no luck. I’ve also tried to find a way to get [dir] from pdcontrol… I wondered if there was a way to get the path to a given object help, like in SuperCollider FluidBufAmpGate.class.filenameSymbol Anyway. Good to know that it is not me. Thanks again for the reply. smime.p7s Description: S/MIME cryptographic signature ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] Install path assumptions for [soundfiler] vs [file glob]
On Tue, 2022-01-11 at 11:31 +, Pierre Alexandre Tremblay wrote: > Dear all > > I am wondering if I my assumptions are wrong, or if there is a > discrepancy that needs solving (or not.) > > Setup: if one installs objects like our flucoma.org bundle, one might > have stuff included in the help, like media files. To make a clean > install, we have put all of them in a folder called media/ > > The behaviour I rely on for the held-files is that [soundfiler] will > find, for instance, [read -resize media/mysound.wav] (see attached > file) If 'media' lies near the patch, yes. From what I understand, when given a relative path to [soundfiler] (and many other objects), it'll try all search paths, starting with the directory of the path. > First question: am I right to do so (not ethically, but in term of > path resolution to installed libraries) From what I understand: yes. > — > If I am right that it should find the file (as it does), let’s > continue: > > Second question: should [file glob] resolve [symbol media/*.wav] ? > Because it doesn’t and that makes me doubt the whole world. I guess you missed this whole thread from a few days ago: https://lists.puredata.info/pipermail/pd-list/2022-01/130639.html TLDR: Unlike many other file accessing objects like [soundfile], [reasf~], [textfile], etc. [file] doesn't use search paths¹. Relative paths given to it are resolved against the current working directory, which is the start location of Pd (which is your user home when starting Pd from menu). [symbol media/*.wav(->[file glob] doesn't work unless you started Pd from the location where your patch resides. Until there is a pure [file]-based solution, you could use [dir( - [pdcontrol] to get the directory of your patch, append '/media/*.wav' to it and feed that to [file glob]. Roman ¹ [file which] does traverse all search paths, but it doesn't work for directories or for globs. signature.asc Description: This is a digitally signed message part ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
[PD] Install path assumptions for [soundfiler] vs [file glob]
Dear all I am wondering if I my assumptions are wrong, or if there is a discrepancy that needs solving (or not.) Setup: if one installs objects like our flucoma.org bundle, one might have stuff included in the help, like media files. To make a clean install, we have put all of them in a folder called media/ The behaviour I rely on for the held-files is that [soundfiler] will find, for instance, [read -resize media/mysound.wav] (see attached file) First question: am I right to do so (not ethically, but in term of path resolution to installed libraries) — If I am right that it should find the file (as it does), let’s continue: Second question: should [file glob] resolve [symbol media/*.wav] ? Because it doesn’t and that makes me doubt the whole world. — Thanks for your help as usual pa smime.p7s Description: S/MIME cryptographic signature ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list