hi. here are a few questions...
when will there be undo/redo functions?
i can create several cords from one same outlet to one same inlet. fine. but they all look like a single cord. why?
using C, how do i create a timer callback? e.g. PD would call my procedure after 50 ms. A kind of [metro] for C code.
Can I change the default font from Courier Bold to Helvetica Medium ?
Mathieu Bouchard http://artengine.ca/matju
Mathieu Bouchard schrieb:
using C, how do i create a timer callback? e.g. PD would call my procedure after 50 ms. A kind of [metro] for C code.
To call a function "function(t_yourobject *x) use:
clock_delay(x->x_clock, time_in_ms);
with x_clock being of type t_clock. You also have to set up the clock in the new routine:
x->x_clock = clock_new(x, (t_method)function); /* here you associate the function with x->x_clock */
and free it in the free routine:
clock_free(x->x_clock);
Olaf
you can change the font by editing the "pd.tk" file with an text-editor... (search for "courier" and replace with your font)
----- Original Message ----- From: "Mathieu Bouchard" matju@sympatico.ca To: pd-list@iem.kug.ac.at Sent: Wednesday, August 28, 2002 4:14 PM Subject: [PD] questions
hi. here are a few questions...
when will there be undo/redo functions?
i can create several cords from one same outlet to one same inlet. fine. but they all look like a single cord. why?
using C, how do i create a timer callback? e.g. PD would call my procedure after 50 ms. A kind of [metro] for C code.
Can I change the default font from Courier Bold to Helvetica Medium ?
Mathieu Bouchard http://artengine.ca/matju
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
'undo' is less than a year off I think...
In the current version (0.35) you shouldn't be able to make duplicate connections, although that was possible in 0.24.
clock_delay() (see the source for the "delay" object)
and no, fixed-pitch fonts only, and even then the only way to change them is to hack u_main.tk... I plan to make a command line flag to make this easier.
cheers Miller
On Wed, Aug 28, 2002 at 10:14:51AM -0400, Mathieu Bouchard wrote:
hi. here are a few questions...
when will there be undo/redo functions?
i can create several cords from one same outlet to one same inlet. fine. but they all look like a single cord. why?
using C, how do i create a timer callback? e.g. PD would call my procedure after 50 ms. A kind of [metro] for C code.
Can I change the default font from Courier Bold to Helvetica Medium ?
Mathieu Bouchard http://artengine.ca/matju
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
On Wed, 28 Aug 2002, Miller Puckette wrote:
'undo' is less than a year off I think...
well, 'undo' is not so tough a feature to code...
In the current version (0.35) you shouldn't be able to make duplicate connections, although that was possible in 0.24.
oh, i had 0.34 installed... installing 0.35
clock_delay() (see the source for the "delay" object)
thanks (and thanks to Olaf too)
and no, fixed-pitch fonts only, and even then the only way to change them is to hack u_main.tk... I plan to make a command line flag to make this easier.
when will variable-pitch font support be added?
another question: is it still true that a non-left inlet may only define a single method? is there some kind of workaround for that?
Mathieu Bouchard http://artengine.ca/matju
Mathieu Bouchard schrieb:
another question: is it still true that a non-left inlet may only define a single method? is there some kind of workaround for that?
Yes and yes. You can't do it the 'normal' way, but Thomas Grill recently showed me how to create a 'proxy inlet'. You could have a look at the sources for 'nroute' (part of maxlib, http://www.akustische-kunst.org/puredata/maxlib/). It creates a proxy inlet as second inlet...
Olaf
On Thu, 29 Aug 2002, Olaf Matthes wrote:
Mathieu Bouchard schrieb:
another question: is it still true that a non-left inlet may only define a single method? is there some kind of workaround for that?
Yes and yes. You can't do it the 'normal' way, but Thomas Grill recently showed me how to create a 'proxy inlet'. You could have a look at the sources
[...]
On Thu, 29 Aug 2002, Thomas Grill wrote:
Hi Mathieu, It's only a sketch, actually fragments from flext code. good luck, Thomas
As stated before, you need proxy objects which (actually their method) receive the messages for the non-left inlets.
[...]
Thanks to both of you. I have created proxy objects and they work. GridFlow 0.6.2 will include the Ruby<->PureData bridge I've written. However it crashes after a while due to memory corruption, which I don't have while running with the other bridge or running standalone.
Also I don't know how to correctly tell to PureData that the object should be greyed out and disabled. What I do in the Ruby/C++ part is I raise an exception in the constructor. I catch that exception in the bridge and I call pd_error()... that leaves a gui object with 1 inlet and 0 outlets, invariably, and if i send a bang in that outlet, i get:
error: ruby NoMethodError: undefined method `_0_bang' for false
where 'false' is Ruby's interpretation of a null pointer.
in jMax, calling fts_object_set_error() is sufficient to grey out an object.
Mathieu Bouchard http://artengine.ca/matju
On Thu, Aug 29, 2002 at 02:03:41PM -0400, Mathieu Bouchard wrote:
On Wed, 28 Aug 2002, Miller Puckette wrote:
'undo' is less than a year off I think...
well, 'undo' is not so tough a feature to code...
The difficulty to code something isn't the only factor in actually getting code written.
Chris. _________________________________ chris@mccormick.cx http://www.mccormick.cx http://www.sciencegirlrecords.com
COuldn't find anything on the archives about this (except an unanswered question from 1999)...
Anyone out there trying to use ESD (EsounD) on top of OSS, with PD? Any plans to make PD ESD-aware? Or even better, ASD?
Or, is this blasphemy..;)
dc
www.ariada.uea.ac.uk/~dcasal --)+
Hi. david casal hat gesagt: // david casal wrote:
COuldn't find anything on the archives about this (except an unanswered question from 1999)...
Anyone out there trying to use ESD (EsounD) on top of OSS, with PD? Any plans to make PD ESD-aware? Or even better, ASD?
Or, is this blasphemy..;)
ESD is blasphemy ;) If I'm right, ESD is basically "cat(1)", and it supposedly has horrible effects on latency. But I removed ESD from my system long ago, so that might have changed.
I don't know ASD. Maybe it's (KDE's) aRTs, but I never used that.
There are plans and even somehow working examples of PD using JACK, the Linux Audio Developer's choice of sound daemon. See the PD Externals CVS at pure-data.sf.net
Frank Barknecht _ ______footils.org__
On Sat, 31 Aug 2002, Frank Barknecht wrote:
Hiya
Thanks for the reply, will look at Jack.
ESD is blasphemy ;) If I'm right, ESD is basically "cat(1)", and it supposedly has horrible effects on latency. But I removed ESD from my system long ago, so that might have changed.
Yup, tried it and latency is HUGE/ And won't (of course) work with pd.
I don't know ASD. Maybe it's (KDE's) aRTs, but I never used that.
much better, smaller, faster...still, not really for PD-like things.
going off to pure-data CVS. Thanks again.
dc
www.ariada.uea.ac.uk/~dcasal --)+
On Fri, 30 Aug 2002, Chris McCormick wrote:
On Thu, Aug 29, 2002 at 02:03:41PM -0400, Mathieu Bouchard wrote:
On Wed, 28 Aug 2002, Miller Puckette wrote:
'undo' is less than a year off I think...
well, 'undo' is not so tough a feature to code...
The difficulty to code something isn't the only factor in actually getting code written.
I know, I know. I only have to look at my TODO lists for my projects to see what you mean. OTOH, I often take into account that there are features I've been told there is an interest in. So the essential message here is "undo is cool and useful. pleez add it."
On Sat, 31 Aug 2002, mark wrote:
'undo' is less than a year off I think...
"well, 'undo' is not so tough a feature to code..." Hmm - you clearly have never written an undo before.
search on google: matju undo; the first result is:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/12752
which hints that I may have written one on 17 March 2001...
I'll fetch the URL for the source for you:
http://www.ruby-lang.org/~knu/cgi-bin/cvsweb.cgi/~checkout~/lib/metaruby/Und...
adds methods #undo,#redo on imitations of the builtin Array,Hash,String classes of that language. there's one queue per object by default but you have an option to share queues so that, for example, you have one undo queue per document, where a document is a tree of basic datastructures...
I have implemented one or two over the years and they are a total bugger to put it politely. Most of the info is there and straight forward but you end up finding the odd piece of vital information is hard to come by. mark
I think I'll need a vital piece of information to understand what you mean in this paragraph.
Mathieu Bouchard http://artengine.ca/matju
"> Hmm - you clearly have never written an undo before. search on google: matju undo; the first result is: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/12752 which hints that I may have written one on 17 March 2001... I think I'll need a vital piece of information to understand what you mean in this paragraph."
There is a big difference in undoing changes in a object network that undoing operations on an array.
For example say that I have a network of externals connected together and I decide to delete one of them
I place the object type and location on the undo stack and then I put its connections on the stack because they have also become deleted. And here comes my first problem - I can't use pointers to the objects my deleted object was connected to because those objects may be deleted and restored (thus changing any pointers) - so I need ways of representing the network that doesn't rely on the way it is currently stored in memory.
Secondly are you going to restore the states of externals? Should a sequence object be undeleted with its internal state intact or is it ok to throw that away (a less than perfect undo but probably the only realistic choice for PD)
There are many of these problems often requiring a lot more information to be added to your current internal representation.
Its not impossible obviously however it IS a non trivial task
mark
On Sat, 31 Aug 2002, mark wrote:
Secondly are you going to restore the states of externals?
I'm not... I'm not going to violate encapsulation to do that. the "Undo" feature should work as if the operations were done by hand, for simplicity.
And here comes my first problem - I can't use pointers to the objects my deleted object was connected to because those objects may be deleted and restored (thus changing any pointers) - so I need ways of
What can I say but: well don't use pointers then.
What you have to do is to create a stack on which you push the operations that are required to undo what the user has done. The operations may be {add "+ 4" as object # 15} upon a delete or {remove-connection 15 0 4 2} upon a add-connection.
The objects must be indexed so that each object has a unique id in its patcher, and that id is to be reused by only a new instance created by the undo queue.
There is a big difference in undoing changes in a object network that undoing operations on an array.
so far i have reduced the graph-of-objects problem down to a problem of maintaining one undoqueue for two dictionaries, one for objects and one for connections, plus a marshaller (which is already implemented for load/save)...
...which is a problem i have solved before.
Mathieu Bouchard http://artengine.ca/matju
"The objects must be indexed so that each object has a unique id in its patcher, and that id is to be reused by only a new instance created by the undo queue."
Which is code that should be added to PD retrofitted to the application
externals changes the number of connections which may or may not cause issues.
My point is that it is a non-trivial thing to add to an application not that it is impossible.
If you feel that you could add it quickly and easily then perhaps you should - I cannot deny it would be an excellent thing to have.
mark
'undo' is less than a year off I think...
"well, 'undo' is not so tough a feature to code..."
Hmm - you clearly have never written an undo before. I have implemented one or two over the years and they are a total bugger to put it politely. Most of the info is there and straight forward but you end up finding the odd piece of vital information is hard to come by.
mark