[PD] Q: about PD data structures

Chris McCormick chris at mccormick.cx
Wed May 6 05:27:23 CEST 2015


On 04/05/15 16:29, Frank Barknecht wrote:
> On Mon, May 04, 2015 at 08:53:59AM +0200, João Pais wrote:
>> You might be able to do what you want without data structures
>> (probably much faster with a [coll], as they're cumbersome to
>> program), but
> 
> Actually for the problem at hand (storing lists like "Maj7 1 3 5 7") the best
> approach would be to use the [text] object in recent Pd vanilla versions.

Here is a hash-map mimic built on [text]:

https://github.com/chr15m/blockhead/raw/master/u_map.pd
https://github.com/chr15m/blockhead/raw/master/u_map-help.pd

It lets you set, get, delete lists by key. Lists can contain floats,
symbols etc.

There is also a messaging API style of access for interfacing with u_map
without having to connect directly to it. Makes for cleaner patching:

https://github.com/chr15m/blockhead/raw/master/u_map-api.pd
https://github.com/chr15m/blockhead/raw/master/u_map-api-help.pd

You can include the blockhead library as a submodule in your Pd project
if you are using git like this:

git submodule add https://github.com/chr15m/blockhead.git

[map] was developed as part of SyncJams, a network synchronised
metronome protocol: https://github.com/chr15m/SyncJams

Cheers,

Chris.

-- 
http://mccormick.cx/



More information about the Pd-list mailing list