Skip to content

Commit

Permalink
add importances to HOATypeMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjnixon committed Feb 20, 2024
1 parent 0313eaa commit bf52c80
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ear/core/metadata_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ class HOATypeMetadata(TypeMetadata):
duration (fractions.Fraction or None): Duration of block.
extra_data (ExtraData): Info from object and channels for all channels.
gains (list of float): Gain for each input channel; defaults to 1.
importances (list of int): Importance for each input channel; defaults to 10.
"""
orders = attrib(validator=list_of(int))
degrees = attrib(validator=list_of(int))
Expand All @@ -300,11 +301,16 @@ class HOATypeMetadata(TypeMetadata):
extra_data = attrib(validator=instance_of(ExtraData), default=Factory(ExtraData))

gains = attrib(validator=list_of(float))
importances = attrib(validator=list_of(int))

@gains.default
def _(self):
return [1.0] * len(self.orders)

@importances.default
def _(self):
return [10] * len(self.orders)


@attrs(slots=True)
class HOARenderingItem(RenderingItem):
Expand Down

0 comments on commit bf52c80

Please sign in to comment.