当前位置: 首页>>代码示例>>Python>>正文


Python Pattern.stop方法代码示例

本文整理汇总了Python中pattern.Pattern.stop方法的典型用法代码示例。如果您正苦于以下问题:Python Pattern.stop方法的具体用法?Python Pattern.stop怎么用?Python Pattern.stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pattern.Pattern的用法示例。


在下文中一共展示了Pattern.stop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Spectrum

# 需要导入模块: from pattern import Pattern [as 别名]
# 或者: from pattern.Pattern import stop [as 别名]

#.........这里部分代码省略.........
        :Args:

            x : int
                new `wintype` attribute.

        """
        pyoArgsAssert(self, "i", x)
        self._wintype = x
        x, lmax = convertArgsToLists(x)
        [obj.setWinType(wrap(x,i)) for i, obj in enumerate(self._base_objs)]

    def setFunction(self, function):
        """
        Sets the function to be called to retrieve the analysis data.

        :Args:

            function : python callable
                The function called by the internal timer to retrieve the
                analysis data. The function must be created with one argument
                and will receive the data as a list of lists (one list per channel).

        """
        pyoArgsAssert(self, "C", function)
        self._function = getWeakMethodRef(function)

    def poll(self, active):
        """
        Turns on and off the analysis polling.

        :Args:

            active : boolean
                If True, starts the analysis polling, False to stop it.
                defaults to True.

        """
        pyoArgsAssert(self, "B", active)
        if active:
            self._timer.play()
        else:
            self._timer.stop()

    def polltime(self, time):
        """
        Sets the polling time in seconds.

        :Args:

            time : float
                Adjusts the frequency of the internal timer used to
                retrieve the current analysis frame. defaults to 0.05.

        """
        pyoArgsAssert(self, "N", time)
        self._timer.time = time

    def setLowFreq(self, x):
        """
        Sets the lower frequency, in Hz, returned by the analysis.

        :Args:

            x : float
                New low frequency in Hz. Adjusts the `lowbound` attribute, as `x / sr`.
开发者ID:Rotbaeckchen,项目名称:pyo,代码行数:69,代码来源:analysis.py

示例2: Scope

# 需要导入模块: from pattern import Pattern [as 别名]
# 或者: from pattern.Pattern import stop [as 别名]

#.........这里部分代码省略.........
        :Args:

            x : float
                new `length` attribute.

        """
        pyoArgsAssert(self, "N", x)
        self._length = x
        self._timer.time = x
        [obj.setLength(x) for obj in self._base_objs]

    def setGain(self, x):
        """
        Set the gain boost applied to the analysed data. For drawing purpose.

        :Args:

            x : float
                new `gain` attribute, as linear values.

        """
        pyoArgsAssert(self, "n", x)
        self._gain = x
        x, lmax = convertArgsToLists(x)
        [obj.setGain(wrap(x,i)) for i, obj in enumerate(self._base_objs)]

    def poll(self, active):
        """
        Turns on and off the analysis polling.

        :Args:

            active : boolean
                If True, starts the analysis polling, False to stop it.
                defaults to True.

        """
        pyoArgsAssert(self, "B", active)
        if active:
            self._timer.play()
        else:
            self._timer.stop()

    def setWidth(self, x):
        """
        Gives the width of the display to the analyzer.

        The analyzer needs this value to construct the list
        of points to draw on the display.

        :Args:

            x : int
                Width of the display in pixel value. The default
                width is 500.

        """
        pyoArgsAssert(self, "I", x)
        self._width = x
        [obj.setWidth(x) for obj in self._base_objs]

    def setHeight(self, x):
        """
        Gives the height of the display to the analyzer.

        The analyzer needs this value to construct the list
开发者ID:Rotbaeckchen,项目名称:pyo,代码行数:70,代码来源:analysis.py


注:本文中的pattern.Pattern.stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。