ELVIS-Project / vis-framework

Thoroughly modern symbolic musical data analysis suite.
http://elvisproject.ca/
31 stars 6 forks source link

Addressed Settings in Models #323

Closed crantila closed 8 years ago

crantila commented 9 years ago

Currently any call to get_data() will send all settings to all analyzers. This may be difficult to understand when coordinating settings, but worse, if more than one analyzer uses a setting name, it will necessarily be misinterpreted somewhere along the line.

Thus, we should be able to set settings for all analyzers and for only certain ones. The models should sort this out before calling the analyzers. For example:

{'quality': True,
  'aggregator.ColumnAggregator': {'column': 'frequency.FrequencyExperimenter'},
  'frequency.FrequencyExperimenter': {'column': 'interval.IntervalIndexer'}}

... will send settings like this:

alexandermorgan commented 8 years ago

I see the value of this, but I think that for the sake of simplicity, it would be best to steer users towards making multiple calls to get_data, rather than having one big call. Since the single-big-call approach must necessarily run serially anyway, there wouldn't really be any computational advantage to it. Also, the new architecture in VIS 3.0 makes this less of an issue by handling deterministic inputs for the user. For example, you need the results of the noterest indexer to calculate vertical intervals, so before you would do something like this (forgive me if the syntax is a little off):

v_ints = indexed_piece.get_data([noterest.NoteRestIndexer, interval.IntervalIndexer], settings) But since the results of the noterest indexer are deterministic, we can provide them to the interval indexer for the user. Now you can run the same command like this:

v_ints = indexed_piece.get_data([interval.IntervalIndexer], setts)

I'm going to close this but please feel free to open this back up if you wish.