[PD] [PD-announce] Pd 0.52-2 released
To Pd-announce: Pd version 0.52-2 is available from http://msp.ucsd.edu/software.htm or (source only) via github: https://github.com/pure-data/pure-data . cheers Miller ___ Pd-announce mailing list pd-annou...@lists.iem.at https://lists.puredata.info/listinfo/pd-announce ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] how to write different types to [text]
On 27.03.2022 18:22, Christof Ressi wrote: I guess you should be able to do [3 3( -> [text get] to get the second sublist, but [3 4( -> [text get] should probably trigger an out-of-range error. I meant to write [0 3 3( -> [text get] and [0 3 4( -> [text get]... Another side note: it would be nice if a negative field count for [text get] would output all fields up to the next seperator (comma or semi). To retrieve a sublist, we would only need to know the *index*, i.e. [ -1( -> [text get] ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] how to write different types to [text]
There is no way to get the rest of the message. I think [text get] could simply output all sublists consecutively. By checking the right outlet you know if a message spans a whole line (= 0), or is part of a comma seperated list of messages (= 1). To be more precise: it should output all sublists when you request a *whole line* (field number = -1). If you have the following text: 1 2 3, foo bar baz, 5 6 7; [0( -> [text get] would output "1 2 3" (type 1), "foo bar baz" (type 1) and "5 6 7" (type 0) But how would you access individual sublists? I guess you should be able to do [3 3( -> [text get] to get the second sublist, but [3 4( -> [text get] should probably trigger an out-of-range error. But we do not know the indices and sizes of the individual sublists! Maybe [text size] could have an extra outlet to provide that information? Maybe output a list of indices? This definitely needs a bit of thinking... Christof ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] how to write different types to [text]
On 27.03.2022 11:01, Roman Haefeli wrote: On Sun, 2022-03-27 at 01:10 +0100, Christof Ressi wrote: In my experience, commas in [text] are broken... Best not to use them :-) What is the purpose of 'type' in [text] then? I find your advice of not using a feature because it is broken - frankly - disconcerting. If it's broken, then it ought to be fixed. Sure. I was a bit tongue-in-cheek :-) Currently, [text get] just strips all atoms after the first comma and outputs 1 (= colon) as the type. There is no way to get the rest of the message. I think [text get] could simply output all sublists consecutively. By checking the right outlet you know if a message spans a whole line (= 0), or is part of a comma seperated list of messages (= 1). Another issue that you have mentioned is that we can't *set* lines that include actual commas. One simply solution could be to add a flag to [text set] that interprets the list as *escaped* text, just like [text fromlist] The only case where commas do already work is in [text sequence -g]: foo 1 2 3, bar baz This//will indeed send the messages "1 2 3" and "bar baz" to destination "foo". Apparantly, FUDI uses both, commas and semicolons. In message boxes, they have a different meaning. The selector of a message after a semicolon is considered a send symbol. Everything after a comma i considered simply a message. comma *atoms* always have that meaning. It just appears to be different depending on which level you look at it: "patch file" VS "patch" A Pd patch files is really just a sequence of messages, and consequently it can make use of comma atoms as a shortcut, just like in your example: #X floatatom 26 77 5 0 0 0 - - -, f 5; That's really the same as: #X floatatom 26 77 5 0 0 0; #X f 5; (And you're right that it causes troubles when trying to parse Pd patch files within Pd.) When comma atoms are used inside a patch (e.g. in message boxes, [text define], etc.), they have to be escaped in the Pd patch file: #X msg 39 327 vis 0 \, vis 1; (In [text] it appears as a symbol atom, so it can be set and retrieved with [text set] and [text get].) Here's a combination of these two layers of meaning: #X msg 49 252 foo 1 2 3 \, 5 6 7, f 20; The first (escaped) comma belongs to the message box, but the second one will just send the following message to #X (= the current object). --- As a side note: although the comma in [foo 1 2 3, bar baz( and [;foo 1 2 3, bar baz( might seem to have different functionality, it really is the same. In the first case, the implicit receiver is the hidden /t_messresponder/ object, which just sends all messages to the message box outlet. Consequently, the message box will output 2 messages "foo 1 2 3" and "bar baz". In the second case, there is an explicit receiver "foo", which will receive the messages "1 2 3" and "bar baz". Christof ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] how to write different types to [text]
On Sun, 2022-03-27 at 01:10 +0100, Christof Ressi wrote: > In my experience, commas in [text] are broken... Best not to use them > :-) What is the purpose of 'type' in [text] then? I find your advice of not using a feature because it is broken - frankly - disconcerting. If it's broken, then it ought to be fixed. Apparantly, FUDI uses both, commas and semicolons. In message boxes, they have a different meaning. The selector of a message after a semicolon is considered a send symbol. Everything after a comma i considered simply a message. In texts, the distinction was not clear to me, but it seems the Pd patch format itself uses both: #X floatatom 26 77 5 0 0 0 - - -, f 5; the message 'f 5' defines the width of the number box. I'd like to be able to modify Pd files with [text], since I believe both [text] and the Pd parser use the same infrastructure for parsing and composing. However, it seems that types are only implemented in the parsing component of [text], but not in the composing part. Yes, I could use the new [file] facility to edit Pd patches as binary files, but it seems the wrong tool, since Pd patch format is FUDI and [text] works with FUDI. 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
[PD] array of arrays Data Structure
hi, anyone has a simple example of an array composed of arrays for me? I'm working on revising the documentation of Data Structures thanks ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list