Skip to main content

browsedbtable

browsedbtable(
@name 'data'
@db null
@xfield null
@yfield null
@size null
@color null
@shape null
) -> null

Displays SQLite3 database table in the Table Browser window, which automatically opens after script evaluation is complete. Convenient for exploring database tables, especially those consisting of buffers.


Arguments

  • @name [symbol]: Name of database table to browse, as a symbol. (default: 'data').
  • @db [symbol/null]: Optional database name. If set to null, 'main' is used as the default database name. (default: null).
  • @xfield [symbol/null]: Name of table column to use for X axis in Table Browser. (default: null).
  • @yfield [symbol/null]: Name of table column to use for Y axis in Table Browser. (default: null).
  • @size [symbol/null]: Name of table column to use for Size in Table Browser. (default: null).
  • @color [symbol/null]: Name of table column to use for Color in Table Browser. (default: null).
  • @shape [symbol/null]: Name of table column to use for Shape in Table Browser. (default: null).

Usage

## import file
$buf = importaudio('trumpet.wav');
## generate audio descriptors
$descriptors = pitchmelodia() larm() spectralcentroid() effectiveduration();
## segment buffer and analyze every segment
$segments = for $b in splitbuf(@buffer $buf @split 50) collect $b.analyze($descriptors);
## create database table
createdbtable(@data $segments);
## display table in browser
browsedbtable(
@xfield 'pitchmelodia'
@yfield 'larm'
@sizefield 'spectralcentroid'
@colorfield 'effectiveduration'
)