<commit_before># -*- encoding: utf-8 -*-
from supriya.tools.ugentools.MultiOutUGen import MultiOutUGen


class Control(MultiOutUGen):

    ### CLASS VARIABLES ###

    __slots__ = (
        '_channel_count',
        '_control_names',
        )

    ### INITIALIZER ###

    def __init__(self, control_names):
        from supriya.tools import synthdeftools
        self._control_names = tuple(sorted(control_names))
        MultiOutUGen.__init__(
            self,
            rate=synthdeftools.Rate.CONTROL,
            channel_count=len(control_names),
            )

    ### SPECIAL METHODS ###

    def __getitem__(self, i):
        from supriya import synthdeftools
        if type(i) == int:
            if len(self.control_names) == 1:
                return self
            else:
                return synthdeftools.OutputProxy(self, i)
        else:
            return self[self._get_control_index(i)]

    def __len__(self):
        return len(self.control_names)

    ### PRIVATE METHODS ###

    def _get_control_index(self, control_name):
        return self._control_names.index(control_name)

    def _get_outputs(self):
        return [self.rate] * len(self)

    ### PUBLIC PROPERTIES ###

    @property
    def control_names(self):<commit_msg>Improved Control UGen.<commit_after># -*- encoding: utf-8 -*-
from supriya.tools.ugentools.MultiOutUGen import MultiOutUGen


class Control(MultiOutUGen):

    ### CLASS VARIABLES ###

    __slots__ = (
        '_channel_count',
        '_control_names',
        )

    ### INITIALIZER ###

    def __init__(
        self,
        control_names,
        rate=None,
        starting_control_index=0,
        ):
        self._control_names = tuple(sorted(str(x) for x in control_names))
        MultiOutUGen.__init__(
            self,
            channel_count=len(control_names),
            rate=rate,
            special_index=starting_control_index,
            )

    ### SPECIAL METHODS ###

    def __getitem__(self, i):
        from supriya import synthdeftools
        if type(i) == int:
            if len(self.control_names) == 1:
                return self
            else:
                return synthdeftools.OutputProxy(self, i)
        else:
            return self[self._get_control_index(i)]

    def __len__(self):
        return len(self.control_names)

    ### PRIVATE METHODS ###

    def _get_control_index(self, control_name):
        return self._control_names.index(control_name)

    def _get_outputs(self):
        return [self.rate] * len(self)

    ### PUBLIC PROPERTIES ###

    @property
    def control_names(self):
{'fraction_non_alphanumeric': 0.1044776119402985, 'fraction_numerical': 0.0019135093761959434, 'mean_word_length': 2.149397590361446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7372288', 'n_tokens_mistral': 819, 'n_tokens_neox': 773, 'n_words': 151}