Hello, I'm trying to initialize a delwrite~ object with varying msec length. I don't seem to be able to pass the length as a variable and into the creation argument. Am I trying something horribly stupid, or is there a way to do that? Thanks
On 2010-02-04 14:00, Ignacio Lois wrote:
Hello, I'm trying to initialize a delwrite~ object with varying msec length. I don't seem to be able to pass the length as a variable and into the creation argument. Am I trying something horribly stupid, or is there a way to do that? Thanks
[delwrite~ <delname> 1000]
you cannot change the length of the delayline once the object is instantiated. (of course you can change the actual delay dynamically in the [delread~] object; but the maximum delay is fixed)
fgmadr IOhannes
The current help patch for [list] family objects doesn't mention what kind of messages [list] outputs.
I remember reading somewhere (maybe on puredata.info) that for messages consisting of two or more atoms/elements, [list] will output a list, and for empty lists and 1-element messages [list] will output a bang or float/symbol messages, respectively.
But as far as I can tell, [list] doesn't do any conversion at its outlet-- everything it outputs will have the selector "list", and it's up to other objects like [route] to do any conversion they deem necessary.
For example, take the bug with sigbinops:
[put anything you want in this message box(
|
[list]
|
[+~ ]
error: inlet: expected 'signal' but got 'list'
So I'm guessing that [list append/prepend/split] always output messages with the "list" selector. This would seem consistent with the behavior at the inlets.
Do I have this right?
Thanks, Jonathan
My top 3 related annoyances (in pd-0.41-4 on Linux).
Jonathan Wilkes wrote:
The current help patch for [list] family objects doesn't mention what kind of messages [list] outputs.
I remember reading somewhere (maybe on puredata.info) that for messages consisting of two or more atoms/elements, [list] will output a list, and for empty lists and 1-element messages [list] will output a bang or float/symbol messages, respectively.
I think the conversion is done at inlets of co-operating objects, rather than outlets. Probably the conversion work is duplicated if you fan-out, possibly also the source code to do the conversion is duplicated too (but I haven't investigated).
But as far as I can tell, [list] doesn't do any conversion at its outlet-- everything it outputs will have the selector "list", and it's up to other objects like [route] to do any conversion they deem necessary.
For example, take the bug with sigbinops:
[put anything you want in this message box( | [list] |
[+~ ]
error: inlet: expected 'signal' but got 'list'
So I'm guessing that [list append/prepend/split] always output messages with the "list" selector. This would seem consistent with the behavior at the inlets.
Do I have this right?
Thanks, Jonathan
#N canvas 0 0 450 300 10; #X obj 55 170 *~; #X obj 70 141 route 1; #X msg 70 112 1 2; #X msg 161 108 1; #X obj 161 140 list trim; #X obj 146 169 *~; #X msg 252 110 list 1; #X obj 252 139 route list; #X obj 309 166 print; #X text 50 51 pd-0.41-4 on Linux has 3 annoyances (or more..); #X connect 1 0 0 1; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 5 1; #X connect 6 0 7 0; #X connect 7 1 8 0;
--- On Thu, 2/4/10, Claude Heiland-Allen claudiusmaximus@goto10.org wrote:
From: Claude Heiland-Allen claudiusmaximus@goto10.org Subject: Re: [PD] [list] output To: "Jonathan Wilkes" jancsika@yahoo.com Cc: pd-list@iem.at Date: Thursday, February 4, 2010, 6:22 PM My top 3 related annoyances (in pd-0.41-4 on Linux).
- "1 2 "--[route
1 ]--[*~] // inlet~ no method for list 2. "1 "--[list trim ]--[*~] // inlet~ no method for list 3. "list 1"--[route list]--.... // outputs on "unmatched" outlet
So would you also want [list( -> [route list] to output on the "list" outlet?
-Jonathan
hello
But as far as I can tell, [list] doesn't do any conversion at its outlet--
everything it outputs will have the selector "list", and it's up to other objects like [route] to do any conversion they deem necessary.
For example, take the bug with sigbinops:
[put anything you want in this message box( | [list] | [+~ ]
error: inlet: expected 'signal' but got 'list'
[1, 1 2, a, a b, a 2 b ( | [list ] | [print ]
gives the following (0.42-5):
###### print: 1 print: 1 2 print: symbol a print: list a b print: list a 2 b ######
so [list ] does some kind of conversion. what i don't understand is why there is no selector printed in the first two messages, where only numbers are present.
anyways, you should provide [+~ ] operator with an argument if you want it to expect messsages instead of a signal (check help patch) :-)
ciao
--- On Thu, 2/4/10, ypatios ypatios@gmail.com wrote:
From: ypatios ypatios@gmail.com Subject: Re: [PD] [list] output To: "Jonathan Wilkes" jancsika@yahoo.com Cc: pd-list@iem.at Date: Thursday, February 4, 2010, 6:31 PM hello
But as far as I can tell, [list] doesn't do any conversion at its outlet--
everything it outputs will have the selector "list", and it's up to other
objects like [route] to do any conversion they deem necessary.
For example, take the bug with sigbinops:
[put anything you want in this message box(
|
[list]
|
[+~ ]
error: inlet: expected 'signal' but got 'list'
[1, 1 2, a, a b, a 2 b ( | [list ] | [print ]
gives the following (0.42-5):
###### print: 1 print: 1 2 print: symbol a print: list a b print: list a 2 b
######
so [list ] does some kind of conversion. what i don't understand is why there is no selector printed in the first two messages, where only numbers are present.
As far as your output from [print] goes:
For "1" and "1 2", they are an implicit float and implicit list, respectively. This is a convenience feature of Pd: you don't have to type "float 1" every time you want to send a number from a msg box to a [+] object, for example.
For "list a b" and "list a 2 b", you would expect this because all non-list messages are converted to lists at the _inlets_ of the [list] object.
So that leaves "symbol a" unexplained: why isn't it "list a" if my theory is correct? It's because the [print] object decided to print it that way: it receives a message "list a" and calls the print_list method, which decides to print "symbol a" instead of "list a".
Here's a trick that shows clearly what is happening in Pd 0.42-5, using the -n flag of [print], which suppresses the word "print":
[1( | [print]
[1( | [print -n]
For the first one, the print_method (x_interface.c) prints the word "print", followed by a colon, and the float itself. For the second one, the word "print" is absent, so print_method then decides not to print a colon either. Only the float is printed.
However, consider the following:
[1( | [list] | [print -n]
Now the [print] calls the method print_list because the incoming message is a list. How do I know this? Because of a bug: instead of just printing the float-atom (as above), the output is ": 1", which matches the way print_list is telling Pd to format a list with at least one element that is not a symbol. [1]
Likewise, the output "symbol a" you referred to above enters [print] as "list a", and gets formatted as "symbol a" because it's a one-element list, with that element being a symbol-atom.
This is complicated by the fact that objects like [route] do a similar trick.
Ok, now I'm pretty convinced that [list] always outputs a list.
[1]- On older versions of Pd, you can still see a discrepancy if, for example, you compare the way [print] formats a gpointer, and a list containing one gpointer.
-Jonathan
anyways, you should provide [+~ ] operator with an argument if you want it to expect messsages instead of a signal (check help patch) :-)
ciao
-- ypatios
when you think about it, in order to access data written, say 10 seconds ago, then you need to have written that data in the first place. so, for variable delaytimes, you have to choose the longest delay you will need, and set your delaywrite to that length.
if you don't need realtime behaviour, and need to conserve cpu, then a workaround would be to have delwrite/read pairs of increasing lengths in subpatches, with [switch~] objects turning off all the subptaches except the one in current use.
if you do that, and switch between delays in realtime, you're going to get all sorts of time-scrambled junk while the buffers fill up.