python ecaeffect test release

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: python ecaeffect test release
From: janne halttunen (jhalttun_AT_pp.htv.fi)
Date: Fri Mar 28 2003 - 12:45:44 EET


Hi,

I've implemented ecasound effect parameter parsing for python.

can temporarily be reached at:

http://www.pp.htv.fi/jhalttun/ecaeffect.py

sample session:

>>> import ecaeffect
>>> ecaeffect.parse_internal ()
>>> ecaeffect.get_description ('eca')
('Advanced compressor', 'Advanced compressor')
>>> ecaeffect.get_params ('eca')
[{'upper': 200.0, 'step': 1, 'name': 'peak-limit-%', 'lower': 0, 'value': 100.0, 'page': 10}, {'upper': 1, 'step': 0.01, 'name': 'release-time-sec', 'lower': 0, 'value': 0.0, 'page': 0.050000000000000003}, {'upper': 2.0, 'step': 0.10000000000000001, 'name': 'fast-crate', 'lower': 0, 'value': 1.0, 'page': 0.5}, {'upper': 1, 'step': 0.01, 'name': 'overall-crate', 'lower': 0, 'value': 0.0, 'page': 0.050000000000000003}]

>>> ecaeffect.parse_ladspa ()
>>> ecaeffect.get_description ('mbeq')
('Multiband EQ', "Multiband EQ - Author: 'Steve Harris <steve_AT_plugin.org.uk>'")

>>> ecaeffect.get_params_info ('mbeq')
{'params_number': 15, 'params': {'toggled_flag': [0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L], 'output_flag': [0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L], 'name': ['50Hz gain (low shelving)', '100Hz gain', '156Hz gain', '220Hz gain', '311Hz gain', '440Hz gain', '622Hz gain', '880Hz gain', '1250Hz gain', '1750Hz gain', '2500Hz gain', '3500Hz gain', '5000Hz gain', '10000Hz gain', '20000Hz gain'], 'upper_bound': [30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0], 'integer_flag': [0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L], 'lower_bound': [-70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0], 'defaultvalue': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'upper_bound_flag': [1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L], 'lower_bound_flag': [1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
 1L], 'logarithmic_flag': [0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L], 'description': ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}, 'name': 'Multiband EQ', 'description': "Multiband EQ - Author: 'Steve Harris <steve_AT_plugin.org.uk>'"}

>>> ecaeffect.get_params ('mbeq')
[{'upper': 30.0, 'step': 1, 'name': '50Hz gain (low shelving)', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '100Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '156Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '220Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '311Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '440Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '622Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '880Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '1250Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '1750Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '2500Hz gain', 'lo
 wer': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '3500Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '5000Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '10000Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}, {'upper': 30.0, 'step': 1, 'name': '20000Hz gain', 'lower': -70.0, 'value': 0.0, 'page': 10}]

-----------------

please note that in get_params(), the "step" and "page" attributes are determined heuristically. Also when upper bound and lower bound are not set, heuristic method is used.

TODO:

-cacheing of parsed values

Kai, could there be some kind of hash value that would indicate whether there has been changes to operator mappings?

-finalizing the API
-documentation

Anything else?

chhers,

janne


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Mar 28 2003 - 12:38:52 EET