(at this time i figured out that xeq parsor didn't worked with Pd-L2ork)..
Quickly scanning the code my guess is it works with Pd-l2ork 1.0:
My other guess is you are using Purr Data (Pd-l2ork 2.0):
In which case the ad-hoc tcl text editor and Pd-message parser that xeq injects into the GUI at setup time won't work.
Probably the easiest solution is to abstract out the text editor used by
[text define]and use it for this external (as well as some Cyclone externals, too).
As far as constrained dragging, you can do it in Purr Data fairly easily:
As far as constrained dragging on array elements, you can do that in Purr Data as well:
A few notes:
- the "drag" event is set on the relevant
[draw]command and sends notifications to the outlet of the relevant
[draw]command. This allows "per-shape" events so you can tell which shape triggered the event.
- since these draw events aren't turned on by default, you can decide which events you want to listen for-- mousedown, mouseup, mouseover, mouseout, mouseenter, mouseleave, and drag. (Scroll and touch events are possible but I haven't implemented them.)
- for the sake of sanity "x" and "y" fields don't have any automatic behavior when scalar elements are drawn using
[draw array]. If you want to make associations you can declare them in a message as I do in the demo.
[draw array]has no bounding box to select it in Edit mode. Otherwise it would try to get the bounding box for all its elements and cause dropouts for arrays of non-trivial size every time you move the mouse. To get a bbox you can nest it inside a
[draw svg]which creates a viewport clipped to a rectangle you can specify.
- receiving events for ds array elements is fairly new behavior. I know there's at least one crasher lurking if you try to add fields to the [struct] for an array element with extant scalars on a canvas.
- the "drag" event is set on the relevant
Purr Data version 2.4.3 is now available:
Report bugs here:
- fixes to [draw array] and [draw svg], plus some tutorials for using it
- fix bug where OSX 10.8 binary wouldn't work on 10.8 without editing plist
- fix regression with [draw g]
- improve [draw svg] getrect performance
- fix [stdout] so it works correctly with [pd~]
- fix [vu] display error
- added Debian Stretch binary
- simplify startup message
- port some documentation fixes from Pd Vanilla
- fix midi-help.pd, and add links for all midi-related objects
- fix font init bug triggered on some Windows systems
- (work-in-progress) canvas properties checkbox to suppress scrollbars
- (work-in-progress) canvas properties checkbox to suppress menus
- add mouse event callback outlet for [draw image]
[draw array] and [draw svg]
The new tutorials in doc/4.data.structures/pd-l2ork/ds-tutorials show how
to use these new drawing commands to visualize data. With the recent changes
to data structure array redrawing, these commands should make it possible to
change the visible attributes of an array without getting dropouts.
new canvas properties (experimental)
This is the first draft of functionality to suppress scrollbars and menus.
The options you choose get saved with the patch using new canvas methods.
Now that [stdout] works with [pd~], we can leverage those objects to do
sane testing on external libraries.
For the public methods, see m_pd.h in Pd's source code:
For adding a list method:
EXTERN void class_addlist(t_class *c, t_method fn);
Because of gpointers, storing a list of arbitrary atoms is non-trivial. (See x_list.c for how it's done internally.) If you want to store a list of floats, however, I'd imagine you could probably store it as a binbuf in the struct and use binbuf_duplicate.
@Johnny-Mauser Are you still on OSX 10.8?
At some point in the future I'm going to have to drop both WinXP and OSX 10.8 support because current versions of the GUI toolkit don't support those systems anymore. It's not a priority right now, but I am seeing various speedups and new features in the newer GUI toolkit versions that will help improve Purr Data. I'll post a message about it to the list before it happens, but when those features hit a critical mass I'll need to make the switch.
@robertsyrett A few things Purr Data has which Pd Vanilla doesn't:
- infinite undo
- GUI presets (skins)
- introspection objects (which can be used to get abstraction args): canvasinfo, pdinfo, objectinfo, classinfo
- ships with externals like Pd-extended did
- internal preset objects which work out-of-the-box with abstractions (preset_hub and preset_node)
- Bezier curve cords
- guaranteed pixel-exact box sizing across all platforms
- ability to create scalars inside object boxes
- grouping/affine transforms/images/sprites/opacity/standard-color-formats/standard-mouse-callbacks for data structure drawing commands
- working event callbacks for data structure array elements
- canvas array fields for data structures with "pointerless" field mutation (experimental)
- hyperlinked object errors in Pd Window
- cross-referenced help patches with hyperlinks
- complete list of arguments expansion with "$@" in both object and message boxes
- tooltips for iemgui dialogs
- click-draggable iemgui sizing
- click-draggable iemgui labels position
- click-draggable GOP canvases/canvas redrect/grid/scope~ sizing
- "Tidy Up" function which works well
- one-to-many/many-to-one/many-to-many wire-connections
- "Put" menu array trace colors
- "Put" menu array bargraph style
- click-draggable "Put" menu graph sizing
- a fairly standard properties dialog for scalars
- throttling iemgui and scalar GUI updates
- ability to change ds array element drawings without having to redraw the entire scalar which contains that element
- single preferences panel
- ability to draw scalars in a box outside of which the contents are clipped
- simple testing framework to make sure all externals instantiate without crash or memory errors
- various fixes to externals that don't use aliases correctly
- various fixes to the loader
- find in console with results highlighted
- duplicate console messages get prefixed with number incremented in brackets
- fullscreen mode
- standard open/save dialogs under Gnu/Linux
- object z-ordering (move to front/back)
- standard keybindings inside editable object/message boxes and performant copy/pasting that doesn't freeze Pd with large amount of text
- lots of abstractions which are part of Ico's "K12" mode. I haven't ported the K12 interface yet but the abstractions are functional and handy.
- dropdown menu atom box
- ability to paste Pd source file into running instance
That's heavily biased toward what I've been working on lately which is improvements to scalars. But that should give you a decent idea. Also-- Purr Data doesn't include Deken, and Gem doesn't currently ship with the OSX version.
In Purr Data
[name(---[canvasinfo]will output the unique symbol receiver for the canvas in which it appears, including subpatches. Also, if you type
<ctrl-m>to send a message to Pd in Purr Data, the text entry begins with that same symbol receiver highlighted so that you can send a message directly to that canvas if you want. However, those symbols are essentially randomly chosen hex strings which will be different if you restart Pd.
But those are both there mostly for debugging purposes.
There is also
[ggee/sendlocal]which are local to a particular canvas or subpatch. When you instantiate them a warning is printed saying that they are deprecated by "send/receive $0-foo". But dollarsign zero isn't local to subpatches so I don't understand the warning.
[draw]command in Purr Data there are methods to set colors:
[struct demo float x float y symbol foo float v1 float v2 float v3] [fill blue( | [draw rect 40 40] [demo]
You can use English words to set a static color as above.
You can also do
[fill v1 v2 v3( <- rgb colors [fill hsl v1 v2 v3( <- hsl colorspace [fill hcl v1 v2 v3( <- hcl colorspace [fill lab v1 v2 v3( <- lab colorspace [fill symbol foo( <- variable color name
The fields can also be constants, like
[fill rgb 0 255 0(
A new release of Purr Data is available:
Please report bugs to
- fixed freeze when flooding the Pd window with messages
- fixed array tick label positioning
- normalize array trace line thickness so it is always visible
- send correct pointer for data structure array element event callbacks
- only redraw affect data structure array element when updating a field for [draw array]
The last point will come in handy once I finish work on
[draw array]. It will make it possible to have a matrix of widgets while limiting the overhead in the Pd engine to a single
@vastus If you want it to be a signal object in a Pd patch, you'd need a perform routine with a function call in it that sends a block of samples from Pd to the Gibber instance. That function call would need to block until the Gibber instance processes that block and returns to deliver the block of samples for the output. I don't know enough about Gibber's API to tell you how hard or easy that would be.
A new Purr Data release is out: 2.4.1:
- update [expr] family to the same codebase as Pd Vanilla 0.48
- fix bug that prevented file path in [draw image] from working
- fix regression opening Pd files in a running instance
Binaries may be found here:
Please report bugs here:
@DrDoug That's a particularly difficult class to port.
- has a complicated argument interface and widget behavior (uses a Function key to switch between widget states), which looks to be completely different than Max's comment interface
- is difficult to get the exact same placement as in tcl/tk
- is almost guaranteed to generate different output on different platforms
The first two points are possible to get around, but the last one seems impossible. There's simply no way on a given platform to predict the metrics of an arbitrary font on the other platforms supported by Purr Data. Thus a
[cyclone/comment]object positioned "just right" inside a GOP window could have the text overlapping on someone else's machine. (In fact there are lots of Pd patches that feature overlapping
<ctrl-5>comments for just this reason.)
I probably won't be porting it any time soon, but if anyone else wants to take a shot in the near future let me know.
Yeah, I'm still working on that:
A new Purr Data release is out!
- fixed a bug where the preferences wouldn't load properly on some OSX systems
- added [draw svg] for a graphical viewport
- fixed display bugs with [draw image] and [draw sprite]
- added experimental [draw array] for visualizing array data
Binaries may be found here:
Please report bugs here: