Source Code | Tickets | Trello | Twitter | Patreon | © Michael DeHaan, 2020

Data Pools


About

Data pools are almost exactly like Patterns that don't contain notes. Instead, they contain values that can be accessed exclusively from the DataGrab Evaluator. If nothing reads from them, they just sit there, but if patterns or transforms ask for data, they serve it up on request.

Data pools can be shared among any track that wishes to draw from them, and they do move in terms of set directions, just like patterns.

  This concept is best illustrated by This API Example, so open this in a new tab as you read along.


Creating A Data Pool 

A basic data pool looks a lot like a Pattern, but instead of Slots, it contains DataSlots. It also takes a lot less arguments than Pattern


api.data_pools.add(name='sourceData', direction='random', slots=[
    DataSlot(value=1),
    DataSlot(value=2),
    DataSlot(value=3),
    DataSlot(value=4),
    DataSlot(value=5),
    DataSlot(value=6),
    DataSlot(value=7)
])
slots:list=None, direction=None, length=None):

A scene has the following properties:

Property Type Description
name string A symbolic name for the data pool, as referenced from DataGrab
direction string A direction, just as described in Patterns

Suggestions & Tips 


In Context 

Reading the following API examples is recommended for understanding this section:

Next Up 

You're already down the rabbit hole pretty far. Feel free to review other chapters or the other API demos. If you're done with that, it's time to kick out the jams.