can I use dada.catart with any database?

Discussions, advice, bug reports and much more about the "dada" environment.
Post Reply
tremblap
Posts: 26
Joined: Mon May 18, 2015 11:38 am

can I use dada.catart with any database?

Post by tremblap » Fri Oct 12, 2018 11:00 am

Hello

My formated table has the instantiation message at loadtime:
addtable segments (start f) (duration f) (energy f) (pitch f) (centroid f) (spread f)

I can fill the dada.base object fine, but I don't seem to be able to connect it to the dada.catart object. I tried to analyse the help patch but I get querying errors...

I presume I'm missing a step here, but I cannot find a tutorial yet ;-)

thanks for any pointer.

tremblap
Posts: 26
Joined: Mon May 18, 2015 11:38 am

Re: can I use dada.catart with any database?

Post by tremblap » Fri Oct 12, 2018 3:22 pm

Thanks to Hans's help,I found out i needed to change the contentfield of dada.catart to something that was actually in my database otherwise I got many unhappy max messages ;-)

danieleghisi
Site Admin
Posts: 1347
Joined: Fri Dec 03, 2010 1:25 pm

Re: can I use dada.catart with any database?

Post by danieleghisi » Fri Oct 12, 2018 4:26 pm

Hi,

you are right... No tutorial yet :)

You should define *at least* the attributes setting the database, the table name, the xfield the yfield and the content field (= which columns are output upon click/hover/etc.). These attributes are all in the "basic" tab.

Once you do that, you are connected :)

d

tremblap
Posts: 26
Joined: Mon May 18, 2015 11:38 am

Re: can I use dada.catart with any database?

Post by tremblap » Sat Oct 13, 2018 7:50 am

indeed this is what I found out.

Can you give me such a troubleshooting list for the dada.distance visualiser? I saw you have a subpatch that computes the distances first... that is where I stalled but I'll give it another shot!

danieleghisi
Site Admin
Posts: 1347
Joined: Fri Dec 03, 2010 1:25 pm

Re: can I use dada.catart with any database?

Post by danieleghisi » Mon Oct 15, 2018 2:12 pm

Hi, dada.distances pretty much in the same way, except that instead of the x/y fields you need to define both an element table and a distance table.
The basic concept is explained in the "distance table" tab of the [dada.base] help file.

The idea is that you have a database, say DB and you define a table (say CITIES, with a unique field, say, "name"), and a distance table (via "adddistancetable", say DISTS), and then you add distance entries. A distance table is a special kind of table (well, it's a super normal SQL table, only it is interpreted differently by dada) that only has as values distances between elements of some other table.

If your table CITIES has

NAME
Rome
Paris
London

you can send messages for each couple of cities such as
adddistanceentry DB CITIES NAME Rome Paris 1421
adddistanceentry DB CITIES NAME Rome London 1873
adddistanceentry DB CITIES NAME Paris London 1421

Then you can display it in dada.distances, plugging in in the inspector DB as database, CITIES as table and DISTS as distance table.

Hope this helps...
Daniele

Post Reply